        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans TC', sans-serif;
            font-weight: 700;
            background: #FAFAFA;
            color: #2C3E50;
            line-height: 1.6;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
        }

        /* 手繪風格標題 */
        .header {
            text-align: center;
            padding: 40px 20px;
            margin-bottom: 30px;
            position: relative;
        }

        .header h1 {
            font-size: 56px;
            font-weight: 900;
            color: #2C3E50;
            margin-bottom: 15px;
            text-shadow: 4px 4px 0px #FF6B35;
            letter-spacing: 2px;
        }

        .header p {
            font-size: 28px;
            color: #555;
            font-weight: 700;
        }

        .header-partner-count {
            display: inline-block;
            margin-left: 15px;
            padding: 4px 12px;
            background: rgba(255, 107, 53, 0.15);
            border-radius: 20px;
            font-size: 18px;
            color: #FF6B35;
        }

        /* 手繪下劃線 */
        .header::after {
            content: '';
            display: block;
            width: 300px;
            height: 4px;
            background: #2C3E50;
            margin: 20px auto 0;
            border-radius: 2px;
            transform: rotate(-1deg);
        }

        /* 主要 CTA 按鈕區塊 */
        .primary-cta-section {
            display: flex;
            justify-content: center;
            margin-bottom: 25px;
        }

        .checkin-cta-button {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            padding: 20px 50px;
            background: linear-gradient(135deg, #FF6B35 0%, #FF8C52 100%);
            color: white;
            border: 4px solid #2C3E50;
            border-radius: 12px;
            box-shadow: 6px 6px 0px #2C3E50;
            font-size: 24px;
            font-weight: 900;
            text-decoration: none;
            transition: all 0.3s ease;
            animation: ctaPulse 2s ease-in-out infinite;
        }

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

        .checkin-cta-button:hover {
            transform: translate(-3px, -3px) scale(1.05);
            box-shadow: 9px 9px 0px #2C3E50;
            animation: none;
        }

        .checkin-cta-button:active {
            transform: translate(2px, 2px);
            box-shadow: 3px 3px 0px #2C3E50;
        }

        .cta-emoji {
            font-size: 32px;
            animation: bounce 1s ease-in-out infinite;
        }

        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-5px);
            }
        }

        .cta-text {
            font-family: 'Noto Sans TC', sans-serif;
        }

        .cta-arrow {
            font-size: 28px;
            font-weight: 900;
        }

        /* 次要資訊列：倒數計時 + 更新資訊（合併） */
        .secondary-info-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            max-width: 1000px;
            margin: 0 auto 25px;
            padding: 10px 20px;
            font-size: 13px;
            color: #666;
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .info-icon {
            font-size: 14px;
        }

        .info-label {
            color: #888;
        }

        .info-value {
            font-family: 'Courier New', monospace;
            font-weight: 700;
            color: #2C3E50;
            letter-spacing: 1px;
        }

        .info-value.countdown-urgent {
            color: #E74C3C;
            animation: urgentPulse 1s ease-in-out infinite;
        }

        .info-separator {
            color: #CCC;
            font-size: 16px;
        }

        .info-timezone {
            font-size: 11px;
            color: #999;
            margin-left: 2px;
        }

        .pill-refresh-button {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 5px 12px;
            background: rgba(255, 107, 53, 0.12);
            border: 1px solid rgba(255, 107, 53, 0.3);
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            color: #E55A2B;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .pill-refresh-button:hover {
            background: rgba(255, 107, 53, 0.2);
            border-color: rgba(255, 107, 53, 0.5);
        }

        .pill-refresh-button:active {
            transform: scale(0.96);
        }

        .pill-refresh-button .refresh-icon {
            font-size: 12px;
            display: inline-block;
        }

        .pill-refresh-button.refreshing {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .pill-refresh-button.refreshing .refresh-icon {
            animation: spin 1s linear infinite;
        }

        .pill-refresh-button.success {
            background: rgba(46, 204, 113, 0.15);
            border-color: rgba(46, 204, 113, 0.4);
            color: #27AE60;
        }

        /* 舊的情境資訊列（保留備用） */
        .context-info-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
            padding: 12px 20px;
            margin: 0 auto 30px;
            width: 100%;
            max-width: 1000px;
            background: #F5F5F5;
            border: 3px solid #DDD;
            border-radius: 8px;
            font-size: 15px;
            color: #666;
            font-weight: 700;
            box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
        }

        .info-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .info-icon {
            font-size: 18px;
        }

        .info-divider {
            color: #CCC;
        }

        .context-info-bar strong {
            color: #FF6B35;
        }

        /* 倒數計時器樣式 */
        .countdown-container {
            display: flex;
            align-items: center;
            gap: 10px;
            background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
            padding: 8px 16px;
            border-radius: 8px;
            border: 2px solid #1a252f;
        }

        .countdown-label {
            color: #FFF;
            font-size: 14px;
            font-weight: 700;
        }

        .countdown-timer {
            font-family: 'Courier New', monospace;
            font-size: 24px;
            font-weight: 900;
            color: #FFD93D;
            letter-spacing: 2px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        /* 倒數緊急狀態（剩餘不到 2 小時） */
        .countdown-timer.countdown-urgent {
            color: #FF6B6B;
            animation: urgentPulse 1s ease-in-out infinite;
        }

        @keyframes urgentPulse {
            0%, 100% {
                opacity: 1;
                transform: scale(1);
            }
            50% {
                opacity: 0.8;
                transform: scale(1.05);
            }
        }

        .countdown-timezone {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.6);
            margin-left: 4px;
        }

        /* 全域刷新按鈕 */
        .global-refresh-button {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: linear-gradient(135deg, #FF6B35 0%, #FF8C52 100%);
            color: white;
            border: 2px solid #E55A2B;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .global-refresh-button:hover {
            transform: scale(1.05);
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
        }

        .global-refresh-button:active {
            transform: scale(0.98);
        }

        .global-refresh-button.refreshing {
            background: #999;
            border-color: #777;
            cursor: not-allowed;
        }

        .global-refresh-button.refreshing .refresh-icon {
            animation: spin 1s linear infinite;
        }

        .global-refresh-button.success {
            background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
            border-color: #219A52;
        }

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

        .refresh-icon {
            font-size: 14px;
            display: inline-block;
        }

        /* 統計卡片 - 手繪風格 */
        .stats-banner {
            display: block;
            margin-bottom: 30px;
        }

        .stat-card {
            background: white;
            padding: 30px 20px;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            text-align: center;
            position: relative;
            box-shadow: 6px 6px 0px #2C3E50;
            transition: all 0.2s ease;
        }

        .stat-card:hover {
            transform: translate(-2px, -2px);
            box-shadow: 8px 8px 0px #2C3E50;
        }

        /* 寬版卡片（今日打卡狀況）*/
        .stat-card-wide {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .stat-checkin-info {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .checkin-numbers {
            font-size: 42px;
            font-weight: 900;
            color: #2C3E50;
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 8px;
        }

        .checkin-count {
            color: #FF6B35;
        }

        .checkin-separator {
            color: #999;
            font-weight: 700;
        }

        .checkin-total {
            color: #666;
        }

        .checkin-unit {
            font-size: 24px;
            color: #666;
            font-weight: 700;
        }

        .checkin-rate {
            font-size: 28px;
            color: #FF6B35;
            font-weight: 900;
        }

        .stat-icon {
            font-size: 48px;
            margin-bottom: 15px;
            filter: drop-shadow(2px 2px 0px rgba(0, 0, 0, 0.2));
        }

        .stat-label {
            font-size: 20px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 700;
            letter-spacing: 1px;
        }

        .stat-value {
            font-size: 58px;
            font-weight: 900;
            color: #FF6B35;
            text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
        }

        .stat-sub {
            font-size: 18px;
            color: #888;
            margin-top: 8px;
            font-weight: 700;
        }

        /* 手繪風格進度條 */
        .progress-bar {
            width: 100%;
            height: 16px;
            background: #F0F0F0;
            border: 3px solid #2C3E50;
            border-radius: 20px;
            overflow: hidden;
            margin-top: 15px;
            position: relative;
        }

        .progress-fill {
            height: 100%;
            background: #FF6B35;
            border-radius: 20px;
            transition: width 0.5s ease;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: repeating-linear-gradient(45deg,
                    transparent,
                    transparent 10px,
                    rgba(255, 255, 255, 0.1) 10px,
                    rgba(255, 255, 255, 0.1) 20px);
        }

        /* 兩欄資訊區域（連續打卡王 + 每日亮點牆） */
        .two-column-layout {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 25px;
            margin-bottom: 30px;
            align-items: stretch; /* 確保等高 */
        }

        .two-column-layout > * {
            min-height: 600px; /* 增加最小高度 */
            height: 100%; /* 強制等高 */
            display: flex;
            flex-direction: column;
        }

        /* 手繪風格滾動條 - 三欄佈局 */
        .today-checkin-status::-webkit-scrollbar,
        .leaderboard::-webkit-scrollbar,
        .highlights::-webkit-scrollbar {
            width: 12px;
        }

        .today-checkin-status::-webkit-scrollbar-track,
        .leaderboard::-webkit-scrollbar-track,
        .highlights::-webkit-scrollbar-track {
            background: #F0F0F0;
            border: 2px solid #2C3E50;
            border-radius: 10px;
            margin: 8px 0;
        }

        .today-checkin-status::-webkit-scrollbar-thumb,
        .leaderboard::-webkit-scrollbar-thumb,
        .highlights::-webkit-scrollbar-thumb {
            background: #FF6B35;
            border: 2px solid #2C3E50;
            border-radius: 10px;
        }

        .today-checkin-status::-webkit-scrollbar-thumb:hover,
        .leaderboard::-webkit-scrollbar-thumb:hover,
        .highlights::-webkit-scrollbar-thumb:hover {
            background: #E65100;
        }

        /* 排行榜 - 手繪風格 */
        .leaderboard {
            background: white;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            padding: 25px;
            box-shadow: 6px 6px 0px #2C3E50;
            min-height: 500px;
            max-height: 650px;
            overflow-y: auto;
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .leaderboard h2,
        .highlights h2 {
            font-size: 28px;
            font-weight: 900;
            margin-bottom: 20px;
            color: #2C3E50;
            padding-bottom: 12px;
            border-bottom: 4px solid #2C3E50;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-icon {
            font-size: 30px;
        }

        .section-title {
            font-size: 28px;
            flex: 1;
        }

        /* 標題與連結同行的容器 */
        .section-header-with-link {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 4px solid #2C3E50;
        }

        .section-header-with-link h2 {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
            flex: 1;
        }

        /* 標題旁的連結樣式 */
        .header-link {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            background: white;
            color: #FF6B35;
            border: 3px solid #2C3E50;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 900;
            text-decoration: none;
            transition: all 0.2s ease;
            box-shadow: 3px 3px 0px rgba(44, 62, 80, 0.3);
            white-space: nowrap;
        }

        .header-link:hover {
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px rgba(44, 62, 80, 0.4);
            background: #FFF4E8;
        }

        .section-subtitle {
            font-size: 16px;
            color: #999;
            font-weight: 700;
        }

        /* 讓排行榜和亮點列表內容自動填滿剩餘空間 */
        #leaderboardList,
        #highlightsList {
            flex: 1;
            overflow-y: auto;
        }

        .section-footer {
            margin-top: auto;
            padding-top: 15px;
            border-top: 2px solid #F0F0F0;
            text-align: center;
        }

        .view-all-link {
            display: inline-block;
            padding: 10px 20px;
            background: #F8F9FA;
            color: #FF6B35;
            text-decoration: none;
            font-size: 14px;
            font-weight: 700;
            border: 2px solid #FF6B35;
            border-radius: 6px;
            transition: all 0.2s ease;
        }

        .view-all-link:hover {
            background: #FF6B35;
            color: white;
            transform: translateY(-2px);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        .leaderboard-item {
            padding: 15px;
            margin-bottom: 15px;
            background: #FAFAFA;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            position: relative;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .leaderboard-item:hover {
            transform: translate(-2px, -2px);
            box-shadow: 4px 4px 0px #2C3E50;
        }

        .leaderboard-item.rank-1 {
            background: #FFD700;
            border-color: #2C3E50;
            box-shadow: 4px 4px 0px #2C3E50;
        }

        .leaderboard-item.rank-2 {
            background: #E0E0E0;
            border-color: #2C3E50;
            box-shadow: 4px 4px 0px #2C3E50;
        }

        .leaderboard-item.rank-3 {
            background: #CD7F32;
            border-color: #2C3E50;
            box-shadow: 4px 4px 0px #2C3E50;
            color: white;
        }

        .leaderboard-item.rank-3 .student-name,
        .leaderboard-item.rank-3 .streak-days {
            color: white;
        }

        .rank {
            font-size: 32px;
            font-weight: 900;
            display: inline-block;
            width: 45px;
            text-align: center;
        }

        .student-info {
            display: inline-block;
            vertical-align: top;
            width: calc(100% - 55px);
        }

        .student-name {
            font-size: 24px;
            font-weight: 900;
            margin-bottom: 5px;
        }

        .streak-days {
            font-size: 22px;
            color: #FF6B35;
            font-weight: 900;
        }

        .milestones {
            margin-top: 8px;
            font-size: 20px;
        }

        /* ============================================
           連續打卡旅程榜 - 等級制樣式
           ============================================ */
        .tier-group {
            background: #FAFAFA;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            padding: 16px 20px;
            margin-bottom: 15px;
            box-shadow: 3px 3px 0px rgba(44, 62, 80, 0.2);
            transition: all 0.2s ease;
        }

        .tier-group:hover {
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px rgba(44, 62, 80, 0.3);
        }

        .tier-group:last-child {
            margin-bottom: 0;
        }

        .tier-header {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 10px;
        }

        .tier-emoji {
            font-size: 28px;
            line-height: 1;
        }

        .tier-name {
            font-size: 20px;
            font-weight: 900;
            color: #2C3E50;
        }

        .tier-condition {
            font-size: 14px;
            font-weight: 700;
            color: #888;
        }

        .tier-count {
            font-size: 14px;
            font-weight: 900;
            color: white;
            background: #FF6B35;
            padding: 4px 10px;
            border-radius: 20px;
            margin-left: auto;
        }

        .tier-students {
            font-size: 16px;
            font-weight: 700;
            color: #555;
            line-height: 1.8;
            padding-left: 40px;
        }

        .tier-empty {
            text-align: center;
            padding: 40px 20px;
            color: #999;
            font-size: 18px;
            font-weight: 700;
        }

        /* 尚未達成的等級 - 灰色狀態 */
        .tier-group.tier-empty-state {
            background: #F5F5F5;
            border-color: #DDD;
            box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
            opacity: 0.7;
        }

        .tier-group.tier-empty-state:hover {
            transform: none;
            box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
        }

        .tier-group.tier-empty-state .tier-emoji {
            filter: grayscale(100%);
            opacity: 0.5;
        }

        .tier-group.tier-empty-state .tier-name {
            color: #999;
        }

        .tier-group.tier-empty-state .tier-condition {
            color: #BBB;
        }

        .tier-group.tier-empty-state .tier-count {
            background: #CCC;
        }

        .tier-group.tier-empty-state .tier-students {
            color: #BBB;
            font-style: italic;
        }

        /* 等級制 RWD - 平板 */
        @media (max-width: 768px) {
            .tier-group {
                padding: 14px 16px;
                margin-bottom: 12px;
            }

            .tier-header {
                gap: 6px;
            }

            .tier-emoji {
                font-size: 24px;
            }

            .tier-name {
                font-size: 18px;
            }

            .tier-condition {
                font-size: 13px;
            }

            .tier-count {
                font-size: 13px;
                padding: 3px 8px;
            }

            .tier-students {
                font-size: 15px;
                padding-left: 32px;
                line-height: 1.7;
            }
        }

        /* 等級制 RWD - 手機 */
        @media (max-width: 480px) {
            .tier-group {
                padding: 12px 14px;
                margin-bottom: 10px;
            }

            .tier-header {
                flex-wrap: wrap;
            }

            .tier-emoji {
                font-size: 22px;
            }

            .tier-name {
                font-size: 16px;
            }

            .tier-condition {
                font-size: 12px;
                order: 4;
                width: 100%;
                padding-left: 30px;
                margin-top: -4px;
            }

            .tier-count {
                font-size: 12px;
                padding: 2px 8px;
            }

            .tier-students {
                font-size: 14px;
                padding-left: 30px;
                line-height: 1.6;
            }
        }

        /* 亮點牆 - 手繪風格 */
        .highlights {
            background: white;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            padding: 25px;
            box-shadow: 6px 6px 0px #2C3E50;
            min-height: 500px;
            max-height: 650px;
            overflow-y: auto;
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .highlight-card {
            background: #FFFEF7;
            border: 3px solid #2C3E50;
            border-left: 8px solid #FF6B35;
            padding: 20px;
            margin-bottom: 20px;
            margin-right: 5px;
            border-radius: 8px;
            position: relative;
            box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease;
            max-width: 100%;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        .highlight-card:hover {
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.15);
        }

        .highlight-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .highlight-date {
            font-size: 18px;
            color: #888;
            font-weight: 700;
        }

        .highlight-name {
            font-size: 24px;
            font-weight: 900;
            color: #2C3E50;
        }

        .highlight-content {
            font-size: 21px;
            color: #333;
            margin: 12px 0;
            line-height: 1.8;
            font-weight: 700;
        }

        .highlight-method {
            display: inline-block;
            padding: 10px 18px;
            background: #FF6B35;
            color: white;
            border: 2px solid #2C3E50;
            border-radius: 20px;
            font-size: 17px;
            margin-top: 10px;
            font-weight: 900;
            box-shadow: 2px 2px 0px #2C3E50;
        }

        .highlight-extra {
            margin-top: 12px;
            padding: 12px;
            background: white;
            border: 2px dashed #999;
            border-radius: 6px;
            font-size: 18px;
            color: #666;
            font-weight: 700;
        }

        /* 今日文章區塊 - 藍紫色系 */
        .highlight-article {
            margin-top: 15px;
            padding: 15px;
            background: linear-gradient(135deg, #F0F4FF 0%, #E8EFFF 100%);
            border: 3px solid #5B7FDB;
            border-left: 6px solid #5B7FDB;
            border-radius: 8px;
            box-shadow: 2px 2px 0px rgba(91, 127, 219, 0.2);
        }

        /* 標籤與按鈕並排 */
        .article-label-with-toggle {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .article-label {
            font-size: 16px;
            font-weight: 900;
            color: #5B7FDB;
        }

        /* 緊湊型 Toggle 按鈕（放在標籤旁）*/
        .article-toggle-button-compact {
            padding: 4px 12px;
            background: white;
            color: #5B7FDB;
            border: 2px solid #5B7FDB;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 900;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Noto Sans TC', sans-serif;
        }

        .article-toggle-button-compact:hover {
            background: #5B7FDB;
            color: white;
            transform: translateY(-1px);
        }

        .article-toggle-button-compact:active {
            transform: translateY(0);
        }

        /* 文章連結按鈕 */
        .article-link-button {
            display: inline-block;
            padding: 10px 20px;
            background: #5B7FDB;
            color: white;
            text-decoration: none;
            font-size: 16px;
            font-weight: 900;
            border: 2px solid #2C3E50;
            border-radius: 6px;
            box-shadow: 3px 3px 0px #2C3E50;
            transition: all 0.2s ease;
        }

        .article-link-button:hover {
            background: #4A6BC9;
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px #2C3E50;
        }

        .article-link-button:active {
            transform: translate(1px, 1px);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        /* 文章文字容器 */
        .article-text-container {
            background: white;
            padding: 12px;
            border-radius: 6px;
            border: 2px solid #D0DBFF;
            margin-top: 10px;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                max-height: 0;
                padding-top: 0;
                padding-bottom: 0;
            }
            to {
                opacity: 1;
                max-height: 1000px;
                padding-top: 12px;
                padding-bottom: 12px;
            }
        }

        .article-text-preview,
        .article-text-full {
            font-size: 17px;
            color: #444;
            font-weight: 700;
            line-height: 1.8;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        /* 文章內的內嵌連結 */
        .article-inline-link {
            color: #5B7FDB;
            text-decoration: underline;
            font-weight: 900;
            word-break: break-all;
            transition: all 0.2s ease;
        }

        .article-inline-link:hover {
            color: #4A6BC9;
            text-decoration: underline;
            background: rgba(91, 127, 219, 0.1);
            padding: 2px 4px;
            border-radius: 3px;
        }

        /* 展開/收起按鈕 */
        .article-toggle-button {
            margin-top: 10px;
            padding: 8px 16px;
            background: white;
            color: #5B7FDB;
            border: 2px solid #5B7FDB;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 900;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Noto Sans TC', sans-serif;
        }

        .article-toggle-button:hover {
            background: #5B7FDB;
            color: white;
            transform: translateY(-1px);
        }

        .article-toggle-button:active {
            transform: translateY(0);
        }

        /* 打卡熱力圖 */
        .heatmap-container {
            background: white;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            padding: 25px;
            box-shadow: 6px 6px 0px #2C3E50;
            margin-bottom: 40px;
        }

        .heatmap-container h2 {
            font-size: 32px;
            font-weight: 900;
            margin-bottom: 20px;
            color: #2C3E50;
            padding-bottom: 15px;
            border-bottom: 4px solid #2C3E50;
        }

        .heatmap-container h2::before {
            content: '🎯';
            margin-right: 10px;
            font-size: 34px;
        }

        /* 挑戰進度資訊 */
        .challenge-progress-info {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 25px;
            padding: 20px;
            background: #FFF9F0;
            border: 3px solid #FF6B35;
            border-radius: 8px;
            box-shadow: 4px 4px 0px rgba(255, 107, 53, 0.2);
        }

        .challenge-days {
            display: flex;
            align-items: baseline;
            gap: 5px;
            font-weight: 900;
            white-space: nowrap;
        }

        .challenge-days .current-day {
            font-size: 28px;
            color: #FF6B35;
        }

        .challenge-days .current-day span {
            font-size: 36px;
        }

        .challenge-days .total-days {
            font-size: 20px;
            color: #666;
        }

        .challenge-progress-bar {
            flex: 1;
            height: 20px;
            background: white;
            border: 3px solid #2C3E50;
            border-radius: 10px;
            overflow: visible;
            /* 改為 visible 讓里程碑可以顯示在外面 */
            box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
            position: relative;
        }

        .challenge-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #FF6B35 0%, #FF8C52 100%);
            transition: width 0.5s ease;
            box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
        }

        .challenge-percentage {
            font-size: 24px;
            font-weight: 900;
            color: #FF6B35;
            min-width: 60px;
            text-align: right;
        }

        /* 里程碑標記 */
        .milestone {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            z-index: 10;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }

        .milestone:hover {
            transform: translate(-50%, -50%) scale(1.3);
            z-index: 100;
        }

        .milestone:hover .milestone-icon {
            box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.3),
                4px 4px 0px rgba(0, 0, 0, 0.3);
            animation: bounce 0.5s ease;
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-5px);
            }
        }

        .milestone-icon {
            font-size: 20px;
            background: white;
            border: 3px solid #2C3E50;
            border-radius: 50%;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .milestone-label {
            font-size: 11px;
            font-weight: 900;
            color: #2C3E50;
            background: white;
            padding: 2px 6px;
            border-radius: 4px;
            border: 2px solid #2C3E50;
            white-space: nowrap;
        }

        /* 里程碑鼓勵話語 tooltip - 手繪風格橫向版本 */
        .milestone-tooltip {
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-bottom: 20px;
            background: white;
            color: #2C3E50;
            padding: 12px 18px;
            border: 3px solid #FF6B35;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 700;
            pointer-events: none;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 4px 4px 0px #FF6B35;
            z-index: 200;
            min-width: 240px;
            max-width: 400px;
            text-align: center;
            line-height: 1.5;
            white-space: normal;
        }

        /* Tooltip 箭頭 - 手繪風格 */
        .milestone-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 10px solid transparent;
            border-top-color: #FF6B35;
        }

        /* Tooltip 內部白色三角形 */
        .milestone-tooltip::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 7px solid transparent;
            border-top-color: white;
            z-index: 1;
            margin-top: -3px;
        }

        .milestone:hover .milestone-tooltip {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(-8px);
        }

        /* 手機版 RWD - 調整 tooltip 大小和位置 */
        @media (max-width: 768px) {
            .milestone-tooltip {
                font-size: 13px;
                padding: 10px 14px;
                min-width: 180px;
                max-width: calc(100vw - 40px);
                margin-bottom: 15px;
                /* 防止超出螢幕邊界 */
                left: 50% !important;
                right: auto !important;
                transform: translateX(-50%);
            }

            /* 左側里程碑的 tooltip 向右偏移 */
            .milestone[style*="left: 20%"] .milestone-tooltip,
            .milestone[style*="left: 40%"] .milestone-tooltip {
                left: 0 !important;
                transform: translateX(0);
            }

            /* 右側里程碑的 tooltip 向左偏移 */
            .milestone[style*="left: 80%"] .milestone-tooltip,
            .milestone[style*="left: 100%"] .milestone-tooltip {
                left: auto !important;
                right: 0 !important;
                transform: translateX(0);
            }

            .milestone-tooltip::after {
                border-width: 8px;
            }

            .milestone-tooltip::before {
                border-width: 5px;
                margin-top: -3px;
            }

            /* 熱力圖 tooltip 手機版 */
            .heatmap-tooltip {
                font-size: 14px;
                padding: 8px 12px;
                max-width: calc(100vw - 40px);
            }
        }

        /* 超小手機螢幕 */
        @media (max-width: 480px) {
            .milestone-tooltip {
                font-size: 12px;
                padding: 8px 12px;
                min-width: 140px;
                max-width: calc(100vw - 30px);
                margin-bottom: 12px;
            }

            .heatmap-tooltip {
                font-size: 13px;
                padding: 6px 10px;
            }
        }



        /* === Tooltip 顯示邏輯：根據里程碑是否達成 === */

        /* 預設隱藏所有 tooltip */
        .milestone-tooltip-achieved,
        .milestone-tooltip-locked {
            display: none;
        }

        /* 已達成的里程碑：hover 時顯示鼓勵話語 */
        .milestone.achieved:hover .milestone-tooltip-achieved {
            display: block;
        }

        /* 未達成的里程碑：hover 時顯示神秘問號 */
        .milestone:not(.achieved):hover .milestone-tooltip-locked {
            display: block;
        }

        /* 未達成里程碑的 tooltip 樣式 - 灰色調增加神秘感 */
        .milestone-tooltip-locked {
            background: #F5F5F5;
            border-color: #999;
            color: #666;
            box-shadow: 4px 4px 0px #CCC;
        }

        .milestone-tooltip-locked::after {
            border-top-color: #999;
        }

        .milestone-tooltip-locked::before {
            border-top-color: #F5F5F5;
        }

        /* 最後一個里程碑特殊樣式 */
        .milestone-final .milestone-icon {
            background: #FFD700;
            border-color: #FF6B35;
            box-shadow: 3px 3px 0px rgba(255, 107, 53, 0.3);
        }

        /* 已達成的里程碑 - 加強視覺效果 */
        .milestone.achieved .milestone-icon {
            background: #4CAF50;
            border-color: #2C3E50;
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3),
                3px 3px 0px #2C3E50;
            animation: glow 2s ease-in-out infinite;
        }

        .milestone.achieved .milestone-label {
            background: #4CAF50;
            color: white;
            border-color: #2C3E50;
        }

        /* 加入勾選標記 */
        .milestone.achieved .milestone-icon::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 16px;
            font-weight: 900;
        }

        @keyframes glow {

            0%,
            100% {
                box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3),
                    3px 3px 0px #2C3E50;
            }

            50% {
                box-shadow: 0 0 0 5px rgba(76, 175, 80, 0.5),
                    3px 3px 0px #2C3E50;
            }
        }

        @keyframes celebrate {

            0%,
            100% {
                transform: translate(-50%, -50%) scale(1);
            }

            50% {
                transform: translate(-50%, -50%) scale(1.3);
            }
        }

        .heatmap-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
            margin-bottom: 20px;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }

        .heatmap-cell {
            width: 100%;
            height: 0;
            padding-bottom: 100%;
            position: relative;
            border: 2px solid #2C3E50;
            border-radius: 3px;
            cursor: pointer;
            transition: all 0.15s ease;
            box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
        }

        .heatmap-cell:hover {
            transform: scale(1.3);
            box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.25);
            z-index: 10;
        }

        /* 天數數字 */
        .day-number {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 12px;
            font-weight: 900;
            color: #2C3E50;
            pointer-events: none;
            user-select: none;
        }

        /* 未來日期的數字樣式 */
        .heatmap-cell.future .day-number {
            color: #CCC;
        }

        /* 熱力圖顏色等級 - 優化版本 */
        .heatmap-cell.level-0 {
            background: #F5F5F5;
            /* 淺灰 (0-20%) - 低打卡率 */
            border-color: #E0E0E0;
        }

        .heatmap-cell.level-1 {
            background: #FFE0B2;
            /* 淺橘 (21-40%) - 需加油 */
        }

        .heatmap-cell.level-2 {
            background: #FFB74D;
            /* 中橘 (41-60%) - 還不錯 */
        }

        .heatmap-cell.level-3 {
            background: #FF8C52;
            /* 深橘 (61-80%) - 很好 */
        }

        .heatmap-cell.level-4 {
            background: #4CAF50;
            /* 綠色 (81-100%) - 優秀！*/
        }

        /* level-0 的數字用深色顯示 */
        .heatmap-cell.level-0 .day-number {
            color: #999;
        }

        /* level-4 的數字用白色顯示 */
        .heatmap-cell.level-4 .day-number {
            color: white;
            text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
        }

        .heatmap-cell.future {
            background: transparent;
            /* 透明背景 */
            border: 2px dashed #E0E0E0;
            /* 虛線邊框 */
            opacity: 0.3;
            cursor: not-allowed;
        }

        .heatmap-cell.future:hover {
            transform: none;
            /* 不放大 */
            box-shadow: none;
        }

        /* Tooltip */
        .heatmap-tooltip {
            position: absolute;
            background: #2C3E50;
            color: white;
            padding: 10px 15px;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 700;
            white-space: nowrap;
            pointer-events: none;
            z-index: 1000;
            box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
            display: none;
        }

        .heatmap-legend {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-size: 13px;
            color: #666;
            font-weight: 700;
        }

        .heatmap-legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .heatmap-legend-color {
            width: 16px;
            height: 16px;
            border: 2px solid #2C3E50;
            border-radius: 2px;
            box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
        }

        /* 圖例顏色 - 更新版本 */
        .heatmap-legend-color.level-0 {
            background: #F5F5F5;
            border-color: #E0E0E0;
        }

        .heatmap-legend-color.level-1 {
            background: #FFE0B2;
        }

        .heatmap-legend-color.level-2 {
            background: #FFB74D;
        }

        .heatmap-legend-color.level-3 {
            background: #FF8C52;
        }

        .heatmap-legend-color.level-4 {
            background: #4CAF50;
        }

        /* 今日打卡動態 - 獨立全寬顯示 */
        .today-checkin-status {
            background: white;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            padding: 25px;
            box-shadow: 6px 6px 0px #2C3E50;
            margin-bottom: 30px;
            position: relative;
        }

        .today-checkin-status h2 {
            font-size: 28px;
            font-weight: 900;
            margin-bottom: 20px;
            color: #2C3E50;
            padding-bottom: 12px;
            border-bottom: 4px solid #2C3E50;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* 今日進度區塊 */
        .today-progress-section {
            margin-bottom: 20px;
            padding: 15px;
            background: #FAFAFA;
            border: 2px solid #E0E0E0;
            border-radius: 8px;
        }

        .checkin-numbers-compact {
            font-size: 36px;
            font-weight: 900;
            color: #2C3E50;
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 6px;
            margin-bottom: 12px;
        }

        .checkin-numbers-compact .checkin-count {
            color: #4CAF50;
        }

        .checkin-numbers-compact .checkin-unit {
            font-size: 20px;
            color: #666;
        }

        .checkin-rate-text {
            text-align: center;
            font-size: 16px;
            color: #666;
            font-weight: 700;
            margin-top: 8px;
        }

        .checkin-rate-text strong {
            color: #FF6B35;
        }

        /* 刷新按鈕（緊湊版） */
        .refresh-button-compact {
            width: 100%;
            padding: 14px 24px;
            font-size: 18px;
            font-weight: 900;
            background: #FF6B35;
            color: white;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            cursor: pointer;
            box-shadow: 3px 3px 0px #2C3E50;
            transition: all 0.3s ease;
            font-family: 'Noto Sans TC', sans-serif;
        }

        .refresh-button-compact:hover:not(:disabled) {
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px #2C3E50;
        }

        .refresh-button-compact:active:not(:disabled) {
            transform: translate(1px, 1px);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        .refresh-button-compact:disabled {
            cursor: not-allowed;
            opacity: 0.8;
            transform: none;
        }

        /* 刷新按鈕狀態 */
        .refresh-button-compact.refreshing {
            background: #FFA726;
            animation: pulse 1.5s ease-in-out infinite;
        }

        .refresh-button-compact.success {
            background: #4CAF50;
        }

        .refresh-button-compact.error {
            background: #F44336;
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.7;
            }
        }

        /* 學員列表標題 */
        .student-list-header {
            font-size: 18px;
            font-weight: 900;
            margin: 20px 0 12px 0;
            padding-bottom: 8px;
            border-bottom: 2px solid currentColor;
        }

        .student-list-header.checked-header {
            color: #4CAF50;
            border-bottom-color: #4CAF50;
        }

        .student-list-header.unchecked-header {
            color: #FF9800;
            border-bottom-color: #FF9800;
        }

        /* 學員列表容器 - 可折疊，使用 transition 動畫 */
        #studentAvatarsContainer {
            max-height: 500px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 8px;
            transition: opacity 0.3s ease-out, transform 0.3s ease-out;
        }

        /* 學員列表滾動條 - 手繪風格（與三欄佈局一致） */
        #studentAvatarsContainer::-webkit-scrollbar {
            width: 14px;
        }

        #studentAvatarsContainer::-webkit-scrollbar-track {
            background: #F0F0F0;
            border: 2px solid #2C3E50;
            border-radius: 10px;
            margin: 8px 0;
        }

        #studentAvatarsContainer::-webkit-scrollbar-thumb {
            background: #FF6B35;
            border: 2px solid #2C3E50;
            border-radius: 10px;
        }

        #studentAvatarsContainer::-webkit-scrollbar-thumb:hover {
            background: #E65100;
        }

        .checkin-stats-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 25px;
        }

        .checkin-stat-box {
            padding: 20px;
            background: #FAFAFA;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            text-align: center;
            box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
        }

        .checkin-stat-box.checked {
            background: #E8F5E9;
            border-color: #4CAF50;
        }

        .checkin-stat-box.unchecked {
            background: #FFF3E0;
            border-color: #FF9800;
        }

        .checkin-stat-label {
            font-size: 18px;
            color: #666;
            margin-bottom: 8px;
            font-weight: 700;
        }

        .checkin-stat-value {
            font-size: 42px;
            font-weight: 900;
            color: #2C3E50;
        }

        .checkin-stat-box.checked .checkin-stat-value {
            color: #4CAF50;
        }

        .checkin-stat-box.unchecked .checkin-stat-value {
            color: #FF9800;
        }

        .student-avatars {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 12px;
            margin-top: 20px;
        }

        .student-avatar {
            padding: 12px;
            background: #F5F5F5;
            border: 3px solid #E0E0E0;
            border-radius: 8px;
            text-align: center;
            font-size: 16px;
            font-weight: 700;
            transition: all 0.2s ease;
            cursor: pointer;
        }

        .student-avatar.checked {
            background: #4CAF50;
            border-color: #2C3E50;
            color: white;
            box-shadow: 3px 3px 0px #2C3E50;
        }

        .student-avatar.checked:hover {
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px #2C3E50;
        }

        .student-avatar.unchecked {
            background: #FFF;
            border-color: #E0E0E0;
            color: #999;
        }

        .student-avatar .emoji {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .refresh-button {
            padding: 16px 32px;
            font-size: 20px;
            font-weight: 900;
            background: #FF6B35;
            color: white;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Noto Sans TC', sans-serif;
            box-shadow: 4px 4px 0px #2C3E50;
            transition: all 0.2s ease;
        }

        .refresh-button:hover {
            transform: translate(-2px, -2px);
            box-shadow: 6px 6px 0px #2C3E50;
        }

        .refresh-button:active {
            transform: translate(1px, 1px);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        .refresh-button:disabled {
            background: #CCC;
            cursor: not-allowed;
            opacity: 0.6;
            transform: none;
            box-shadow: 3px 3px 0px #999;
        }

        .refresh-button:disabled:hover {
            transform: none;
            box-shadow: 3px 3px 0px #999;
        }

        /* 學員列表切換按鈕 */
        .toggle-section {
            cursor: pointer;
            user-select: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 16px;
            color: #2C3E50;
            font-weight: 900;
            padding: 12px 24px;
            background: linear-gradient(135deg, #F8F9FA 0%, #E8E9EA 100%);
            border: 3px solid #2C3E50;
            border-radius: 8px;
            box-shadow: 3px 3px 0px #2C3E50;
            transition: all 0.25s ease;
            width: 100%;
        }

        .toggle-section:hover {
            background: linear-gradient(135deg, #FFE5D9 0%, #FFD5C9 100%);
            color: #FF6B35;
            transform: translate(-2px, -2px);
            box-shadow: 5px 5px 0px #2C3E50;
        }

        .toggle-section:active {
            transform: translate(1px, 1px);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        /* 切換圖示 */
        .toggle-section #toggleIcon {
            transition: transform 0.3s ease;
            display: inline-block;
            font-size: 14px;
        }

        /* 個人查詢 */
        .personal-lookup {
            background: white;
            border: 4px solid #2C3E50;
            border-radius: 8px;
            padding: 25px;
            box-shadow: 6px 6px 0px #2C3E50;
        }

        .personal-lookup h2 {
            font-size: 32px;
            font-weight: 900;
            margin-bottom: 25px;
            color: #2C3E50;
            padding-bottom: 15px;
            border-bottom: 4px solid #2C3E50;
        }

        .personal-lookup h2::before {
            content: '🔍';
            margin-right: 10px;
            font-size: 34px;
        }

        .lookup-controls {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
        }

        .lookup-controls select {
            flex: 1;
            padding: 18px;
            font-size: 22px;
            font-weight: 900;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            background: white;
            cursor: pointer;
            font-family: 'Noto Sans TC', sans-serif;
        }

        .lookup-controls button {
            padding: 18px 45px;
            font-size: 22px;
            font-weight: 900;
            background: #FF6B35;
            color: white;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            cursor: pointer;
            font-family: 'Noto Sans TC', sans-serif;
            transition: all 0.2s ease;
            box-shadow: 4px 4px 0px #2C3E50;
        }

        .lookup-controls button:hover {
            transform: translate(-2px, -2px);
            box-shadow: 6px 6px 0px #2C3E50;
        }

        .lookup-controls button:active {
            transform: translate(0, 0);
            box-shadow: 2px 2px 0px #2C3E50;
        }

        .personal-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 30px;
        }

        .personal-stat-box {
            padding: 20px;
            background: #FAFAFA;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
        }

        .personal-stat-label {
            font-size: 19px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .personal-stat-value {
            font-size: 38px;
            font-weight: 900;
            color: #FF6B35;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 12px;
            margin-top: 20px;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 3px solid #2C3E50;
            border-radius: 8px;
            font-size: 28px;
            font-weight: 900;
            transition: all 0.2s ease;
        }

        .calendar-day.checked {
            background: #4CAF50;
            color: white;
            box-shadow: 3px 3px 0px #2C3E50;
        }

        .calendar-day.unchecked {
            background: #F0F0F0;
            color: #CCC;
        }

        .calendar-label {
            text-align: center;
            font-size: 17px;
            color: #666;
            font-weight: 900;
            padding: 8px;
        }

        /* 載入中 */
        .loading {
            text-align: center;
            padding: 50px;
            font-size: 24px;
            color: #666;
            font-weight: 900;
        }

        .loading::after {
            content: '...';
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {

            0%,
            20% {
                content: '.';
            }

            40% {
                content: '..';
            }

            60%,
            100% {
                content: '...';
            }
        }

        /* 手繪風格滾動條 */
        .highlights::-webkit-scrollbar {
            width: 12px;
        }

        .highlights::-webkit-scrollbar-track {
            background: #F0F0F0;
            border: 2px solid #2C3E50;
            border-radius: 10px;
        }

        .highlights::-webkit-scrollbar-thumb {
            background: #FF6B35;
            border: 2px solid #2C3E50;
            border-radius: 10px;
        }

        /* 響應式設計 */
        @media (max-width: 768px) {
            .two-column-layout {
                grid-template-columns: 1fr;
            }

            .two-column-layout > * {
                min-height: auto;
            }

            /* 手機版移除高度限制 */
            .leaderboard,
            .highlights {
                max-height: none;
                overflow-y: visible;
                padding: 20px;
            }

            /* 亮點卡片手機版 RWD */
            .highlight-card {
                padding: 15px;
                margin-bottom: 15px;
                margin-right: 0;
            }

            .highlight-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 6px;
            }

            .highlight-name {
                font-size: 20px;
            }

            .highlight-date {
                font-size: 14px;
            }

            .highlight-content {
                font-size: 17px;
                line-height: 1.7;
            }

            .highlight-method {
                font-size: 14px;
                padding: 8px 14px;
            }

            .highlight-extra {
                font-size: 15px;
                padding: 10px;
            }

            /* 今日文章區塊手機版 */
            .highlight-article {
                padding: 12px;
            }

            .article-label {
                font-size: 14px;
            }

            .article-text-preview,
            .article-text-full {
                font-size: 15px;
                line-height: 1.7;
            }

            .article-link-button {
                font-size: 14px;
                padding: 8px 16px;
            }

            /* 防止文字溢出 */
            .highlight-content,
            .highlight-extra,
            .article-text-preview,
            .article-text-full {
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
            }

            /* 文章內嵌連結手機版 */
            .article-inline-link {
                word-break: break-all;
            }

            /* 標題連結手機版 */
            .section-header-with-link {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .header-link {
                font-size: 13px;
                padding: 6px 12px;
            }

            .checkin-cta-button {
                padding: 18px 30px;
                font-size: 20px;
                gap: 10px;
            }

            .cta-emoji {
                font-size: 28px;
            }

            .cta-arrow {
                font-size: 24px;
            }

            .context-info-bar {
                flex-direction: column;
                gap: 10px;
                font-size: 13px;
                padding: 15px 20px;
            }

            .info-divider {
                display: none;
            }

            .info-item {
                text-align: center;
            }

            /* 倒數計時器手機版 */
            .countdown-container {
                padding: 10px 14px;
                gap: 8px;
                width: 100%;
                justify-content: center;
            }

            .countdown-label {
                font-size: 13px;
            }

            .countdown-timer {
                font-size: 22px;
            }

            /* 全域刷新按鈕手機版 */
            .global-refresh-button {
                padding: 8px 16px;
                font-size: 14px;
                width: auto;
            }

            .stats-banner {
                grid-template-columns: 1fr;
            }

            .checkin-numbers {
                font-size: 32px;
                gap: 6px;
                flex-wrap: wrap;
            }

            .checkin-unit {
                font-size: 20px;
            }

            .checkin-rate {
                font-size: 24px;
            }

            .personal-stats {
                grid-template-columns: 1fr;
            }

            .header h1 {
                font-size: 38px;
            }

            .header p {
                font-size: 18px;
                line-height: 1.6;
            }

            .header-partner-count {
                display: block;
                margin: 10px auto 0;
                font-size: 16px;
            }

            /* 次要資訊列手機版 */
            .secondary-info-bar {
                flex-wrap: wrap;
                gap: 8px;
                padding: 10px 15px;
                font-size: 12px;
            }

            .info-separator {
                display: none;
            }

            .info-item {
                gap: 4px;
            }

            .info-timezone {
                font-size: 10px;
            }

            .pill-refresh-button {
                padding: 4px 10px;
                font-size: 11px;
            }

            .pill-refresh-button .refresh-text {
                display: none;
            }

            /* 刷新提示手機版 */
            .refresh-notice {
                font-size: 13px;
                padding: 12px 15px;
                gap: 6px;
                flex-direction: column;
                text-align: center;
            }

            .refresh-divider {
                display: none;
            }

            .refresh-message {
                margin-top: 5px;
            }

            .stat-card,
            .leaderboard,
            .highlights,
            .personal-lookup {
                box-shadow: 4px 4px 0px #2C3E50;
            }

            /* 手機版連結文字調整 */
            .view-all-link {
                font-size: 12px;
                padding: 8px 16px;
            }

            /* 挑戰進度手機版 */
            .heatmap-container {
                padding: 20px;
            }

            .heatmap-container h2 {
                font-size: 24px;
            }

            .challenge-progress-info {
                flex-direction: column;
                align-items: stretch;
                gap: 12px;
                padding: 15px;
            }

            .challenge-days {
                justify-content: center;
            }

            .challenge-days .current-day {
                font-size: 24px;
            }

            .challenge-days .current-day span {
                font-size: 30px;
            }

            .challenge-days .total-days {
                font-size: 18px;
            }

            .challenge-progress-bar {
                height: 16px;
            }

            /* 里程碑手機版調整 */
            .milestone-icon {
                width: 24px;
                height: 24px;
                font-size: 14px;
                border-width: 2px;
            }

            .milestone-label {
                font-size: 9px;
                padding: 1px 4px;
            }

            .milestone:hover {
                transform: translate(-50%, -50%) scale(1.1);
            }

            .challenge-percentage {
                font-size: 20px;
                text-align: center;
            }

            .heatmap-grid {
                grid-template-columns: repeat(7, 1fr);
                gap: 3px;
                max-width: 280px;
            }

            .heatmap-legend {
                flex-wrap: wrap;
                gap: 8px;
                font-size: 11px;
            }

            .heatmap-legend-item {
                gap: 4px;
            }

            .heatmap-legend-color {
                width: 12px;
                height: 12px;
            }

            /* 今日打卡動態手機版 */
            .today-checkin-status h2,
            .leaderboard h2,
            .highlights h2 {
                font-size: 24px;
            }

            .section-icon {
                font-size: 26px;
            }

            .section-title {
                font-size: 24px;
            }

            .checkin-numbers-compact {
                font-size: 32px;
            }

            .refresh-button-compact {
                font-size: 16px;
                padding: 12px 20px;
            }

            .toggle-section {
                font-size: 15px;
                padding: 12px 20px;
            }

            #studentAvatarsContainer {
                max-height: 400px;
            }

            /* 手機版滾動條稍微細一點但仍然明顯 */
            #studentAvatarsContainer::-webkit-scrollbar {
                width: 12px;
            }

            .student-avatars {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
                gap: 8px;
            }

            .student-avatar {
                font-size: 14px;
                padding: 10px;
            }

            .student-avatar .emoji {
                font-size: 20px;
            }
        }
/* ============================================
   學員動態與查詢區域
   ============================================ */

.community-section {
    margin-top: 40px;
}

.main-section-title {
    font-size: 38px;
    font-weight: 900;
    color: #2C3E50;
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border: 4px solid #2C3E50;
    border-radius: 12px;
    box-shadow: 6px 6px 0px #2C3E50;
}

.collapsible-section {
    margin-bottom: 20px;
}

.section-toggle-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C52 100%);
    color: white;
    border: 4px solid #2C3E50;
    border-radius: 12px;
    box-shadow: 5px 5px 0px #2C3E50;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-toggle-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px #2C3E50;
}

.section-toggle-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #2C3E50;
}

