/* =====================================================
   2026 运动打卡日历 — 运动风主题
   ===================================================== */

/* 字体使用本机回退栈，离线运行时不请求外部字体服务。 */

/* ============================
   CSS 变量
   ============================ */
:root {
    /* 运动配色 */
    --sport-orange:  #FF6B00;
    --sport-yellow:  #FFD000;
    --sport-green:   #00D084;
    --sport-blue:    #0066FF;
    --sport-red:     #FF2D2D;
    --sport-dark:    #0D0E14;
    --sport-darker:  #070810;
    --sport-card:    #14161F;
    --sport-card2:   #1C1E2A;
    --sport-line:    rgba(255,255,255,0.07);
    --sport-muted:   #6B7080;
    --sport-sub:     #A0A5B8;
    --sport-light:   #DDDFE8;

    /* Neon glow */
    --glow-orange: 0 0 16px rgba(255,107,0,0.55), 0 0 40px rgba(255,107,0,0.25);
    --glow-green:  0 0 16px rgba(0,208,132,0.55), 0 0 40px rgba(0,208,132,0.25);
    --glow-blue:   0 0 16px rgba(0,102,255,0.55), 0 0 40px rgba(0,102,255,0.25);

    --radius:    14px;
    --radius-sm: 9px;
    --transition: all 0.22s cubic-bezier(.4,0,.2,1);
}

/* ============================
   Reset & Base
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
    background: var(--sport-dark);
    color: var(--sport-light);
    min-height: 100vh;
    overflow-x: hidden;
    /* 动态网格背景 */
    background-image:
        linear-gradient(rgba(255,107,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,107,0,0.04) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* ============================
   HEADER / HERO
   ============================ */
.header {
    position: relative;
    background: linear-gradient(160deg, #111220 0%, #0D0E14 60%);
    border-bottom: 1px solid var(--sport-line);
    overflow: hidden;
    z-index: 100;
}

/* 斜切橙色装饰条 */
.header::before {
    content: '';
    position: absolute;
    top: 0; left: -60px;
    width: 340px; height: 100%;
    background: linear-gradient(135deg, var(--sport-orange) 0%, #ff9500 100%);
    clip-path: polygon(0 0, 72% 0, 52% 100%, 0 100%);
    opacity: 0.12;
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.access-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(0, 208, 132, 0.35);
    border-radius: 999px;
    background: rgba(0, 208, 132, 0.1);
    color: #7ff0c2;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-only[hidden] { display: none !important; }

.header-icon {
    font-size: 30px;
    filter: drop-shadow(0 0 8px rgba(255,107,0,0.8));
}

.header-title h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 0 20px rgba(255,107,0,0.5);
}

.header-year-badge {
    background: var(--sport-orange);
    color: white;
    padding: 3px 12px;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    box-shadow: var(--glow-orange);
}

/* ---- Stats Bar ---- */
.stats-bar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6px 24px 20px;
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.stat-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--sport-orange);
    line-height: 1;
    text-shadow: var(--glow-orange);
}

.stat-label {
    font-size: 11px;
    color: var(--sport-muted);
    margin-top: 3px;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--sport-line);
    margin: 0 20px;
}

/* ============================
   快捷打卡区 (ONE-TAP ZONE)
   ============================ */
.quick-zone {
    max-width: 1100px;
    margin: 24px auto 0;
    padding: 0 20px;
}

.quick-zone-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sport-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-zone-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sport-line);
}

/* 快捷打卡卡片 */
.quick-card {
    background: var(--sport-card);
    border: 1px solid var(--sport-line);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    position: relative;
    overflow: hidden;
}

.quick-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--sport-orange), var(--sport-yellow));
    border-radius: 4px 0 0 4px;
}

.quick-date-info {
    display: flex;
    flex-direction: column;
    min-width: 80px;
    flex-shrink: 0;
}

.quick-date-big {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    color: white;
}

.quick-date-sub {
    font-size: 13px;
    color: var(--sport-muted);
    margin-top: 2px;
}

.btn-punch {
    width: 100%;
    background: linear-gradient(135deg, var(--sport-orange) 0%, #ff9500 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glow-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-punch:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(255,107,0,0.7), 0 6px 20px rgba(0,0,0,0.4);
}

.btn-punch:active  { transform: scale(0.97); }
.btn-punch:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }


/* ============================
   Month Navigation
   ============================ */
.month-nav {
    background: var(--sport-card);
    border-bottom: 1px solid var(--sport-line);
    border-top: 1px solid var(--sport-line);
    position: sticky;
    top: 0;
    z-index: 90;
    margin-top: 24px;
}

.month-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 8px;
    display: flex;
    align-items: center;
}

.month-nav-prev, .month-nav-next {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sport-muted);
    font-size: 15px;
    padding: 14px 10px;
    transition: var(--transition);
    flex-shrink: 0;
}

.month-nav-prev:hover, .month-nav-next:hover { color: var(--sport-orange); }

.month-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 0;
}

.month-tabs::-webkit-scrollbar { display: none; }

.month-tab {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--sport-muted);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

.month-tab:hover { color: white; background: rgba(255,255,255,0.05); }

.month-tab.active {
    background: var(--sport-orange);
    color: white;
    box-shadow: var(--glow-orange);
}

.month-tab .tab-count {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    background: rgba(255,255,255,0.2);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

.month-tab:not(.active) .tab-count {
    background: rgba(255,107,0,0.2);
    color: var(--sport-orange);
}

/* ============================
   Main Content
   ============================ */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 70px;
}

/* ---- Month Header ---- */
.month-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.month-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}

.month-stats {
    font-size: 13px;
    color: var(--sport-muted);
    background: var(--sport-card);
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid var(--sport-line);
}

.month-stats span { color: var(--sport-orange); font-weight: 700; }

/* ============================
   Calendar
   ============================ */
.calendar-wrapper {
    background: var(--sport-card);
    border-radius: var(--radius);
    border: 1px solid var(--sport-line);
    overflow: hidden;
    margin-bottom: 28px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--sport-card2);
    border-bottom: 1px solid var(--sport-line);
}

.calendar-weekdays div {
    text-align: center;
    padding: 12px 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--sport-muted);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
    min-height: 96px;
    padding: 10px;
    border-right: 1px solid var(--sport-line);
    border-bottom: 1px solid var(--sport-line);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.calendar-cell:nth-child(7n) { border-right: none; }

.calendar-cell:hover {
    background: rgba(255,107,0,0.07);
}

.calendar-cell.empty {
    background: rgba(0,0,0,0.2);
    cursor: default;
}
.calendar-cell.empty:hover { background: rgba(0,0,0,0.2); }

.calendar-cell.today { background: rgba(255,107,0,0.08); }
.calendar-cell.today .cell-day {
    background: var(--sport-orange);
    color: white;
    box-shadow: var(--glow-orange);
}

.calendar-cell.has-checkin { background: rgba(0,208,132,0.04); }

.calendar-cell.sunday  .cell-day { color: #FF6B6B; }
.calendar-cell.saturday .cell-day { color: #74B9FF; }

.cell-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--sport-sub);
    margin-bottom: 6px;
    transition: var(--transition);
}

.cell-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}

.cell-avatar {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.15);
}

.cell-avatar:hover { transform: scale(1.2); z-index: 5; }

.cell-more {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--sport-card2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--sport-muted);
    border: 1px solid var(--sport-line);
}

/* 连续打卡火焰标记 */
.streak-flame {
    position: absolute;
    top: 5px; right: 7px;
    font-size: 13px;
    filter: drop-shadow(0 0 4px rgba(255,107,0,0.8));
    animation: flame-flicker 1.5s infinite alternate;
}

@keyframes flame-flicker {
    0%   { transform: scale(1)    rotate(-3deg); opacity: 0.9; }
    100% { transform: scale(1.15) rotate(3deg);  opacity: 1; }
}

/* ============================
   Leaderboard & Records (两栏布局)
   ============================ */
.bottom-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

/* ---- Leaderboard ---- */
.leaderboard-section {
    background: var(--sport-card);
    border-radius: var(--radius);
    border: 1px solid var(--sport-line);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sport-line);
    background: var(--sport-card2);
}

.section-header-icon { font-size: 18px; }

.section-header h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: white;
    flex: 1;
}

/* leaderboard 样式已移至文件末尾新版本 */

/* ---- Records ---- */
.records-section {
    background: var(--sport-card);
    border-radius: var(--radius);
    border: 1px solid var(--sport-line);
    overflow: hidden;
}

.records-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 440px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sport-line) transparent;
}

.records-list::-webkit-scrollbar { width: 4px; }
.records-list::-webkit-scrollbar-track { background: transparent; }
.records-list::-webkit-scrollbar-thumb { background: var(--sport-line); border-radius: 4px; }

.record-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border: 1px solid transparent;
    transition: var(--transition);
    position: relative;
}
.record-item:hover { border-color: var(--sport-line); background: rgba(255,107,0,0.05); }
.record-item:hover .record-delete-btn { opacity: 1; }

.record-item:hover { border-color: var(--sport-line); background: rgba(255,107,0,0.05); }

.record-avatar {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px; font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.record-info { flex: 1; min-width: 0; }

.record-name-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}

.record-name { font-size: 14px; font-weight: 700; color: var(--sport-light); }
.record-emoji { font-size: 15px; }

.record-date {
    font-size: 11px;
    color: var(--sport-muted);
    margin-bottom: 5px;
}

.record-note {
    font-size: 12px;
    color: var(--sport-sub);
    word-break: break-all;
    margin-top: 3px;
}

/* Task Badges */
.task-badges {
    display: flex; gap: 5px; flex-wrap: wrap;
}