.toggle-icon {
    font-size: 20px;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(90deg);
}

.toggle-title {
    flex: 1;
    text-align: left;
}

.toggle-content {
    padding: 25px;
    background: white;
    border: 4px solid #2C3E50;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 5px 5px 0px #2C3E50;
    margin-top: -4px;
}

/* 內部內容區塊移除原本的邊框陰影 */
.today-checkin-status-inner,
.leaderboard-inner,
.highlights-inner,
.personal-lookup-inner {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}


/* ============================================
   今日打卡戰況 - 大卡片
   ============================================ */

.today-battle-status {
    background: white;
    border: 5px solid #2C3E50;
    border-radius: 12px;
    box-shadow: 8px 8px 0px #2C3E50;
    padding: 30px;
    margin-bottom: 25px;
}

.battle-title {
    font-size: 28px;
    font-weight: 900;
    color: #2C3E50;
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid #F0F0F0;
}

.battle-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.battle-stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #FFF4E8 0%, #FFE8CC 100%);
    border: 4px solid #2C3E50;
    border-radius: 8px;
    box-shadow: 4px 4px 0px rgba(44, 62, 80, 0.3);
}

.battle-stat-label {
    font-size: 16px;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
}

.battle-stat-value {
    font-size: 42px;
    font-weight: 900;
    color: #FF6B35;
    line-height: 1;
}