.task-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-family: 'Barlow Condensed', sans-serif;
}

.task-badge.done   { background: rgba(0,208,132,0.15); color: var(--sport-green); border: 1px solid rgba(0,208,132,0.3); }
.task-badge.undone { background: rgba(255,255,255,0.04); color: var(--sport-muted); border: 1px solid var(--sport-line); }

/* Empty tip */
.empty-tip {
    text-align: center;
    color: var(--sport-muted);
    font-size: 14px;
    padding: 36px 0;
}

/* ============================
   Modal
   ============================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 6, 14, 0.75);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.28s ease;
    padding: 16px;
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
    background: var(--sport-card);
    border: 1px solid rgba(255,107,0,0.25);
    border-radius: 18px;
    width: 100%;
    max-width: 470px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,107,0,0.1);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-day { max-width: 500px; }

/* 含 Tab 的主打卡弹窗 — 需要 flex 列布局，让面板自适应高度 */
.modal-main-checkin {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-main-checkin .modal-header {
    flex-shrink: 0;
}
.modal-main-checkin .checkin-tabs {
    flex-shrink: 0;
}
.modal-main-checkin .checkin-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.modal-main-checkin .checkin-panel .modal-body {
    flex: 1;
    max-height: none;      /* 取消固定 max-height，由 panel 本身控制 */
    overflow-y: auto;
}
.modal-main-checkin .checkin-panel .modal-footer {
    flex-shrink: 0;
}

.modal-header {
    padding: 18px 22px 14px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--sport-line);
    background: var(--sport-card2);
}

.modal-header h3 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px; font-weight: 800;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: white;
    display: flex; align-items: center; gap: 8px;
}

.modal-header h3 i { color: var(--sport-orange); }

.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--sport-muted); font-size: 17px;
    padding: 4px; border-radius: 6px;
    transition: var(--transition);
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
}

.modal-close:hover { background: rgba(255,255,255,0.07); color: white; }

.modal-body {
    padding: 20px 22px;
    max-height: 62vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sport-line) transparent;
}

.modal-footer {
    padding: 14px 22px 18px;
    display: flex; gap: 10px; justify-content: flex-end;
    border-top: 1px solid var(--sport-line);
}

/* ============================
   Form (in modal)
   ============================ */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--sport-muted); margin-bottom: 8px;
}

.required { color: var(--sport-orange); }

.task-tip {
    font-size: 10px; font-weight: 600; letter-spacing: 0;
    text-transform: none;
    background: rgba(255,208,0,0.12);
    color: var(--sport-yellow);
    padding: 2px 8px; border-radius: 4px;
    margin-left: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sport-line);
    border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
    color: var(--sport-light);
    background: var(--sport-card2);
    transition: var(--transition);
    outline: none; resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--sport-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--sport-orange);
    box-shadow: 0 0 0 3px rgba(255,107,0,0.15);
}

/* ============================
   Profile Management Modal
   ============================ */
.modal-profiles {
    max-width: 520px;
}

.profile-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    min-height: 20px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 16px 8px;
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border: 1px solid var(--sport-line);
    position: relative;
    transition: var(--transition);
}

.profile-card:hover { border-color: rgba(255,107,0,0.3); }

.profile-avatar-big {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: var(--transition);
}

.profile-card-name {
    font-size: 13px; font-weight: 700;
    color: var(--sport-light); text-align: center;
    max-width: 90px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}

.profile-card-meta { font-size: 10px; color: var(--sport-muted); }

.profile-delete-btn {
    position: absolute; top: 5px; right: 5px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,45,45,0.15); border: none;
    cursor: pointer; color: #ff6b6b; font-size: 9px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.profile-card:hover .profile-delete-btn { opacity: 1; }
.profile-delete-btn:hover { background: rgba(255,45,45,0.35); }

.add-profile-section {
    border-top: 1px solid var(--sport-line);
    padding-top: 20px;
}

.add-profile-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px; font-weight: 800;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--sport-sub); margin-bottom: 14px;
    display: flex; align-items: center; gap: 7px;
}
.add-profile-title i { color: var(--sport-orange); }
.add-profile-form { display: flex; flex-direction: column; gap: 0; }
.apf-row { display: flex; gap: 10px; }

/* Avatar Emoji Picker */
.avatar-emoji-picker {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.av-emoji-btn {
    width: 40px; height: 40px; border-radius: 10px;
    border: 2px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.av-emoji-btn:hover { border-color: var(--sport-orange); transform: scale(1.1); }
.av-emoji-btn.active {
    border-color: var(--sport-orange);
    background: rgba(255,107,0,0.15);
    box-shadow: var(--glow-orange);
}

/* Color Picker */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.color-btn {
    width: 28px; height: 28px; border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer; transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.color-btn:hover { transform: scale(1.15); }
.color-btn.active {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.4), 0 2px 8px rgba(0,0,0,0.4);
    transform: scale(1.1);
}

/* Profile Preview */
.profile-preview {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    background: var(--sport-card2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--sport-line);
    margin-bottom: 14px;
}
.preview-label { font-size: 11px; color: var(--sport-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.preview-name  { font-size: 16px; font-weight: 700; color: var(--sport-light); }

/* ============================
   Quick Zone — Members
   ============================ */
.quick-members-wrap {
    display: flex; flex-direction: column; gap: 8px;
    flex: 1; min-width: 0;
}
.quick-members-label {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--sport-muted);
}
.quick-members-list {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    max-height: 200px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--sport-line) transparent;
    padding: 2px;
}
.quick-members-list::-webkit-scrollbar { width: 3px; }
.quick-members-list::-webkit-scrollbar-thumb { background: var(--sport-line); border-radius: 4px; }
.members-loading { color: var(--sport-muted); font-size: 13px; padding: 8px 0; }

/* Member card */
.qm-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; padding: 10px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; transition: var(--transition);
    min-width: 68px; position: relative; user-select: none;
}
.qm-card:hover { border-color: rgba(255,107,0,0.4); background: rgba(255,107,0,0.07); }
.qm-card.selected { border-color: var(--sport-orange); background: rgba(255,107,0,0.12); box-shadow: var(--glow-orange); }
.qm-card.today-done { border-color: var(--sport-green); background: rgba(0,208,132,0.07); }
.qm-card.today-done.selected { border-color: var(--sport-green); box-shadow: var(--glow-green); }

.qm-avatar {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; position: relative;
}
.qm-avatar .done-badge {
    position: absolute; bottom: -4px; right: -4px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--sport-green);
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; color: white; font-weight: 700;
    border: 2px solid var(--sport-card);
}
.qm-name {
    font-size: 11px; font-weight: 700; color: var(--sport-sub);
    text-align: center; max-width: 64px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qm-card.selected .qm-name { color: var(--sport-orange); }
.qm-card.today-done .qm-name { color: var(--sport-green); }
.qm-streak { font-size: 10px; color: var(--sport-muted); }

.qm-card .select-ring {
    position: absolute; top: 4px; right: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--sport-line);
    background: transparent; transition: var(--transition);
}
.member-choice { position: relative; }
.member-choice > input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.member-choice:focus-within { outline: 2px solid var(--sport-orange); outline-offset: 3px; }
.member-choice:has(> input:disabled) { opacity: .65; cursor: not-allowed; }
.member-choice > input:disabled { cursor: not-allowed; }
.form-label { color: var(--sport-sub); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.qm-card.selected .select-ring { background: var(--sport-orange); border-color: var(--sport-orange); }

.qm-add-btn {
    display: flex; flex-direction: column; align-items: center;
    gap: 5px; padding: 10px 10px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--sport-line);
    background: transparent; cursor: pointer;
    transition: var(--transition); min-width: 68px;
    color: var(--sport-muted); font-size: 11px; font-weight: 700;
}
.qm-add-btn:hover { border-color: var(--sport-orange); color: var(--sport-orange); background: rgba(255,107,0,0.05); }
.qm-add-btn i { font-size: 20px; }

/* 全选按钮 — 快捷区 */
.qm-select-all-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; transition: var(--transition);
    font-size: 11px; font-weight: 700;
    color: var(--sport-muted);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}
.qm-select-all-btn:hover { border-color: var(--sport-orange); color: var(--sport-orange); }
.qm-select-all-btn.active {
    background: rgba(255,107,0,0.12);
    border-color: var(--sport-orange);
    color: var(--sport-orange);
}

/* 全选按钮 — 弹窗 */
.mm-select-all {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; transition: var(--transition);
    font-size: 12px; font-weight: 700;
    color: var(--sport-muted);
    flex-shrink: 0;
}
.mm-select-all:hover { border-color: var(--sport-orange); color: var(--sport-orange); }
.mm-select-all.active {
    background: rgba(255,107,0,0.12);
    border-color: var(--sport-orange);
    color: var(--sport-orange);
}

/* Quick right panel */
.quick-right {
    display: flex; flex-direction: column;
    gap: 10px; min-width: 150px; flex-shrink: 0;
}

/* Modal Member Picker */
.modal-member-picker {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0;
    align-items: center;
}
.mm-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 50px;
    border: 2px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; transition: var(--transition); user-select: none;
}
.mm-item:hover { border-color: rgba(255,107,0,0.4); }
.mm-item.selected { border-color: var(--sport-orange); background: rgba(255,107,0,0.1); }
.mm-avatar { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mm-name { font-size: 13px; font-weight: 700; color: var(--sport-sub); }
.mm-item.selected .mm-name { color: var(--sport-orange); }

/* Ghost Button */
.btn-ghost {
    background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-sm);
}
.btn-ghost:hover { background: rgba(255,255,255,0.14); color: white; }

/* Task checks */
.task-checks { display: flex; gap: 10px; }

.task-check-item {
    flex: 1;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
}

.task-check-item input[type="checkbox"] { display: none; }

.task-check-item:hover { border-color: rgba(255,107,0,0.35); }

.task-check-item.checked {
    border-color: var(--sport-green);
    background: rgba(0,208,132,0.08);
    box-shadow: 0 0 12px rgba(0,208,132,0.2);
}

.task-check-box {
    width: 22px; height: 22px; border-radius: 5px;
    border: 2px solid var(--sport-line);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: var(--transition);
    background: var(--sport-card);
}

.task-check-box i { font-size: 10px; color: transparent; transition: var(--transition); }

.task-check-item.checked .task-check-box {
    background: var(--sport-green);
    border-color: var(--sport-green);
}

.task-check-item.checked .task-check-box i { color: white; }

.task-check-icon { font-size: 22px; line-height: 1; }
.task-check-name { font-size: 15px; font-weight: 700; color: var(--sport-light); }
.task-check-desc { display: none; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

.task-check-item.shake {
    animation: shake 0.4s ease;
    border-color: var(--sport-red) !important;
    background: rgba(255,45,45,0.07) !important;
}

.quick-task-btn.shake {
    animation: shake 0.4s ease;
    border-color: var(--sport-red) !important;
    background: rgba(255,45,45,0.07) !important;
}

/* Emoji */
.emoji-picker { display: flex; flex-wrap: wrap; gap: 7px; }

.emoji-btn {
    width: 42px; height: 42px;
    border-radius: 8px;
    border: 2px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer; font-size: 19px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.emoji-btn:hover { border-color: var(--sport-orange); transform: scale(1.12); }
.emoji-btn.active {
    border-color: var(--sport-orange);
    background: rgba(255,107,0,0.15);
    box-shadow: var(--glow-orange);
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    font-size: 14px; font-weight: 700;
    font-family: inherit;
    transition: var(--transition); outline: none; white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sport-orange), #ff9500);
    color: white;
    box-shadow: var(--glow-orange);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(255,107,0,0.6); }

.btn-secondary {
    background: var(--sport-card2);
    color: var(--sport-sub);
    border: 1px solid var(--sport-line);
}

.btn-secondary:hover { background: rgba(255,255,255,0.07); color: white; }

/* ============================
   Day Modal
   ============================ */
.day-summary {
    display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}

.day-summary-stat {
    display: flex; align-items: center; gap: 6px;
    background: var(--sport-card2);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px; font-weight: 700;
    color: var(--sport-muted);
    border: 1px solid var(--sport-line);
}

.day-summary-stat .stat-icon { font-size: 15px; }
.day-summary-stat.green { color: var(--sport-green); border-color: rgba(0,208,132,0.3); background: rgba(0,208,132,0.07); }
.day-summary-stat.orange { color: var(--sport-orange); border-color: rgba(255,107,0,0.3); background: rgba(255,107,0,0.07); }

.day-checkin-list { display: flex; flex-direction: column; gap: 8px; }

.day-checkin-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border: 1px solid var(--sport-line);
    position: relative;
    transition: var(--transition);
}
.day-checkin-item:hover { border-color: rgba(255,45,45,0.25); }
.day-checkin-item:hover .checkin-delete-btn { opacity: 1; }

/* 取消打卡按钮 — 日期详情弹窗 */
.checkin-delete-btn {
    position: absolute;
    top: 50%; right: 12px;
    transform: translateY(-50%);
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,45,45,0.3);
    background: rgba(255,45,45,0.08);
    color: #ff6b6b;
    font-size: 12px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}
.checkin-delete-btn:hover {
    background: rgba(255,45,45,0.22);
    border-color: rgba(255,45,45,0.6);
    color: #ff2d2d;
    transform: translateY(-50%) scale(1.1);
}
.checkin-delete-btn:disabled { opacity: 0.4 !important; cursor: not-allowed; }

/* 取消打卡按钮 — 记录列表 */
.record-delete-btn {
    position: absolute;
    top: 50%; right: 12px;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(255,45,45,0.25);
    background: rgba(255,45,45,0.07);
    color: #ff6b6b;
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}
.record-delete-btn:hover {
    background: rgba(255,45,45,0.22);
    border-color: rgba(255,45,45,0.6);
    color: #ff2d2d;
    transform: translateY(-50%) scale(1.1);
}
.record-delete-btn:disabled { opacity: 0.4 !important; cursor: not-allowed; }

.day-checkin-avatar {
    width: 38px; height: 38px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px; font-weight: 900;
    color: white; flex-shrink: 0;
}

.day-checkin-info .name-row {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; font-size: 14px; color: var(--sport-light);
    margin-bottom: 5px;
}

.day-checkin-info .note {
    font-size: 12px; color: var(--sport-muted); margin-top: 3px;
}

/* ============================
   Toast
   ============================ */
.toast {
    position: fixed;
    bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: var(--sport-card2);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    z-index: 9999; opacity: 0;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    white-space: nowrap;
    border: 1px solid var(--sport-line);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: linear-gradient(135deg, #00b863, #00d084); border: none; }
.toast.error   { background: linear-gradient(135deg, #cc0000, #ff2d2d); border: none; }
.toast.info    { background: linear-gradient(135deg, #333, #555); }

/* ============================
   Loading
   ============================ */
.loading-spinner {
    text-align: center; padding: 40px;
    color: var(--sport-muted); font-size: 14px;
}

.loading-spinner::before {
    content: '';
    display: block; width: 32px; height: 32px;
    border-radius: 50%;
    border: 3px solid var(--sport-line);
    border-top-color: var(--sport-orange);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

/* ============================
   Confetti Animation
   ============================ */
@keyframes confetti-fall {
    0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    top: 0;
    width: 8px; height: 8px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 9998;
    animation: confetti-fall linear forwards;
}

/* ============================
   Period 周期相关
   ============================ */

/* 导航栏周期无数据提示 */
.period-empty-tip {
    font-size: 12px;
    color: var(--sport-muted);
    padding: 8px 12px;
    font-style: italic;
}

/* 周期标题区 */
.period-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.period-date-range {
    font-size: 12px;
    color: var(--sport-muted);
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.5px;
}

/* 周期进度条 */
.period-progress-bar {
    background: var(--sport-card);
    border: 1px solid var(--sport-line);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.ppb-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ppb-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--sport-orange);
    white-space: nowrap;
    min-width: 48px;
}

.ppb-track {
    flex: 1;
    height: 8px;
    background: var(--sport-card2);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--sport-line);
}

.ppb-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sport-orange), var(--sport-yellow));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 8px rgba(255,107,0,0.4);
}

.ppb-days {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--sport-sub);
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}

/* 周期设置弹窗 */
.modal-period {
    max-width: 520px;
}

.period-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sport-line) transparent;
}

.period-list::-webkit-scrollbar { width: 3px; }
.period-list::-webkit-scrollbar-thumb { background: var(--sport-line); border-radius: 3px; }

.period-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border: 1px solid var(--sport-line);
    transition: var(--transition);
    position: relative;
}

.period-item:hover { border-color: rgba(255,107,0,0.3); }

.period-item.active-period {
    border-color: var(--sport-orange);
    background: rgba(255,107,0,0.08);
}

.period-item-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: rgba(255,107,0,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.period-item.active-period .period-item-icon {
    background: var(--sport-orange);
}

.period-item-info { flex: 1; min-width: 0; }

.period-item-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--sport-light);
    display: flex;
    align-items: center;
    gap: 7px;
}

.period-current-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--sport-orange);
    color: white;
    padding: 1px 7px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.period-ended-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(255,255,255,0.07);
    color: var(--sport-muted);
    padding: 1px 7px;
    border-radius: 3px;
}

.period-upcoming-badge {
    font-size: 10px;
    font-weight: 700;
    background: rgba(0,102,255,0.2);
    color: #74B9FF;
    padding: 1px 7px;
    border-radius: 3px;
}

.period-item-dates {
    font-size: 11px;
    color: var(--sport-muted);
    margin-top: 2px;
    font-family: 'Barlow Condensed', sans-serif;
    letter-spacing: 0.3px;
}

.period-item-days-big {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--sport-orange);
    flex-shrink: 0;
}

.period-delete-btn {
    width: 26px; height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(255,45,45,0.25);
    background: rgba(255,45,45,0.07);
    color: #ff6b6b;
    font-size: 10px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
}
.period-item:hover .period-delete-btn { opacity: 1; }
.period-delete-btn:hover { background: rgba(255,45,45,0.22); color: #ff2d2d; }

/* 添加周期表单 */
.add-period-section {
    border-top: 1px solid var(--sport-line);
    padding-top: 18px;
}

.add-period-form { display: flex; flex-direction: column; gap: 0; }

.period-dates-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 18px;
}

.period-dates-arrow {
    font-size: 18px;
    color: var(--sport-muted);
    padding-bottom: 10px;
    flex-shrink: 0;
}

/* 快速生成按钮 */
.quick-period-btns {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.qp-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    color: var(--sport-sub);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.qp-btn:hover {
    border-color: var(--sport-orange);
    color: var(--sport-orange);
    background: rgba(255,107,0,0.08);
}

/* 周期预览 */
.period-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,107,0,0.08);
    border: 1px solid rgba(255,107,0,0.25);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--sport-orange);
}

/* 日历格跨月灰化 */
.calendar-cell.out-of-period {
    background: rgba(0,0,0,0.18);
    cursor: default;
    opacity: 0.45;
}
.calendar-cell.out-of-period:hover { background: rgba(0,0,0,0.18); }