.battle-stat-value .checkin-count,
.battle-stat-value .checkin-rate {
    color: #FF6B35;
}

.battle-stat-value .checkin-separator,
.battle-stat-value .checkin-total,
.battle-stat-value .checkin-unit {
    font-size: 24px;
    color: #999;
    font-weight: 700;
}

/* 詳細名單切換按鈕 */
.detail-toggle-button {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background: white;
    color: #2C3E50;
    border: 3px solid #2C3E50;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-toggle-button:hover {
    background: #F5F5F5;
    transform: translateY(-2px);
    box-shadow: 3px 3px 0px #2C3E50;
}

.detail-toggle-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ============================================
   分隔線
   ============================================ */

.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #2C3E50, transparent);
    margin: 50px 0;
    border-radius: 2px;
}

/* ============================================
   個人學習追蹤器
   ============================================ */

.personal-tracker-section {
    background: white;
    border: 5px solid #2C3E50;
    border-radius: 12px;
    box-shadow: 8px 8px 0px #2C3E50;
    padding: 35px;
    margin-top: 30px;
}

.tracker-title {
    font-size: 32px;
    font-weight: 900;
    color: #2C3E50;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #F0F0F0;
}

.lookup-label {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #2C3E50;
    margin-bottom: 15px;
}

.lookup-input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.student-select {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 700;
    border: 4px solid #2C3E50;
    border-radius: 8px;
    background: white;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.student-select:focus {
    outline: none;
    box-shadow: 4px 4px 0px #2C3E50;
    transform: translate(-2px, -2px);
}

.lookup-button {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C52 100%);
    color: white;
    border: 4px solid #2C3E50;
    border-radius: 8px;
    box-shadow: 5px 5px 0px #2C3E50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lookup-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px #2C3E50;
}