.calendar-cell.period-start .cell-day,
.calendar-cell.period-end .cell-day {
    background: var(--sport-orange);
    color: white;
    box-shadow: var(--glow-orange);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px) {
    .bottom-grid { grid-template-columns: 1fr; }
    .leaderboard-section { order: -1; }
}

@media (max-width: 768px) {
    .header-inner { padding: 12px 14px 8px; flex-wrap: wrap; gap: 10px; }
    .header-title h1 { font-size: 18px; }
    .header-actions { gap: 6px; }
    .stats-bar { padding: 6px 14px 14px; }
    .stat-num { font-size: 22px; }
    .quick-card { padding: 14px; gap: 14px; flex-wrap: wrap; }
    .quick-date-info { min-width: 70px; }
    .quick-date-big { font-size: 28px; }
    .quick-members-wrap { min-width: calc(100% - 84px); }
    .quick-right { min-width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; }
    .quick-tasks { flex: 1; }
    .btn-punch { flex: 1; }
    .main-content { padding: 20px 12px 60px; }
    .calendar-cell { min-height: 68px; padding: 6px 5px; }
    .cell-day { width: 24px; height: 24px; font-size: 13px; }
    .cell-avatar { width: 20px; height: 20px; font-size: 10px; }
    .profile-list { grid-template-columns: repeat(auto-fill, minmax(80px,1fr)); }
    .modal-profiles { max-width: 100%; }
}

@media (max-width: 480px) {
    .calendar-cell { min-height: 55px; padding: 5px 4px; }
    .cell-day { width: 22px; height: 22px; font-size: 12px; }
    .cell-avatar { width: 17px; height: 17px; font-size: 9px; }
    .calendar-weekdays div { font-size: 11px; padding: 9px 0; }
    .qm-avatar { width: 36px; height: 36px; font-size: 20px; }
    .qm-card { min-width: 60px; }
}

/* ============================================================
   周期日历 — 多月视图
   ============================================================ */

/* 多月模式时，外层容器变普通块 */
.calendar-grid.multi-month {
    display: block !important;
    background: transparent;
    border: none;
    padding: 0;
}

/* 每个月的区块 */
.period-month-section {
    margin-bottom: 28px;
    background: var(--sport-card);
    border: 1px solid var(--sport-line);
    border-radius: var(--radius);
    overflow: hidden;
}

.period-month-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sport-orange);
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--sport-line);
    background: rgba(255,107,0,0.05);
}

/* 小号星期头 */
.calendar-weekdays-sm {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 2px;
    background: var(--sport-card);
}
.calendar-weekdays-sm div {
    text-align: center;
    padding: 8px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--sport-muted);
    text-transform: uppercase;
}

/* 子日历网格（在多月section内） */
.calendar-grid-sub {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 2px;
    background: var(--sport-card);
    border: none !important;
    border-radius: 0 !important;
}

/* ---- 周期标题区域 ---- */
.period-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.period-title-wrap h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    color: white;
    text-transform: uppercase;
}
.period-date-range {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--sport-muted);
    letter-spacing: 1px;
}

/* ---- 周期状态标签 ---- */
.period-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-left: 6px;
}
.period-status.active   { background: rgba(0,208,132,0.2); color: var(--sport-green); border: 1px solid rgba(0,208,132,0.3); }
.period-status.ended    { background: rgba(255,255,255,0.06); color: var(--sport-muted); border: 1px solid var(--sport-line); }
.period-status.upcoming { background: rgba(0,102,255,0.15); color: #74B9FF; border: 1px solid rgba(0,102,255,0.25); }

/* ---- period-item 内的小字段 ---- */
.period-item-cnt {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--sport-orange);
    margin-left: 6px;
}
.period-item-days {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--sport-sub);
    background: rgba(255,255,255,0.06);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

/* ---- 周期空提示 ---- */
.period-empty-tip {
    color: var(--sport-muted);
    font-size: 12px;
    padding: 8px 16px;
    font-style: italic;
}

/* ============================================================
   排行榜 — 段位制全新样式
   ============================================================ */

/* 排行榜整体容器留有滚动 */
.leaderboard-list {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 700px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sport-line) transparent;
}
.leaderboard-list::-webkit-scrollbar { width: 3px; }
.leaderboard-list::-webkit-scrollbar-thumb { background: var(--sport-line); border-radius: 3px; }


/* ==== 第一名大卡（独立置顶） ==== */
.lb-no1-card {
    border-radius: var(--radius);
    border: 2px solid var(--tier-color, #FF6B00);
    background: rgba(30, 35, 48, 0.96);
    box-shadow: 0 0 28px var(--tier-glow, rgba(255,107,0,0.35));
    overflow: visible;
    position: relative;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.lb-no1-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 32px var(--tier-glow, rgba(255,107,0,0.45));
}
/* 顶部横幅 */
.lb-no1-banner {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,208,0,0.06);
    border-radius: var(--radius) var(--radius) 0 0;
}
.lb-no1-crown-icon { font-size: 16px; }
.lb-no1-crown-txt {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px; font-weight: 900;
    letter-spacing: 3px; text-transform: uppercase;
    color: #FFD000;
}
.lb-no1-period-lbl {
    margin-left: auto;
    font-size: 10px;
    color: var(--sport-muted);
    background: rgba(255,255,255,0.07);
    padding: 2px 8px; border-radius: 10px;
}
/* 主体内容 */
.lb-no1-body {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 16px;
}
/* 头像区 */
.lb-no1-av-wrap { position: relative; flex-shrink: 0; }
.lb-no1-av {
    width: 60px; height: 60px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    overflow: hidden;
    border: 2px solid var(--tier-color, #FF6B00);
    box-shadow: 0 0 14px var(--tier-glow, rgba(255,107,0,0.45));
}
.lb-no1-av img { width:100%; height:100%; object-fit:cover; border-radius: inherit; }
.lb-no1-tier-pin {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    border: 2px solid #111;
    z-index: 2;
}
/* 信息区 */
.lb-no1-info { flex: 1; min-width: 0; }
.lb-no1-name {
    font-size: 17px; font-weight: 800;
    color: #ffffff;
    margin-bottom: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-no1-tier-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
}
.lb-no1-badges { display: flex; gap: 5px; flex-wrap: wrap; }
/* 分数区 */
.lb-no1-score {
    flex-shrink: 0;
    display: flex; flex-direction: column;
    align-items: flex-end; gap: 0;
}
.lb-no1-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 44px; font-weight: 900; line-height: 1;
}
.lb-no1-num-sub {
    font-size: 11px; color: var(--sport-muted);
    text-align: right; margin-top: -2px;
}
.lb-no1-prize {
    margin-top: 7px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 6px;
}
.lb-no1-prize-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px; font-weight: 900;
    color: #FFD000;
    letter-spacing: 0.5px;
}
.lb-no1-prize-sub {
    font-size: 9px; color: var(--sport-muted);
}

/* TOP 奖 badge */
.lb-badge.top-bonus {
    background: rgba(255,208,0,0.15);
    color: #FFD000;
    border: 1px solid rgba(255,208,0,0.3);
    font-weight: 800;
}

/* ==== 段位分隔标题 ==== */
.lb-tier-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border-left: 3px solid var(--tier-color, #FF6B00);
    margin-top: 4px;
}
.lb-tier-icon {
    width: 28px; height: 28px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.lb-tier-label { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-tier-name  { font-size: 14px; font-weight: 800; letter-spacing: 0.5px; }
.lb-tier-range { font-size: 11px; color: var(--sport-muted); }
.lb-tier-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lb-tier-reward {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px; font-weight: 900;
    color: #FFD000;
    letter-spacing: 0.5px;
}
.lb-tier-no-reward {
    font-size: 11px; color: var(--sport-muted);
}
.lb-tier-cnt {
    font-size: 11px; color: var(--sport-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 7px; border-radius: 10px;
}

/* ==== 普通成员行 ==== */
.lb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px 9px 28px;   /* 左缩进表示子项 */
    border-radius: var(--radius-sm);
    background: var(--sport-card2);
    border: 1px solid transparent;
    transition: var(--transition);
}
.lb-item:hover { border-color: var(--sport-line); }
.lb-rank {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px; font-weight: 900;
    width: 22px; text-align: center;
    flex-shrink: 0;
}
.lb-avatar {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: 13px; font-weight: 700; color: var(--sport-light); }
.lb-meta { display: flex; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.lb-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 600;
    padding: 1px 6px; border-radius: 3px;
    background: rgba(255,107,0,0.15); color: var(--sport-orange);
}
.lb-badge.streak  { background: rgba(255,107,0,0.15); color: var(--sport-orange); }
.lb-badge.early   { background: rgba(0,208,132,0.12); color: var(--sport-green); }
.lb-badge.sport   { background: rgba(0,102,255,0.15); color: #74B9FF; }
.lb-badge.next-tier {
    background: rgba(255,255,255,0.06); color: var(--sport-muted);
    font-style: italic;
}
.lb-total {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px; font-weight: 900;
    flex-shrink: 0;
}

/* ==== 奖励规则卡 ==== */
.lb-rules-card {
    margin-top: 6px;
    border-radius: var(--radius);
    background: var(--sport-card2);
    border: 1px solid var(--sport-line);
    padding: 14px 16px;
}
.lb-rules-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px; font-weight: 800;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--sport-muted);
    margin-bottom: 10px;
}
.lb-rules-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.lb-rule-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lb-rule-icon {
    width: 22px; height: 22px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.lb-rule-name {
    font-size: 13px; font-weight: 700;
    min-width: 68px;
}
.lb-rule-req {
    flex: 1;
    font-size: 11px; color: var(--sport-muted);
    font-family: 'Barlow Condensed', sans-serif;
}
.lb-rule-prize {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px; font-weight: 900;
    color: #FFD000;
}
.lb-rules-extra {
    font-size: 12px;
    color: var(--sport-sub);
    padding: 8px 10px;
    background: rgba(255,208,0,0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,208,0,0.15);
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 6px;
}
/* 段位列表里的第一名高亮行 */
.lb-item.lb-item-top {
    background: color-mix(in srgb, var(--tier-color, #FF6B00) 10%, var(--sport-card2));
    border-color: color-mix(in srgb, var(--tier-color, #FF6B00) 35%, transparent);
}
.lb-item.lb-item-top:hover {
    border-color: color-mix(in srgb, var(--tier-color, #FF6B00) 60%, transparent);
}
.lb-top-tag {
    display: inline-block;
    font-size: 10px; font-weight: 800;
    background: linear-gradient(90deg, #FFD000, #FF9500);
    color: #000;
    padding: 1px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 5px;
    vertical-align: middle;
}
.lb-badge.top-bonus {
    background: rgba(255,208,0,0.18);
    color: #FFD000;
    font-weight: 700;
}

/* 普通成员行右侧（打卡次数 + 实际奖金） */
.lb-item-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}
.lb-earn {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px; font-weight: 800;
    color: #FFD000;
    letter-spacing: 0.3px;
}
.lb-earn-tip {
    font-size: 9px;
    color: var(--sport-muted);
    text-align: right;
    white-space: nowrap;
}
/* 出款 & 净收益（成员行） */
.lb-earn-paid {
    font-size: 9px;
    color: #F87171;
    text-align: right;
    white-space: nowrap;
    opacity: 0.85;
}
.lb-earn-paid-only {
    /* 苦海等无收入但有出款 */
    margin-top: 2px;
    font-weight: 600;
}
.lb-earn-net {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px; font-weight: 900;
    text-align: right;
    letter-spacing: 0.3px;
    margin-top: 1px;
}

/* 第一名大卡 出款 & 净收益 */
.lb-no1-prize-paid {
    font-size: 9px;
    color: #F87171;
    text-align: right;
    margin-top: 3px;
    opacity: 0.9;
    white-space: nowrap;
}
.lb-no1-prize-net {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px; font-weight: 900;
    text-align: right;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* 第一名大卡奖金明细 */
.lb-no1-prize-breakdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-top: 3px;
}
.lb-prize-row {
    font-size: 9px;
    color: var(--sport-sub);
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.lb-prize-row.top {
    color: #FFD000;
    font-weight: 700;
}
.lb-prize-split {
    color: var(--sport-muted);
    font-size: 8px;
}

/* =====================================================
   融合卡 — Fusion Card
   ===================================================== */

/* ── 主"打卡"按钮（橙色，保留兼容）── */
.btn-checkin-main {
    background: linear-gradient(135deg, #FF6B00, #ff9500);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 0 16px rgba(255,107,0,0.45);
    position: relative;
    letter-spacing: 0.3px;
}
.btn-checkin-main:hover {
    background: linear-gradient(135deg, #ff7d1a, #ffaa00);
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(255,107,0,0.65);
}
.btn-checkin-main:active { transform: translateY(0); }

/* ── 融合卡主按钮（紫色）── */
.btn-fusion-main {
    background: linear-gradient(135deg, #6C5CE7, #a855f7);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    box-shadow: 0 0 16px rgba(108,92,231,0.5);
    position: relative;
    letter-spacing: 0.3px;
}
.btn-fusion-main:hover {
    background: linear-gradient(135deg, #7c6cf7, #b56bff);
    transform: translateY(-1px);
    box-shadow: 0 0 26px rgba(168,85,247,0.7);
}
.btn-fusion-main:active { transform: translateY(0); }

/* ── 融合卡主弹窗 ── */
.modal-fusion-main {
    max-width: 500px;
    width: 96%;
}
.modal-fusion-main .modal-header {
    border-bottom-color: rgba(168,85,247,0.3);
    background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(168,85,247,0.08));
}
.modal-fusion-main .modal-header h3 {
    color: #a855f7 !important;
}
.modal-fusion-main .modal-footer {
    border-top-color: rgba(168,85,247,0.2);
}

/* ── 补卡弹窗 ── */
.modal-makeup {
    max-width: 470px;
    width: 96%;
}

/* 融合卡剩余角标（嵌入主按钮右上角） */
.fusion-remain-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(168,85,247,0.9);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 900;
    font-family: 'Barlow Condensed', sans-serif;
    border: 1.5px solid rgba(255,255,255,0.3);
    box-shadow: 0 0 8px rgba(168,85,247,0.6);
    margin-left: 2px;
}

/* ── Tab 切换栏 ── */
.checkin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid var(--sport-line);
    background: var(--sport-card);
    padding: 0 20px;
    flex-shrink: 0;
}
.checkin-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sport-muted);
    background: none;
    border: none;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: -1.5px;
    letter-spacing: 0.2px;
    position: relative;
}
.checkin-tab:hover {
    color: var(--sport-light);
}
.checkin-tab.active {
    color: var(--sport-orange);
    border-bottom-color: var(--sport-orange);
}
.checkin-tab[data-tab="fusion"].active {
    color: #a855f7;
    border-bottom-color: #a855f7;
}

/* Tab 上的角标（剩余次数） */
.fusion-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6C5CE7, #a855f7);
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 900;
    font-family: 'Barlow Condensed', sans-serif;
    padding: 0 5px;
    box-shadow: 0 0 8px rgba(168,85,247,0.5);
    animation: tabBadgePop 0.3s ease;
}
@keyframes tabBadgePop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── 面板容器 ── */
.checkin-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.checkin-panel .modal-body {
    flex: 1;
    overflow-y: auto;
}

/* ── 融合卡未开启提示 ── */
.fusion-disabled-tip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    text-align: center;
}

/* Header 融合卡按钮（旧版，保留兼容） */
.btn-fusion-header {
    background: linear-gradient(135deg, #6C5CE7, #a855f7);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 0 12px rgba(108,92,231,0.4);
}
.btn-fusion-header:hover {
    background: linear-gradient(135deg, #7c6cf7, #b56bff);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(108,92,231,0.6);
}
.fusion-remain-badge {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 12px;
    font-weight: 900;
    font-family: 'Barlow Condensed', sans-serif;
}

/* 周期表单 — 融合卡限制行 */
.fusion-limit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.fusion-limit-tip {
    font-size: 11px;
    color: var(--sport-muted);
    line-height: 1.4;
}

/* 融合卡弹窗 */
.modal-fusion {
    max-width: 480px;
    width: 94%;
}

/* 融合卡余量栏 */
.fusion-quota-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(108,92,231,0.12);
    border: 1px solid rgba(108,92,231,0.3);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.fusion-quota-label {
    font-size: 12px;
    color: var(--sport-sub);
    flex-shrink: 0;
}
.fusion-quota-used {
    font-size: 13px;
    font-weight: 700;
    color: #F87171;
    font-family: 'Barlow Condensed', sans-serif;
}
.fusion-quota-sep {
    color: var(--sport-muted);
}
.fusion-quota-total {
    font-size: 13px;
    font-weight: 700;
    color: var(--sport-sub);
    font-family: 'Barlow Condensed', sans-serif;
}
.fusion-quota-remain {
    margin-left: auto;
    font-size: 13px;
    font-weight: 900;
    color: #a855f7;
    font-family: 'Barlow Condensed', sans-serif;
    background: rgba(168,85,247,0.15);
    padding: 2px 10px;
    border-radius: 20px;
}

/* 成员选择列表 */
.fusion-member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fusion-member-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    color: var(--sport-sub);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.fusion-member-btn.active {
    border-color: #6C5CE7;
    background: rgba(108,92,231,0.18);
    color: #fff;
    box-shadow: 0 0 8px rgba(108,92,231,0.35);
}
.fusion-member-btn:hover {
    border-color: #a855f7;
    color: #fff;
}

/* 不完整打卡列表 */
.fusion-cards-wrap {
    margin-top: 12px;
}
.fusion-cards-title {
    font-size: 12px;
    color: var(--sport-sub);
    margin-bottom: 8px;
    padding: 0 2px;
}
.fusion-cards-hint {
    font-size: 12px;
    color: #a855f7;
    margin-bottom: 8px;
    min-height: 16px;
}
.fusion-cards-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
}

/* 单张不完整打卡条目 */
.fusion-card-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.fusion-card-item:hover {
    border-color: #6C5CE7;
    background: rgba(108,92,231,0.1);
}
.fusion-card-item.selected-early {
    border-color: #F59E0B;
    background: rgba(245,158,11,0.1);
}
.fusion-card-item.selected-exercise {
    border-color: #10B981;
    background: rgba(16,185,129,0.1);
}
.fusion-card-item.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.fusion-card-date {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--sport-light);
    min-width: 44px;
}
.fusion-card-tags {
    display: flex;
    gap: 5px;
    flex: 1;
}
.fusion-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.fusion-tag.early {
    background: rgba(245,158,11,0.2);
    color: #F59E0B;
    border: 1px solid rgba(245,158,11,0.3);
}
.fusion-tag.exercise {
    background: rgba(16,185,129,0.2);
    color: #10B981;
    border: 1px solid rgba(16,185,129,0.3);
}
.fusion-tag.missing {
    background: rgba(248,113,113,0.15);
    color: #F87171;
    border: 1px solid rgba(248,113,113,0.2);
}
.fusion-card-sel-label {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
.fusion-card-item.selected-early   .fusion-card-sel-label { background: rgba(245,158,11,0.3); color: #F59E0B; }
.fusion-card-item.selected-exercise .fusion-card-sel-label { background: rgba(16,185,129,0.3); color: #10B981; }

/* 融合预览 */
.fusion-selected-preview {
    margin-top: 12px;
    background: rgba(108,92,231,0.12);
    border: 1px solid rgba(108,92,231,0.35);
    border-radius: 10px;
    padding: 12px 14px;
}
.fusion-preview-title {
    font-size: 11px;
    color: var(--sport-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.fusion-preview-body {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.fusion-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--sport-card);
    border-radius: 8px;
    padding: 8px 12px;
    gap: 3px;
    font-size: 12px;
    border: 1px solid var(--sport-line);
}
.fusion-preview-arrow {
    font-size: 18px;
    color: #a855f7;
    font-weight: 900;
}
.fusion-preview-result {
    background: linear-gradient(135deg, rgba(108,92,231,0.25), rgba(168,85,247,0.15));
    border: 1.5px solid rgba(168,85,247,0.5);
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 12px;
}
.fusion-preview-result-label {
    font-size: 10px;
    color: #a855f7;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 确认按钮 */
.btn-fusion {
    background: linear-gradient(135deg, #6C5CE7, #a855f7);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-fusion:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c6cf7, #b56bff);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(108,92,231,0.5);
}
.btn-fusion:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 融合空状态 */
.fusion-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--sport-muted);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* 打卡记录里的融合标记 */
.fusion-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(108,92,231,0.25), rgba(168,85,247,0.2));
    color: #a855f7;
    border: 1px solid rgba(168,85,247,0.4);
    border-radius: 8px;
    padding: 1px 7px;
    margin-left: 4px;
}

/* 排行榜成员行融合角标 */
.lb-badge.fusion {
    background: rgba(108,92,231,0.2);
    color: #a855f7;
    border: 1px solid rgba(108,92,231,0.35);
}

/* 段位标题里的均分说明 */
.lb-tier-reward-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--sport-muted);
    margin-left: 3px;
}

/* 奖励规则卡里的实际到手列 */
.lb-rule-per {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px; font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
    padding: 1px 7px;
    border-radius: 4px;
}
.lb-rule-per.alone {
    background: rgba(255,208,0,0.15);
    color: #FFD000;
}
.lb-rule-per.shared {
    background: rgba(255,255,255,0.06);
    color: var(--sport-sub);
}
.lb-rule-per.empty {
    color: var(--sport-muted);
    background: none;
    font-weight: 400;
    font-size: 10px;
}

/* TOP奖均分提示 */
.lb-rules-shared-tip {
    color: var(--sport-orange);
    font-weight: 700;
    font-size: 11px;
}

/* 奖金池总额展示 */
.lb-rules-pool {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(255,208,0,0.07);
    border-radius: 8px;
    margin-bottom: 6px;
}
.lb-pool-item {
    font-size: 11px;
    font-weight: 700;
    color: var(--sport-sub);
    white-space: nowrap;
}
.lb-pool-x {
    font-size: 11px;
    color: var(--sport-muted);
}
.lb-pool-total {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px; font-weight: 900;
    color: #FFD000;
    text-shadow: 0 0 10px rgba(255,208,0,0.4);
    white-space: nowrap;
}
.lb-rules-pool-sub {
    font-size: 10px;
    color: var(--sport-muted);
    text-align: center;
    margin-bottom: 8px;
    opacity: 0.8;
}

/* lb-rules-note */
.lb-rules-note {
    font-size: 10px;
    color: var(--sport-muted);
    text-align: center;
    margin-top: 4px;
}

/* ============================================================
   氛围感 — 快捷打卡区励志口号 & 倒计时
   ============================================================ */
.quick-slogan {
    font-size: 11px;
    color: var(--sport-orange);
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.4;
    max-width: 160px;
    opacity: 0.9;
    animation: sloganFadeIn 0.8s ease;
}
@keyframes sloganFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 0.9; transform: translateY(0); }
}
.quick-countdown {
    margin-top: 5px;
    font-size: 11px;
    color: var(--sport-muted);
    background: rgba(255,107,0,0.1);
    border: 1px solid rgba(255,107,0,0.2);
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-block;
    max-width: 160px;
}
.quick-countdown strong {
    color: var(--sport-orange);
    font-size: 13px;
}

/* ============================================================
   氛围感 — 排行榜激励横幅
   ============================================================ */
.lb-motivate-banner {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background: linear-gradient(90deg,
        rgba(255,107,0,0.12) 0%,
        rgba(255,107,0,0.04) 100%);
    border-left: 3px solid var(--banner-color, var(--sport-orange));
    position: relative;
    overflow: hidden;
    animation: bannerSlideIn 0.5s ease;
}
@keyframes bannerSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}
.lb-motivate-banner::after {
    content: '🔥';
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.15;
}
.lb-motivate-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--sport-light);
    line-height: 1.4;
}

/* 空榜时的鼓励提示 */
.lb-empty-motivate {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 16px;
    gap: 8px;
}
.lb-empty-icon  { font-size: 36px; }
.lb-empty-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px; font-weight: 800;
    color: var(--sport-light);
    letter-spacing: 0.5px;
}
.lb-empty-sub {
    font-size: 12px;
    color: var(--sport-muted);
    text-align: center;
}

/* 最后5天倒计时紧迫横幅 */
.lb-urgent-banner {
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #FF6B00;
    background: rgba(255,107,0,0.1);
    border: 1px dashed rgba(255,107,0,0.4);
    animation: urgentPulse 2s ease-in-out infinite;
}
@keyframes urgentPulse {
    0%, 100% { border-color: rgba(255,107,0,0.4); background: rgba(255,107,0,0.08); }
    50%       { border-color: rgba(255,107,0,0.8); background: rgba(255,107,0,0.16); }
}
.lb-urgent-banner strong {
    font-size: 15px;
    color: #FF4500;
}

/* ============================================================
   补卡弹窗 — 新增样式
   ============================================================ */

/* 弹窗头部 */
.modal-header-left {
    display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}
.modal-header-icon { font-size: 22px; flex-shrink: 0; }
.modal-header h3   { font-size: 15px; font-weight: 800; color: var(--sport-light); margin: 0; }
.modal-header-sub  { font-size: 11px; color: var(--sport-muted); margin-top: 1px; }

/* 日期选择栏 */
.modal-date-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: rgba(255,107,0,0.06);
    border-bottom: 1px solid var(--sport-line);
}
.modal-date-picker-wrap {
    display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.modal-date-label {
    font-size: 11px; font-weight: 700;
    color: var(--sport-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.modal-date-input {
    background: var(--sport-card2);
    border: 1.5px solid var(--sport-line);
    border-radius: var(--radius-sm);
    color: var(--sport-light);
    padding: 8px 10px;
    font-size: 14px; font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.modal-date-input:focus {
    outline: none;
    border-color: var(--sport-orange);
    box-shadow: 0 0 0 3px rgba(255,107,0,0.15);
}

/* 日期预览卡 */
.modal-date-preview {
    display: flex; align-items: center; gap: 10px;
    background: var(--sport-card2);
    border: 1px solid var(--sport-line);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    min-width: 140px;
}
.mdp-day {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px; font-weight: 900; line-height: 1;
    color: var(--sport-orange);
    flex-shrink: 0;
}
.mdp-info { display: flex; flex-direction: column; gap: 3px; }
.mdp-weekday { font-size: 11px; color: var(--sport-sub); }
.mdp-tag     { display: flex; flex-wrap: wrap; gap: 4px; }

/* 日期标签 */
.mdp-tag-badge {
    font-size: 10px; font-weight: 800;
    padding: 2px 7px; border-radius: 4px;
    letter-spacing: 0.3px;
}
.mdp-tag-badge.today  { background: rgba(0,208,132,0.15); color: #00D084; }
.mdp-tag-badge.makeup { background: rgba(245,158,11,0.15); color: #F59E0B; }
.mdp-tag-badge.future { background: rgba(59,130,246,0.12); color: #3B82F6; }

/* 成员选择器 — 已打卡状态 */
.mm-item.already-checked {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(255,255,255,0.03) !important;
}
.mm-name-wrap {
    display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.mm-done-tag {
    font-size: 9px; font-weight: 700;
    color: #00D084;
    background: rgba(0,208,132,0.1);
    padding: 1px 5px; border-radius: 3px;
    width: fit-content;
}

/* ============================================================
   记录列表 — 补卡样式
   ============================================================ */
.record-item.record-makeup {
    border-left: 3px solid #F59E0B;
    background: rgba(245,158,11,0.04);
}
.record-makeup-tag {
    font-size: 10px; font-weight: 800;
    color: #F59E0B;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    padding: 1px 6px; border-radius: 4px;
    margin-left: 4px;
    white-space: nowrap;
}
.record-date-row {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px; margin: 3px 0;
}
.record-date-main {
    font-size: 11px; color: var(--sport-muted);
    display: flex; align-items: center; gap: 4px;
}
.record-date-main i { color: var(--sport-orange); font-size: 10px; }
.record-makeup-time {
    font-size: 10px; font-weight: 600;
    color: #F59E0B;
    background: rgba(245,158,11,0.1);
    padding: 1px 6px; border-radius: 3px;
    white-space: nowrap;
}
.record-submit-time {
    font-size: 10px; color: var(--sport-muted);
    white-space: nowrap;
}

/* ============================================================
   日期详情弹窗 — 补卡样式
   ============================================================ */
.day-modal-tag {
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 4px;
    margin-left: 8px; vertical-align: middle;
}
.day-modal-tag.today  { background: rgba(0,208,132,0.15); color: #00D084; }
.day-modal-tag.past   { background: rgba(107,114,128,0.15); color: var(--sport-muted); }
.day-modal-tag.future { background: rgba(59,130,246,0.12); color: #3B82F6; }

.day-summary-stat.makeup {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.3);
    color: #F59E0B;
}

.day-checkin-item.day-checkin-makeup {
    border-left: 3px solid #F59E0B;
    background: rgba(245,158,11,0.04);
}
.day-makeup-badge {
    font-size: 10px; font-weight: 800;
    color: #F59E0B;
    background: rgba(245,158,11,0.15);
    padding: 1px 6px; border-radius: 4px;
    margin-left: 4px;
}
.day-checkin-name { font-weight: 700; font-size: 14px; color: var(--sport-light); }
.day-submit-time  {
    font-size: 10px; color: var(--sport-muted);
    margin: 2px 0 4px;
    display: flex; align-items: center; gap: 4px;
}

/* ============================================================
   头像类型切换 Tab
   ============================================================ */
.avatar-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}
.av-type-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--sport-line);
    background: var(--sport-card2);
    color: var(--sport-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}
.av-type-tab:hover {
    border-color: rgba(255,107,0,0.4);
    color: var(--sport-sub);
}
.av-type-tab.active {
    border-color: var(--sport-orange);
    background: rgba(255,107,0,0.12);
    color: var(--sport-orange);
}

/* ============================================================
   图片上传区
   ============================================================ */
.img-upload-area {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--sport-line);
    background: var(--sport-card2);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.img-upload-area:hover,
.img-upload-area.drag-over {
    border-color: var(--sport-orange);
    background: rgba(255,107,0,0.06);
}
.img-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--sport-muted);
    pointer-events: none;
    user-select: none;
}
.img-upload-placeholder i {
    font-size: 28px;
    color: var(--sport-orange);
    opacity: 0.7;
}
.img-upload-placeholder span {
    font-size: 13px;
    font-weight: 600;
    color: var(--sport-sub);
}
.img-upload-placeholder small {
    font-size: 11px;
    color: var(--sport-muted);
}
/* 图片预览 */
.img-upload-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* 清除按钮 */
.img-clear-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition);
}
.img-clear-btn:hover { background: rgba(255,45,45,0.85); }

/* ============================================================
   成员卡 — 编辑按钮
   ============================================================ */
.profile-card {
    position: relative;
}
.profile-card-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}
.profile-card:hover .profile-card-actions { opacity: 1; }

.profile-edit-btn {
    width: 24px; height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255,107,0,0.3);
    background: rgba(255,107,0,0.1);
    color: var(--sport-orange);
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.profile-edit-btn:hover {
    background: rgba(255,107,0,0.25);
    border-color: var(--sport-orange);
}

/* 原来的删除按钮也调整为在 actions 里，不再用 absolute 定位 */
.profile-card .profile-delete-btn {
    position: static;
    opacity: 1;
    width: 24px; height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255,45,45,0.3);
    background: rgba(255,45,45,0.08);
    color: #ff6b6b;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.profile-card .profile-delete-btn:hover {
    background: rgba(255,45,45,0.22);
    color: #ff2d2d;
}

/* ============================================================
   编辑头像弹窗
   ============================================================ */
.modal-edit-avatar {
    max-width: 480px;
}

.edit-avatar-name-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--sport-line);
    margin-bottom: 4px;
}
.edit-avatar-current {
    flex-shrink: 0;
}
.edit-avatar-member-name {
    font-size: 17px;
    font-weight: 700;
    color: white;
}
.edit-avatar-hint {
    font-size: 12px;
    color: var(--sport-muted);
    margin-top: 2px;
}