.lookup-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #2C3E50;
}

/* 個人統計卡片 - 精簡版 */
.personal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.personal-stat-box {
    padding: 20px;
    background: white;
    border: 4px solid #2C3E50;
    border-radius: 8px;
    box-shadow: 4px 4px 0px rgba(44, 62, 80, 0.3);
    text-align: center;
}

.personal-stat-label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 10px;
}

.personal-stat-value {
    font-size: 28px;
    font-weight: 900;
    color: #FF6B35;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .battle-stats {
        grid-template-columns: 1fr;
    }

    .personal-stats {
        grid-template-columns: 1fr;
    }

    .lookup-input-group {
        flex-direction: column;
    }
}

/* ============================================
   三級視覺系統 - 建立清晰的資訊層次
   ============================================ */

/* 第一級：核心關注區塊（Primary）
   用於：今日打卡戰況
   特徵：最粗框 + 最強陰影 + 橘色漸層標題 */
.visual-primary {
    background: white;
    border: 5px solid #2C3E50;
    border-radius: 12px;
    box-shadow: 8px 8px 0px #2C3E50;
    padding: 30px;
    margin-bottom: 40px;
}

/* 第二級：社群互動區塊（Secondary）
   用於：連續打卡王、每日亮點牆
   特徵：中框 + 中陰影 */
.visual-secondary {
    background: white;
    border: 3px solid #2C3E50;
    border-radius: 10px;
    box-shadow: 4px 4px 0px rgba(44, 62, 80, 0.3);
    padding: 25px;
    margin-bottom: 40px;
}

/* 第三級：工具功能區塊（Tertiary）
   用於：個人學習追蹤器、個人快覽
   特徵：細框 + 無陰影 + 淺灰底 */
.visual-tertiary {
    background: #FAFAFA;
    border: 2px solid #DDD;
    border-radius: 8px;
    box-shadow: none;
    padding: 25px;
    margin-bottom: 40px;
}

/* ============================================
   個人進度快覽區塊（新增）
   ============================================ */

.personal-overview-section {
    background: #FAFAFA;
    border: 2px solid #DDD;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
}

.overview-title {
    font-size: 24px;
    font-weight: 900;
    color: #2C3E50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E0E0E0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.overview-stat-card {
    background: white;
    border: 2px solid #DDD;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.overview-stat-card:hover {
    border-color: #2C3E50;
    transform: translateY(-2px);
}

.overview-stat-label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
}

.overview-stat-value {
    font-size: 32px;
    font-weight: 900;
    color: #FF6B35;
    line-height: 1.2;
}

.overview-stat-unit {
    font-size: 16px;
    color: #999;
    font-weight: 700;
}