/* 编辑弹窗预览 */
#editPreviewAvatar {
    width: 64px !important;
    height: 64px !important;
    font-size: 32px !important;
    border-radius: 14px !important;
    overflow: hidden;
}

/* ============================================================
   成员头像 — 图片溢出修复
   ============================================================ */
.profile-avatar-big {
    overflow: hidden;
}
.qm-avatar {
    overflow: hidden;
}
.mm-avatar {
    overflow: hidden;
}
.lb-avatar {
    overflow: hidden;
}
.record-avatar {
    overflow: hidden;
}
.day-checkin-avatar {
    overflow: hidden;
}
.cell-avatar {
    overflow: hidden;
}

/* Cloudflare 经典版适配：复用原版视觉，身份及数据操作由共享模块管理。 */
button, a, input { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--sport-yellow); outline-offset: 3px; }
[hidden] { display: none !important; }
.header-actions a { text-decoration: none; }
.v1-load-status { max-width: 1100px; margin: 12px auto 0; padding: 0 20px; color: var(--sport-sub); font-size: 13px; }
.v1-load-status:empty, .v1-save-status:empty { display: none; }
.v1-load-status[data-state="error"], .v1-save-status[data-state="error"] { color: #ff9797; }
.v1-save-status[data-state="success"] { color: var(--sport-green); }
.v1-save-status { margin-top: 12px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.v1-makeup-link { border: 0; background: transparent; color: var(--sport-orange); cursor: pointer; min-height: 36px; font-weight: 700; }
.v1-quick-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.v1-quick-links > button { min-width: 0; min-height: 44px; padding: 8px; border-radius: var(--radius-sm); font: inherit; font-size: 13px; font-weight: 700; }
.v1-fusion-link { border: 1px solid rgba(168,85,247,.35); background: rgba(168,85,247,.12); color: #d4b3ff; cursor: pointer; }
.v1-fusion-link:hover:not(:disabled) { background: rgba(168,85,247,.2); border-color: #a855f7; }
.quick-tasks { display: flex; }
.quick-tasks { gap: 8px; }
.quick-task-btn { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 12px; background: var(--sport-card2); border: 2px solid var(--sport-line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; }
.quick-task-icon { font-size: 24px; }
.quick-task-label { font-size: 15px; }
.quick-task-check { width: 18px; height: 18px; border: 1px solid var(--sport-muted); border-radius: 4px; color: transparent; }
.quick-task-btn.active { border-color: var(--sport-green); background: rgba(0,208,132,.08); }
.quick-task-btn.active .quick-task-check { background: var(--sport-green); border-color: var(--sport-green); color: white; }
.quick-hint { font-size: 12px; color: var(--sport-sub); line-height: 1.7; }
.qm-card { color: var(--sport-light); }
.qm-status { font-size: 10px; color: var(--sport-sub); }
.qm-avatar { overflow: hidden; }
.qm-avatar img, .mm-avatar img, .lb-avatar img, .record-avatar img, .day-checkin-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.period-tab { flex-shrink: 0; }
.v1-calendar-heading { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 10px; gap: 8px; }
.v1-calendar-heading h3 { color: white; font-size: 17px; }
.v1-calendar-heading > span { color: var(--sport-sub); font-size: 12px; }
.v1-calendar-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--sport-sub); font-size: 11px; line-height: 1.6; margin-bottom: 12px; }
.calendar-wrapper { background: transparent; border: 0; }
.period-month-section { margin-bottom: 18px; }
.calendar-grid-sub, .calendar-weekdays-sm { grid-template-columns: repeat(7,minmax(0,1fr)); }
.calendar-cell { width: 100%; min-width: 0; min-height: 130px; background: transparent; text-align: left; color: inherit; border-top: 0; border-left: 0; border-radius: 0; font: inherit; }
.calendar-cell.future { opacity: 1; background: rgba(255,255,255,.015); }
.calendar-people { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 6px; width: 100%; min-width: 0; }
.calendar-person { position: relative; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 4px; min-width: 0; }
.calendar-person-avatar { position: relative; display: grid; place-items: center; width: 24px; height: 24px; max-width: 100%; border: 2px solid var(--sport-line); border-radius: 7px; overflow: hidden; }
.calendar-avatar-fallback { display: block; color: white; font-size: 9px; font-weight: 700; line-height: 1; letter-spacing: -.5px; white-space: nowrap; }
.calendar-person-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.calendar-person-status { min-width: 0; color: var(--sport-sub); font-size: 10px; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; }
.calendar-person.v1-full .calendar-person-avatar { border-color: var(--sport-green); }
.calendar-person.v1-full .calendar-person-status { color: #5ae0aa; }
.calendar-person.v1-partial .calendar-person-avatar { border-color: var(--sport-orange); }
.calendar-person.v1-partial .calendar-person-status { color: #ffae6b; }
.calendar-person.v1-fusion .calendar-person-avatar { border-color: #a855f7; }
.calendar-person.v1-fusion .calendar-person-status { color: #c99aff; }
.calendar-person.v1-pending .calendar-person-avatar { filter: grayscale(.65); opacity: .6; }
.calendar-person.v1-consumed .calendar-person-avatar { border-style: dashed; }
.calendar-person-makeup { position: absolute; top: -4px; left: 16px; color: #ffd485; background: var(--sport-card); border-radius: 3px; padding: 1px 2px; font-size: 8px; line-height: 1; }
.cell-avatar { overflow: hidden; border-width: 2px; }
.cell-avatar.v1-full { border-color: var(--sport-green); }
.cell-avatar.v1-partial { border-color: var(--sport-orange); }
.cell-avatar.v1-fusion { border-color: #a855f7; }
.cell-avatar.v1-consumed { opacity: .45; }
.lb-item .lb-avatar { flex-shrink: 0; }
.v1-tier-icon { font-size: 18px; }
.v1-money { color: var(--sport-yellow); font-weight: 800; white-space: nowrap; }
.v1-bonus-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 12px; }
.v1-bonus-row strong { color: var(--sport-yellow); }
.v1-prize-details { padding: 0 12px 12px; color: var(--sport-sub); }
.v1-prize-details summary { cursor: pointer; font-size: 12px; padding: 8px 0; }
.v1-money-note { color: var(--sport-muted); font-size: 11px; line-height: 1.7; margin: 12px 0 0; }
.v1-rule-card { margin-top: 20px; background: var(--sport-card); border: 1px solid var(--sport-line); border-radius: var(--radius); }
.v1-rule-card summary { padding: 16px 20px; cursor: pointer; font-weight: 700; color: var(--sport-orange); }
.v1-rule-body { padding: 0 20px 18px; color: var(--sport-sub); font-size: 13px; line-height: 1.9; }
.v1-rule-body p + p { margin-top: 8px; }
.v1-dialog { position: fixed; inset: 0; margin: auto; max-height: calc(100dvh - 32px); transform: none; transition: none; color: var(--sport-light); padding: 0; }
.v1-dialog::backdrop { background: rgba(5,6,14,.82); backdrop-filter: blur(6px); }
.v1-dialog .modal-body { max-height: calc(100dvh - 190px); overflow-y: auto; }
.v1-dialog .modal-close { min-width: 40px; min-height: 40px; }
.v1-dialog .modal-footer { gap: 10px; }
.v1-dialog input[type="date"] { width: 100%; min-height: 46px; background: var(--sport-card2); color: var(--sport-light); border: 1px solid var(--sport-line); border-radius: 8px; padding: 10px 12px; color-scheme: dark; }
.v1-dialog .task-check-item input[type="checkbox"] { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; }
.v1-dialog .task-check-item { display: flex; }
.v1-dialog .task-check-item:focus-within { outline: 2px solid var(--sport-yellow); outline-offset: 2px; }
.fusion-member-list { margin-bottom: 18px; }
.v1-fusion-result { padding: 12px 14px; border: 1px solid rgba(168,85,247,.3); border-radius: 10px; background: rgba(168,85,247,.07); line-height: 1.7; }
.v1-fusion-result strong { color: #b987ff; }
.v1-fusion-sources { color: var(--sport-sub); font-size: 12px; }
.v1-day-state { color: var(--sport-orange); font-size: 12px; }
.v1-day-sources { color: #b987ff; font-size: 12px; margin-top: 6px; }
.v1-confirm-dialog { max-width: 420px; }
.v1-confirm-details { display: flex; flex-direction: column; gap: 14px; }
.v1-confirm-details > div { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: start; }
.v1-confirm-details dt { color: var(--sport-sub); font-size: 13px; }
.v1-confirm-details dd { color: var(--sport-light); font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
#confirmNote { white-space: pre-wrap; }
.v1-full-card { flex-direction: column; gap: 4px; min-height: 70px; }
.v1-full-card small { font-size: 12px; font-weight: 600; letter-spacing: 0; }
.v1-half-label { font-size: 11px; color: var(--sport-sub); }
.v1-half-card { flex: 1; min-height: 52px; padding: 9px 7px; gap: 5px; }
.v1-half-card .quick-task-icon { font-size: 20px; }
.v1-half-card .quick-task-label { font-size: 12px; white-space: nowrap; }
.v1-half-info { color: var(--sport-sub); font-size: 11px; line-height: 1.8; }
.v1-pending-tab { color: var(--sport-muted); border-left: 1px dashed var(--sport-line); }
.v1-pending-copy { color: var(--sport-sub); line-height: 1.8; }
.v1-open-period { flex-shrink: 0; min-height: 42px; padding: 8px 12px; border: 1px solid rgba(255,107,0,.45); border-radius: 8px; background: rgba(255,107,0,.08); color: var(--sport-orange); cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; white-space: nowrap; }
.v1-deadline-hint { font-size: 11px; color: #ffd485; line-height: 1.7; }
.v1-edit-period { min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--sport-orange); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.period-settings { padding: 24px; max-width: 480px; }
.period-settings h3 { font-size: 22px; }
.period-settings-name { font-size: 18px; font-weight: 750; color: var(--sport-orange); margin: 16px 0 4px; }
.period-settings-muted { font-size: 12px; color: var(--sport-sub); }
.period-settings fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.period-settings-dates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.period-settings-dates label { display: grid; gap: 8px; font-size: 13px; font-weight: 700; }
.period-settings-dates input { width: 100%; min-width: 0; min-height: 46px; padding: 10px; font: inherit; font-size: 16px; border: 1px solid var(--sport-line); border-radius: 8px; background: var(--sport-card2); color: var(--sport-light); color-scheme: dark; }
.period-settings-preview { min-height: 44px; padding: 12px 0; color: var(--sport-orange); font-size: 12px; line-height: 1.8; }
.period-settings-confirm { display: flex; align-items: flex-start; gap: 10px; color: var(--sport-sub); font-size: 12px; line-height: 1.8; cursor: pointer; }
.period-settings-confirm input { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sport-orange); }
.period-settings-status { font-size: 12px; line-height: 1.8; color: #ffd485; margin-top: 12px; }
.period-settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.period-settings-actions button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--sport-line); border-radius: 8px; color: var(--sport-light); background: var(--sport-card2); font: inherit; font-weight: 700; cursor: pointer; }
.period-settings-actions button[type="submit"] { background: var(--sport-orange); color: white; }
.period-settings button:disabled { opacity: .45; cursor: not-allowed; }
@media(max-width:480px) { .period-settings { padding: 20px; } .period-settings-dates { grid-template-columns: minmax(0,1fr); gap: 12px; } .v1-open-period { padding: 8px; font-size: 11px; } }
.v1-makeup-tasks { padding: 12px 14px; margin-bottom: 18px; color: var(--sport-green); border: 1px solid rgba(0,208,132,.25); background: rgba(0,208,132,.07); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; }
.v1-dialog textarea { display: block; width: 100%; resize: vertical; min-height: 90px; padding: 12px; border: 1px solid var(--sport-line); border-radius: var(--radius-sm); background: var(--sport-card2); color: var(--sport-light); font: inherit; font-size: 13px; line-height: 1.7; }
.v1-dialog textarea:focus { outline: 2px solid var(--sport-orange); outline-offset: 2px; }
.v1-makeup-note { margin-top: 8px; padding: 8px 10px; background: rgba(255,107,0,.08); border-left: 2px solid var(--sport-orange); color: var(--sport-sub); font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.v1-makeup-note strong { color: var(--sport-orange); }
.v1-calendar-makeup { position: absolute; top: 4px; right: 4px; border-radius: 3px; padding: 1px 3px; color: var(--sport-orange); background: rgba(255,107,0,.1); font-size: 9px; }
@media (max-width: 768px) {
  .header-actions { width: 100%; justify-content: flex-end; }
  .header-title { gap: 8px; }
  .stats-bar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .stat-item { min-width: 0; }
  .stat-divider { display: none; }
  .quick-zone { margin-top: 18px; padding: 0 12px; }
  .quick-members-wrap { min-width: 0; width: 100%; }
  .quick-members-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; max-height: none; overflow: visible; }
  .qm-card { min-width: 0; padding: 10px 4px; }
  .quick-date-info { flex-direction: row; width: 100%; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .quick-slogan { width: 100%; }
  .quick-right { flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
  .quick-tasks { width: 100%; }
  .quick-task-btn { flex: 1; }
  .quick-hint { text-align: center; }
  .month-header { gap: 8px; align-items: flex-start; }
  .month-stats { font-size: 11px; }
  .bottom-grid { grid-template-columns: minmax(0,1fr); }
  .lb-item { gap: 8px; padding: 10px 8px; flex-wrap: wrap; }
  .lb-item .lb-info { min-width: 120px; }
  .lb-item-right { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 66px; }
  .lb-rules-pool { flex-wrap: wrap; }
  .lb-rule-row { flex-wrap: wrap; }
  .lb-rule-per { margin-left: auto; }
  .calendar-cell { min-height: 140px; padding: 6px 4px; }
  .calendar-people { gap: 5px 3px; }
  .calendar-person { display: flex; flex-direction: column; gap: 3px; text-align: center; }
  .calendar-person-status { width: 100%; min-height: 24px; font-size: 10px; line-height: 12px; }
  .calendar-person-makeup { left: auto; right: 0; }
}
@media (max-width: 480px) {
  .calendar-cell { min-height: 132px; padding: 4px 2px; }
  .calendar-cell .cell-day { width: 22px; height: 22px; margin-bottom: 5px; }
  .calendar-people { gap: 5px 2px; }
  .calendar-person-avatar { width: min(22px,100%); height: auto; aspect-ratio: 1; border-width: 1px; border-radius: 4px; }
  .calendar-avatar-fallback { font-size: 7px; letter-spacing: -.7px; }
  .calendar-person-status { min-height: 20px; font-size: 9px; line-height: 10px; word-break: break-all; }
  .cell-avatars { gap: 2px; }
  .cell-avatar { width: 17px; height: 17px; border-radius: 4px; }
  .v1-calendar-legend { gap: 8px; font-size: 10px; }
  .v1-dialog { max-width: calc(100vw - 24px); }
  .fusion-quota-bar { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .header-year-badge { font-size: 11px; padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 600px) {
  .calendar-grid-sub .calendar-people { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .calendar-grid-sub .calendar-person { display: flex; flex-direction: column; gap: 3px; }
  .calendar-grid-sub .calendar-person-avatar { width: min(24px,100%); height: auto; aspect-ratio: 1; border-width: 1px; }
  .calendar-grid-sub .calendar-avatar-fallback { font-size: 10px; letter-spacing: 0; }
  .calendar-grid-sub .calendar-person-status { min-height: 13px; font-size: 10px; line-height: 13px; word-break: normal; white-space: nowrap; }
}