/* 簡短摘要列 */
.overview-summary-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 15px;
    color: #495057;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-item strong {
    color: #FF6B35;
    font-size: 18px;
}

.summary-separator {
    color: #CCC;
}

.view-detail-button {
    width: 100%;
    padding: 14px;
    background: white;
    color: #2C3E50;
    border: 2px solid #2C3E50;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-detail-button:hover {
    background: #2C3E50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 2px 2px 0px rgba(44, 62, 80, 0.3);
}

.view-detail-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 學員選擇區域 */
.overview-student-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border: 2px solid #2C3E50;
    border-radius: 6px;
}

.selector-label {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #2C3E50;
    margin-bottom: 12px;
}

.overview-student-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid #2C3E50;
    border-radius: 6px;
    background: white;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.overview-student-select:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.overview-student-select:hover {
    border-color: #FF6B35;
}

/* 今日打卡戰況區塊 */
.today-battle-section {
    background: #FAFAFA;
    border: 2px solid #DDD;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 40px;
    overflow: hidden;
}

#todayBattleContent {
    padding: 0 25px 25px 25px;
}

/* 復盤戰友風采區塊 */
.teammates-section {
    background: #FAFAFA;
    border: 2px solid #DDD;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 40px;
    overflow: hidden;
}

.section-toggle-button {
    width: 100%;
    padding: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.section-toggle-button:hover {
    background: rgba(255, 107, 53, 0.05);
}

.toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toggle-title {
    font-size: 24px;
    font-weight: 900;
    color: #2C3E50;
    display: flex;
    align-items: center;
}

.toggle-icon {
    font-size: 24px;
    color: #2C3E50;
    font-weight: 900;
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.toggle-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #666;
    margin-left: 38px;
}

#teammatesContent {
    padding: 0 25px 25px 25px;
}

/* 響應式：個人快覽 */
@media (max-width: 768px) {
    .overview-stats {
        grid-template-columns: 1fr;
    }

    .overview-summary-line {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 14px;
        padding: 12px 15px;
    }

    .summary-separator {
        display: none;
    }

    .summary-item {
        flex: 1 1 auto;
        justify-content: center;
    }

    .toggle-title {
        font-size: 20px;
    }

    .toggle-subtitle {
        font-size: 14px;
    }
}

