  * { font-family: 'Noto Sans SC', sans-serif; box-sizing: border-box; }
  [x-cloak] { display: none !important; }

  /* ===== 背景 ===== */
  html, body {
    margin: 0; padding: 0;
    height: 100vh;
    overflow: hidden;
    background-color: #0a0a12;
    display: flex;
    flex-direction: column;
  }

  /* 背景图层 */
  .bg-layer {
    position: fixed; inset: 0; z-index: 0;
    background-color: #0a0a12;
    background-size: cover; background-position: center;
  }

  /* ===== 全新5个动感竞技背景（纯CSS实现） ===== */

  /* 1. 烈焰竞速 - 深黑底 + 火焰能量波纹 + 橙红金动感光效 */
  .bg-preset-fire {
    background-color: #0d0805;
    background-image:
      repeating-radial-gradient(
        ellipse 120% 40% at 50% 110%,
        transparent 0px, transparent 28px,
        rgba(255, 100, 0, 0.04) 28px, rgba(255, 100, 0, 0.04) 30px
      ),
      repeating-linear-gradient(
        115deg,
        transparent 0px, transparent 60px,
        rgba(255, 140, 0, 0.03) 60px, rgba(255, 140, 0, 0.03) 62px
      ),
      radial-gradient(ellipse 800px 600px at 50% 100%, rgba(255, 80, 0, 0.22), transparent 55%),
      radial-gradient(ellipse 500px 400px at 20% 15%, rgba(255, 160, 30, 0.14), transparent 60%),
      radial-gradient(ellipse 450px 350px at 80% 12%, rgba(255, 60, 0, 0.10), transparent 60%),
      radial-gradient(ellipse 350px 300px at 50% 50%, rgba(255, 200, 50, 0.06), transparent 60%),
      linear-gradient(175deg, rgba(13,8,5,0.98) 0%, rgba(35,12,5,0.96) 40%, rgba(20,8,3,1) 100%);
  }

  /* 2. 电光脉冲 - 深紫黑底 + 闪电网格 + 蓝紫电光 */
  .bg-preset-electric {
    background-color: #080818;
    background-image:
      linear-gradient(rgba(100, 80, 255, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(100, 80, 255, 0.025) 1px, transparent 1px),
      repeating-linear-gradient(
        55deg,
        transparent 0px, transparent 100px,
        rgba(80, 150, 255, 0.02) 100px, rgba(80, 150, 255, 0.02) 102px
      ),
      radial-gradient(ellipse 600px 600px at 30% 30%, rgba(100, 80, 255, 0.18), transparent 65%),
      radial-gradient(ellipse 500px 500px at 70% 70%, rgba(60, 180, 255, 0.12), transparent 65%),
      radial-gradient(ellipse 400px 400px at 50% 50%, rgba(180, 100, 255, 0.08), transparent 60%),
      linear-gradient(160deg, rgba(8,8,24,0.98) 0%, rgba(18,12,40,0.96) 50%, rgba(8,8,24,1) 100%);
    background-size: 50px 50px, 50px 50px, auto, auto, auto, auto, auto;
  }

  /* 3. 极速赛道 - 深蓝黑底 + 速度光线 + 青蓝霓虹 */
  .bg-preset-track {
    background-color: #050a14;
    background-image:
      repeating-linear-gradient(
        128deg,
        transparent 0px, transparent 50px,
        rgba(0, 220, 200, 0.04) 50px, rgba(0, 220, 200, 0.04) 52px
      ),
      repeating-linear-gradient(
        52deg,
        transparent 0px, transparent 70px,
        rgba(0, 180, 255, 0.025) 70px, rgba(0, 180, 255, 0.025) 72px
      ),
      radial-gradient(ellipse 900px 350px at 15% 18%, rgba(0, 220, 200, 0.18), transparent 65%),
      radial-gradient(ellipse 700px 300px at 85% 15%, rgba(0, 160, 255, 0.13), transparent 65%),
      radial-gradient(ellipse 1000px 250px at 50% 95%, rgba(0, 200, 180, 0.12), transparent 60%),
      radial-gradient(ellipse 400px 300px at 50% 45%, rgba(0, 255, 220, 0.06), transparent 60%),
      linear-gradient(170deg, rgba(5,10,20,0.98) 0%, rgba(8,25,40,0.96) 45%, rgba(5,10,20,1) 100%);
  }

  /* 4. 冠军荣耀 - 深金黑底 + 聚光灯效果 + 金色荣耀光晕 */
  .bg-preset-champion {
    background-color: #0f0c05;
    background-image:
      repeating-conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg, transparent 15deg,
        rgba(255, 200, 60, 0.015) 15deg, rgba(255, 200, 60, 0.015) 17deg
      ),
      radial-gradient(ellipse 500px 500px at 50% 35%, rgba(255, 200, 60, 0.18), transparent 55%),
      radial-gradient(ellipse 700px 400px at 50% 0%, rgba(255, 180, 40, 0.12), transparent 60%),
      radial-gradient(ellipse 450px 350px at 15% 85%, rgba(255, 160, 30, 0.08), transparent 60%),
      radial-gradient(ellipse 450px 350px at 85% 85%, rgba(255, 160, 30, 0.08), transparent 60%),
      radial-gradient(ellipse 300px 200px at 50% 50%, rgba(255, 220, 100, 0.06), transparent 55%),
      linear-gradient(180deg, rgba(15,12,5,0.98) 0%, rgba(30,22,8,0.96) 50%, rgba(15,12,5,1) 100%);
  }

  /* 5. 极限风暴 - 深红黑底 + 风暴漩涡 + 红紫能量 */
  .bg-preset-storm-v2 {
    background-color: #120508;
    background-image:
      repeating-radial-gradient(
        ellipse 100% 100% at 50% 50%,
        transparent 0px, transparent 45px,
        rgba(220, 40, 80, 0.02) 45px, rgba(220, 40, 80, 0.02) 47px
      ),
      repeating-linear-gradient(
        90deg,
        transparent 0px, transparent 80px,
        rgba(180, 40, 120, 0.02) 80px, rgba(180, 40, 120, 0.02) 82px
      ),
      radial-gradient(ellipse 700px 700px at 50% 50%, rgba(220, 40, 80, 0.14), transparent 55%),
      radial-gradient(ellipse 500px 500px at 25% 25%, rgba(255, 60, 100, 0.10), transparent 60%),
      radial-gradient(ellipse 500px 500px at 75% 75%, rgba(180, 50, 200, 0.08), transparent 60%),
      radial-gradient(ellipse 400px 300px at 50% 20%, rgba(255, 80, 60, 0.08), transparent 55%),
      linear-gradient(145deg, rgba(18,5,8,0.98) 0%, rgba(35,8,15,0.96) 50%, rgba(18,5,8,1) 100%);
  }

  /* 自定义图片 */
  .bg-preset-custom {
    background-size: cover; background-position: center;
  }

  /* 6. 阳光跳绳 - 亮色天蓝底 + 金色阳光 + 跳绳弧线 */
  .bg-preset-sunshine {
    background-color: #e3f2fd;
    background-image:
      /* 跳绳弧线（多条波浪模拟跳绳轨迹） */
      repeating-radial-gradient(
        ellipse 200px 80px at 50% 60%,
        transparent 0px, transparent 18px,
        rgba(255, 193, 7, 0.06) 18px, rgba(255, 193, 7, 0.06) 20px
      ),
      /* 阳光光晕（右上角太阳） */
      radial-gradient(circle 300px at 85% 15%, rgba(255, 193, 7, 0.25), transparent 60%),
      radial-gradient(circle 500px at 85% 15%, rgba(255, 235, 59, 0.12), transparent 70%),
      /* 底部能量条 */
      linear-gradient(180deg, transparent 70%, rgba(30, 136, 229, 0.08) 100%),
      /* 主体渐变 */
      linear-gradient(160deg, #e3f2fd 0%, #bbdefb 40%, #e1f5fe 100%);
  }

  /* 7. 薄荷活力 - 亮色薄荷绿底 + 翠绿能量 + 跳绳轨迹 */
  .bg-preset-mint {
    background-color: #e0f2f1;
    background-image:
      /* 跳绳弧线 */
      repeating-radial-gradient(
        ellipse 180px 70px at 50% 55%,
        transparent 0px, transparent 16px,
        rgba(0, 200, 83, 0.05) 16px, rgba(0, 200, 83, 0.05) 18px
      ),
      /* 绿色光晕 */
      radial-gradient(ellipse 600px 400px at 20% 20%, rgba(0, 200, 83, 0.12), transparent 60%),
      radial-gradient(ellipse 500px 350px at 80% 80%, rgba(0, 230, 118, 0.10), transparent 60%),
      /* 底部渐变 */
      linear-gradient(180deg, transparent 75%, rgba(0, 105, 92, 0.06) 100%),
      linear-gradient(150deg, #e0f2f1 0%, #b2dfdb 40%, #e8f5e9 100%);
  }

  /* 8. 珊瑚跃动 - 亮色暖橙底 + 珊瑚红 + 跳绳弧线 */
  .bg-preset-coral {
    background-color: #fff3e0;
    background-image:
      /* 跳绳弧线 */
      repeating-radial-gradient(
        ellipse 190px 75px at 50% 58%,
        transparent 0px, transparent 17px,
        rgba(255, 87, 34, 0.05) 17px, rgba(255, 87, 34, 0.05) 19px
      ),
      /* 珊瑚色光晕 */
      radial-gradient(ellipse 550px 380px at 15% 15%, rgba(255, 138, 101, 0.14), transparent 60%),
      radial-gradient(ellipse 450px 320px at 85% 85%, rgba(255, 87, 34, 0.10), transparent 60%),
      /* 底部渐变 */
      linear-gradient(180deg, transparent 72%, rgba(230, 74, 25, 0.06) 100%),
      linear-gradient(145deg, #fff3e0 0%, #ffe0b2 35%, #fff8e1 100%);
  }

  /* ===== 暗色背景下的内容适配（通用） ===== */
  body.dark-bg .event-title { color: #e2e8f0; text-shadow: 0 1px 0 rgba(0,0,0,0.3); }
  body.dark-bg .event-subtitle { color: #60a5fa; }
  body.dark-bg .text-slate-700 { color: #cbd5e1 !important; }
  body.dark-bg .text-slate-500 { color: #94a3b8 !important; }
  body.dark-bg .top-bar { border-bottom: 1px solid rgba(255,255,255,0.08); }
  body.dark-bg .bg-white\/60 { background: rgba(255,255,255,0.12) !important; }
  body.dark-bg .ribbon-tl,
  body.dark-bg .ribbon-tr,
  body.dark-bg .ribbon-bl,
  body.dark-bg .ribbon-wave { display: none; }

  /* ===== 各背景模式下的文字颜色自适应 ===== */

  /* 1. 烈焰竞速：橙红金主题 */
  body.bg-mode-fire .event-title  { color: #fff8e1; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,140,0,0.15); }
  body.bg-mode-fire .event-subtitle { color: #ffab40; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-fire .text-slate-700 { color: #ffe0b2 !important; }
  body.bg-mode-fire .text-slate-500 { color: #ffcc80 !important; }

  /* 2. 电光脉冲：蓝紫主题 */
  body.bg-mode-electric .event-title  { color: #e8eaf6; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(100,80,255,0.15); }
  body.bg-mode-electric .event-subtitle { color: #82b1ff; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-electric .text-slate-700 { color: #c5cae9 !important; }
  body.bg-mode-electric .text-slate-500 { color: #9fa8da !important; }

  /* 3. 极速赛道：青蓝主题 */
  body.bg-mode-track .event-title  { color: #e0f7fa; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(0,220,200,0.15); }
  body.bg-mode-track .event-subtitle { color: #00e5ff; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-track .text-slate-700 { color: #b2ebf2 !important; }
  body.bg-mode-track .text-slate-500 { color: #80deea !important; }

  /* 4. 冠军荣耀：金色主题 */
  body.bg-mode-champion .event-title  { color: #fffde7; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,200,60,0.15); }
  body.bg-mode-champion .event-subtitle { color: #ffd54f; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-champion .text-slate-700 { color: #fff9c4 !important; }
  body.bg-mode-champion .text-slate-500 { color: #fff59d !important; }

  /* 5. 极限风暴：红紫主题 */
  body.bg-mode-storm-v2 .event-title  { color: #fce4ec; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(220,40,80,0.15); }
  body.bg-mode-storm-v2 .event-subtitle { color: #ff80ab; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-storm-v2 .text-slate-700 { color: #f8bbd9 !important; }
  body.bg-mode-storm-v2 .text-slate-500 { color: #f48fb1 !important; }

  /* 自定义图片：通用高对比白 */
  body.bg-mode-custom .event-title  { color: #ffffff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
  body.bg-mode-custom .event-subtitle { color: #e0e0e0; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
  body.bg-mode-custom .text-slate-700 { color: #f5f5f5 !important; }
  body.bg-mode-custom .text-slate-500 { color: #e0e0e0 !important; }

  /* 6. 阳光跳绳：亮色蓝金主题 — 深色文字保证可读性 */
  body.bg-mode-sunshine { color: #1a237e; }
  body.bg-mode-sunshine .event-title  { color: #1565c0; text-shadow: 0 1px 3px rgba(255,255,255,0.8); }
  body.bg-mode-sunshine .event-subtitle { color: #f57f17; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }
  body.bg-mode-sunshine .text-slate-700 { color: #1565c0 !important; }
  body.bg-mode-sunshine .text-slate-500 { color: #1976d2 !important; }
  body.bg-mode-sunshine .top-bar { border-bottom: 1px solid rgba(21, 101, 192, 0.12); }
  body.bg-mode-sunshine .bg-white\/60 { background: rgba(255, 255, 255, 0.75) !important; }
  body.bg-mode-sunshine .ribbon-tl,
  body.bg-mode-sunshine .ribbon-tr,
  body.bg-mode-sunshine .ribbon-wave { display: none; }

  /* 7. 薄荷活力：亮色翠绿主题 */
  body.bg-mode-mint { color: #004d40; }
  body.bg-mode-mint .event-title  { color: #00695c; text-shadow: 0 1px 3px rgba(255,255,255,0.8); }
  body.bg-mode-mint .event-subtitle { color: #2e7d32; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }
  body.bg-mode-mint .text-slate-700 { color: #00695c !important; }
  body.bg-mode-mint .text-slate-500 { color: #00796b !important; }
  body.bg-mode-mint .top-bar { border-bottom: 1px solid rgba(0, 105, 92, 0.12); }
  body.bg-mode-mint .bg-white\/60 { background: rgba(255, 255, 255, 0.75) !important; }
  body.bg-mode-mint .ribbon-tl,
  body.bg-mode-mint .ribbon-tr,
  body.bg-mode-mint .ribbon-wave { display: none; }

  /* 8. 珊瑚跃动：亮色暖橙主题 */
  body.bg-mode-coral { color: #bf360c; }
  body.bg-mode-coral .event-title  { color: #d84315; text-shadow: 0 1px 3px rgba(255,255,255,0.8); }
  body.bg-mode-coral .event-subtitle { color: #e65100; text-shadow: 0 1px 2px rgba(255,255,255,0.6); }
  body.bg-mode-coral .text-slate-700 { color: #d84315 !important; }
  body.bg-mode-coral .text-slate-500 { color: #ef6c00 !important; }
  body.bg-mode-coral .top-bar { border-bottom: 1px solid rgba(216, 67, 21, 0.12); }
  body.bg-mode-coral .bg-white\/60 { background: rgba(255, 255, 255, 0.75) !important; }
  body.bg-mode-coral .ribbon-tl,
  body.bg-mode-coral .ribbon-tr,
  body.bg-mode-coral .ribbon-wave { display: none; }

  /* 彩带装饰 */
  .ribbon-tl {
    position: fixed; top: 0; left: 0; width: 220px; height: 220px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 40%, #6bcbff 80%);
    clip-path: ellipse(60% 80% at 0% 0%);
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
  }
  .ribbon-tr {
    position: fixed; top: 0; right: 0; width: 200px; height: 250px;
    background: linear-gradient(225deg, #ff6b6b 0%, #ffd93d 50%, #ff9a3c 100%);
    clip-path: ellipse(70% 90% at 100% 0%);
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
  }
  .ribbon-bl {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 80px;
    background: linear-gradient(180deg, transparent 0%, #2196F3 100%);
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
  }
  .ribbon-wave {
    position: fixed; bottom: 0; left: 0; width: 100%;
    z-index: 1;
    pointer-events: none;
  }

  /* ===== 顶部标题区 ===== */
  .top-bar {
    position: relative; z-index: 10;
    padding: 18px 40px 12px;
    text-align: center;
    flex-shrink: 0;
  }
  .fullscreen-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #64748b;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(6px);
  }
  .fullscreen-btn:hover {
    background: rgba(255,255,255,0.95);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transform: scale(1.08);
  }
  body.dark-bg .fullscreen-btn {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.15);
  }
  body.dark-bg .fullscreen-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
  }
  .event-title {
    font-size: clamp(1.4rem, 2.8vw, 2.2rem);
    font-weight: 900;
    color: #1a2a4a;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  }
  .event-subtitle {
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    color: #2563eb;
    font-weight: 600;
    margin-top: 3px;
    letter-spacing: 0.06em;
  }

  /* ===== 运动员卡片 ===== */
  .athlete-card {
    background: linear-gradient(135deg, #1565C0 0%, #1976D2 40%, #1E88E5 100%);
    border-radius: 16px;
    border: 2px solid #42a5f5;
    box-shadow: 0 6px 24px rgba(21, 101, 192, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s;
  }
  .athlete-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  }
  .athlete-card.score-in {
    animation: cardFlash 1.6s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes cardFlash {
    0%  { box-shadow: 0 6px 24px rgba(21,101,192,0.45), 0 0 0 0 rgba(255,215,0,0.8); border-color: #FFD700; }
    20% { box-shadow: 0 6px 40px rgba(21,101,192,0.6), 0 0 30px 8px rgba(255,215,0,0.5); border-color: #FFD700; transform: scale(1.03); }
    100%{ box-shadow: 0 6px 24px rgba(21,101,192,0.45); border-color: #42a5f5; transform: scale(1); }
  }

  /* 卡片顶部标签栏 */
  .card-header {
    background: rgba(0,0,0,0.25);
    padding: 7px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .card-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.03em;
  }
  .card-group-tag {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.12);
    padding: 2px 8px;
    border-radius: 20px;
  }

  /* 卡片主体 */
  .card-body {
    display: flex;
    align-items: stretch; /* 改为stretch让score-box能撑高 */
    gap: 12px;
    padding: 14px 14px 16px;
  }

  /* 运动员信息左侧 */
  .athlete-info {
    flex: 1;
    min-width: 0;
  }
  .avatar-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
  }
  .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: linear-gradient(135deg, #90caf9, #42a5f5);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  .athlete-names {
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-weight: 700;
    color: white;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
  .athlete-team {
    font-size: clamp(0.68rem, 1vw, 0.78rem);
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 成绩右侧大数字 */
  .score-box {
    background: linear-gradient(135deg, #1565C0 0%, #0d47a1 100%);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.3), 0 3px 12px rgba(0,0,0,0.2);
  }
  /* 计数赛/规定赛：固定大小 */
  .score-box:not(:has(.freestyle-scores-container)) {
    width: clamp(70px, 9vw, 110px);
    height: clamp(70px, 9vw, 110px);
    flex-shrink: 0;
  }
  /* 花样赛成绩区域：自适应扩展 */
  .score-box:has(.freestyle-scores-container) {
    flex: 1 1 0%;
    width: auto;
    min-width: 260px;
    max-width: 480px;
    padding: 10px 12px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .score-number {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 900;
    color: white;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  }
  .score-number.pending {
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    color: rgba(255,255,255,0.4);
  }
  .score-unit {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
    font-weight: 500;
  }
  .penalty-note {
    font-size: 0.75rem;
    color: #f87171;
    font-weight: 600;
    margin-top: 4px;
  }
  .card-forfeited {
    opacity: 0.5;
  }
  /* 新成绩高亮闪烁动画 */
  .athlete-card.score-in {
    animation: cardHighlight 2.5s ease-out;
  }
  @keyframes cardHighlight {
    0%   { box-shadow: 0 0 0 4px #FFD700, 0 8px 32px rgba(0,0,0,0.3); transform: scale(1.02); }
    30%  { box-shadow: 0 0 0 4px #FFD700, 0 8px 32px rgba(0,0,0,0.3); }
    100% { box-shadow: 0 8px 32px rgba(0,0,0,0.3); transform: scale(1); }
  }
  /* 未录入成绩卡片暗色提示 */
  .athlete-card.pending-score {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.04);
  }
  .athlete-card.pending-score .card-name {
    color: rgba(255,255,255,0.5);
  }
  .forfeited-label {
    font-size: 2rem;
    color: #9ca3af;
    font-weight: 700;
  }
  /* ===== 规定赛成绩四卡片网格 ===== */
  .prescribed-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    flex-shrink: 0;
    width: clamp(140px, 16vw, 200px);
    height: clamp(80px, 10vw, 130px);
  }
  .prescribed-score-card {
    background: linear-gradient(135deg, rgba(13,71,161,0.7) 0%, rgba(21,101,192,0.6) 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.2);
    transition: all 0.3s;
    overflow: hidden;
  }
  .prescribed-score-card.submitted {
    background: linear-gradient(135deg, rgba(13,71,161,0.9) 0%, rgba(21,101,192,0.85) 100%);
    border-color: rgba(255,255,255,0.25);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.2);
  }
  .prescribed-score-card.prescribed-total {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    border-color: rgba(255,255,255,0.3);
  }
  .prescribed-score-card.prescribed-total.submitted {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border-color: rgba(255,255,255,0.4);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.2), 0 0 12px rgba(245,158,11,0.4);
  }
  .prescribed-score-card .psc-label {
    font-size: clamp(0.55rem, 0.8vw, 0.7rem);
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 2px;
    white-space: nowrap;
  }
  .prescribed-score-card .psc-value {
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    font-weight: 900;
    color: white;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }
  .prescribed-score-card .psc-value.pending {
    color: rgba(255,255,255,0.35);
    font-size: clamp(0.9rem, 1.4vw, 1.3rem);
  }
  .prescribed-score-card.prescribed-total .psc-value {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
  }
  .prescribed-score-card .psc-sub {
    font-size: 0.65rem;
    color: rgba(251, 191, 36, 0.95);  /* 琥珀色高亮 */
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 0.02em;
  }

  /* ===== 花样赛成绩布局（单行流式 + 固定比例） ===== */
  .freestyle-scores-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    width: 100%;
    height: 100%;
    justify-content: center;
    overflow: hidden;
  }
  /* 第一排：主裁 + 难度 + 完成（3等分） */
  .freestyle-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    width: 100%;
  }
  .freestyle-top-row .prescribed-score-card {
    height: 56px;
    padding: 3px 4px;
    overflow: hidden;
  }
  .freestyle-top-row .prescribed-score-card .psc-label {
    font-size: 11px;
    margin-bottom: 1px;
    line-height: 1;
  }
  .freestyle-top-row .prescribed-score-card .psc-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
  }
  /* 第二排：创意 + 规定扣（2个等分，全宽） */
  .freestyle-mid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
  }
  .freestyle-mid-row .prescribed-score-card {
    height: 56px;
    padding: 3px 4px;
    overflow: hidden;
  }
  .freestyle-mid-row .prescribed-score-card .psc-label {
    font-size: 11px;
    margin-bottom: 1px;
    line-height: 1;
  }
  .freestyle-mid-row .prescribed-score-card .psc-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
  }
  /* 第三排：总分全宽 */
  .freestyle-total-row {
    display: flex;
    width: 100%;
  }
  .freestyle-total-row .prescribed-score-card {
    flex: 1;
    height: 78px;
    padding: 4px 10px;
    overflow: hidden;
  }
  .freestyle-total-row .prescribed-score-card .psc-label {
    font-size: 12px;
    margin-bottom: 2px;
    line-height: 1;
  }
  .freestyle-total-row .prescribed-score-card .psc-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.01em;
  }
  /* 旧的 bottom-row（保留兼容，不再使用） */
  .freestyle-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 8px;
    width: 100%;
  }
  .freestyle-bottom-row .prescribed-score-card {
    height: clamp(90px, 12vw, 120px);
    padding: 8px 8px;
  }
  .freestyle-bottom-row .prescribed-score-card .psc-label {
    font-size: clamp(0.65rem, 0.95vw, 0.85rem);
    margin-bottom: 4px;
  }
  .freestyle-bottom-row .prescribed-score-card .psc-value {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
  }
  /* 花样赛总分卡片 — 突出放大，金色光晕+亮色字 */
  .freestyle-total-card {
    background: linear-gradient(135deg, rgba(30,64,175,0.95) 0%, rgba(37,99,235,1) 100%) !important;
    border-color: rgba(147,197,253,0.7) !important;
    box-shadow: 0 0 20px rgba(59,130,246,0.55), inset 0 1px 4px rgba(0,0,0,0.2) !important;
  }
  .freestyle-total-card.submitted {
    background: linear-gradient(135deg, rgba(37,99,235,1) 0%, rgba(59,130,246,0.95) 100%) !important;
    border-color: rgba(147,197,253,0.9) !important;
    box-shadow: 0 0 26px rgba(59,130,246,0.75), inset 0 1px 4px rgba(0,0,0,0.2) !important;
  }
  .freestyle-total-card .psc-value {
    color: #93c5fd !important;
  }
  .freestyle-total-card.submitted .psc-value {
    color: #fde68a !important;
    text-shadow: 0 0 12px rgba(253,224,71,0.6);
  }
  .freestyle-rank-badge {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: rgba(251,191,36,0.95);
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.05em;
    margin-top: 2px;
  }

  .score-number.new-anim {
    animation: scoreCountUp 0.6s cubic-bezier(0.16,1,0.3,1);
  }
  @keyframes scoreCountUp {
    0%  { transform: scale(0.5); color: #FFD700; text-shadow: 0 0 20px #FFD700; }
    60% { transform: scale(1.15); color: #FFD700; }
    100%{ transform: scale(1); color: white; }
  }

  /* ===== 主网格 ===== */
  .cards-grid {
    position: relative; z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 0 32px 20px;
    justify-content: center;
    align-content: center;
    flex: 1;
  }

  /* 根据卡片数量自动调整宽度 */
  .cards-grid.count-1 {
    align-items: center;
    justify-content: center;
    padding-bottom: 60px;
  }
  .cards-grid.count-1 .athlete-card {
    width: min(90vw, 1300px);
    min-height: clamp(300px, 44vh, 450px);
    display: flex;
    flex-direction: column;
  }
  .cards-grid.count-1 .card-body {
    padding: 24px 32px 28px;
    gap: 24px;
    flex: 1;
    align-items: stretch;
  }
  .cards-grid.count-1 .athlete-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    flex: 1;
    padding-right: 40px;
  }
  .cards-grid.count-1 .avatar-row {
    gap: 10px;
    margin-bottom: 0;
  }
  .cards-grid.count-1 .avatar {
    width: 64px; height: 64px;
    font-size: 1.4rem;
    border-width: 3px;
  }
  .cards-grid.count-1 .athlete-names {
    font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  }
  .cards-grid.count-1 .athlete-team {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  }
  /* count-1: 计数/规定赛大号成绩框 */
  .cards-grid.count-1 .score-box:not(:has(.freestyle-scores-container)) {
    width: clamp(440px, 48vw, 660px);
    height: clamp(260px, 34vw, 420px);
    border-radius: 20px;
    border-width: 3px;
  }
  /* count-1: 花样赛成绩框撑满右侧 */
  .cards-grid.count-1 .score-box:has(.freestyle-scores-container) {
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: clamp(220px, 30vw, 380px);
    border-radius: 20px;
    border-width: 3px;
    padding: 20px 24px;
  }
  .cards-grid.count-1 .score-number {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
  }
  .cards-grid.count-1 .score-number.pending {
    font-size: clamp(2rem, 4vw, 3.5rem);
  }
  .cards-grid.count-1 .prescribed-scores-grid {
    width: 100%;
    height: 100%;
    gap: 16px;
  }
  /* count-1: 规定赛小卡片放大 */
  .cards-grid.count-1 .prescribed-score-card {
    border-radius: 20px;
    border-width: 2px;
    padding: 16px;
  }
  .cards-grid.count-1 .prescribed-score-card .psc-label {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: 14px;
  }
  .cards-grid.count-1 .prescribed-score-card .psc-value {
    font-size: clamp(3rem, 5vw, 4.5rem);
  }
  .cards-grid.count-1 .prescribed-score-card .psc-value.pending {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
  }
  .cards-grid.count-1 .prescribed-score-card.prescribed-total .psc-value {
    font-size: clamp(3.6rem, 6vw, 5.5rem);
  }
  /* count-1: 花样赛行高度放大 */
  .cards-grid.count-1 .freestyle-scores-container {
    gap: 14px;
  }
  .cards-grid.count-1 .freestyle-top-row {
    gap: 12px;
  }
  .cards-grid.count-1 .freestyle-top-row .prescribed-score-card {
    height: clamp(70px, 8.5vw, 110px);
    border-radius: 16px;
    padding: 8px 10px;
    overflow: hidden;
  }
  .cards-grid.count-1 .freestyle-top-row .prescribed-score-card .psc-label {
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    margin-bottom: 4px;
  }
  .cards-grid.count-1 .freestyle-top-row .prescribed-score-card .psc-value {
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    line-height: 1.1;
  }
  .cards-grid.count-1 .freestyle-mid-row {
    gap: 12px;
  }
  .cards-grid.count-1 .freestyle-mid-row .prescribed-score-card {
    height: clamp(70px, 8.5vw, 110px);
    border-radius: 16px;
    padding: 8px 10px;
    overflow: hidden;
  }
  .cards-grid.count-1 .freestyle-mid-row .prescribed-score-card .psc-label {
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    margin-bottom: 4px;
  }
  .cards-grid.count-1 .freestyle-mid-row .prescribed-score-card .psc-value {
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    line-height: 1.1;
  }
  .cards-grid.count-1 .freestyle-total-row .prescribed-score-card {
    height: clamp(95px, 12vw, 150px);
    border-radius: 20px;
    padding: 10px 16px;
    overflow: hidden;
  }
  .cards-grid.count-1 .freestyle-total-row .prescribed-score-card .psc-label {
    font-size: clamp(1rem, 1.6vw, 1.4rem);
    margin-bottom: 6px;
  }
  .cards-grid.count-1 .freestyle-total-row .prescribed-score-card .psc-value {
    font-size: clamp(3rem, 5.5vw, 5rem);
    line-height: 1.1;
    letter-spacing: 0.02em;
  }
  .cards-grid.count-1 .freestyle-rank-badge {
    font-size: clamp(1rem, 1.6vw, 1.4rem);
  }

  .cards-grid.count-2 .athlete-card { width: calc(50% - 7px); max-width: 440px; }
  .cards-grid.count-3 .athlete-card { width: calc(33.33% - 10px); max-width: 380px; }
  .cards-grid.count-4 .athlete-card { width: calc(25% - 11px); }
  .cards-grid.count-5 .athlete-card,
  .cards-grid.count-6 .athlete-card { width: calc(33.33% - 10px); }
  .cards-grid.count-7 .athlete-card,
  .cards-grid.count-8 .athlete-card { width: calc(25% - 11px); }
  .cards-grid.count-gt8 .athlete-card { width: calc(20% - 12px); }

  /* ===== 通知浮层 ===== */
  .score-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    z-index: 100;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  }
  .score-toast.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  .score-toast.hide {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0;
  }
  .toast-inner {
    background: linear-gradient(135deg, #0d47a1, #1565C0);
    border: 3px solid #FFD700;
    border-radius: 24px;
    padding: 32px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255,215,0,0.3);
    min-width: 320px;
  }
  .toast-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
  }
  .toast-score {
    font-size: 4rem;
    font-weight: 900;
    color: #FFD700;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255,215,0,0.6);
  }
  .toast-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
  }

  /* 底部进度条 */
  .bottom-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 20;
    height: 44px;
    background: linear-gradient(135deg, #1565C0 0%, #1976D2 100%);
    display: flex; align-items: center;
    padding: 0 32px;
    gap: 16px;
    border-top: 2px solid rgba(255,255,255,0.2);
  }
  .marquee-wrap { overflow: hidden; white-space: nowrap; flex: 1; }
  .marquee-inner { display: inline-flex; animation: marquee 28s linear infinite; }
  @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

  .live-dot {
    width: 8px; height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
  }
  @keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(74,222,128,0); }
  }

  ::-webkit-scrollbar { display: none; }

  /* ===== 大屏管理 layout 设置（管理员端配置后生效）===== */
  .cards-grid.layout-3 .athlete-card { width: calc(33.33% - 10px); }
  .cards-grid.layout-4 .athlete-card { width: calc(25% - 11px); }
  .cards-grid.layout-6 .athlete-card { width: calc(16.666% - 11.66px); }
  .cards-grid.layout-list .athlete-card { width: 100%; max-width: 680px; margin-left: auto; margin-right: auto; }

  /* ===== 场次切换过渡动画 ===== */
  /* 旧卡片向左滑出 */
  .cards-grid.transition-out .athlete-card {
    animation: slideOutLeft 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
  }
  .cards-grid.transition-out .athlete-card:nth-child(1)  { animation-delay: 0s; }
  .cards-grid.transition-out .athlete-card:nth-child(2)  { animation-delay: 0.04s; }
  .cards-grid.transition-out .athlete-card:nth-child(3)  { animation-delay: 0.08s; }
  .cards-grid.transition-out .athlete-card:nth-child(4)  { animation-delay: 0.12s; }
  .cards-grid.transition-out .athlete-card:nth-child(5)  { animation-delay: 0.16s; }
  .cards-grid.transition-out .athlete-card:nth-child(6)  { animation-delay: 0.2s; }
  .cards-grid.transition-out .athlete-card:nth-child(n+7)  { animation-delay: 0.24s; }

  /* 新卡片从右滑入 */
  .cards-grid.transition-in .athlete-card {
    animation: slideInRight 0.45s cubic-bezier(0, 0, 0.2, 1) forwards;
    opacity: 0; /* 初始隐藏，animation 会覆盖 */
  }
  .cards-grid.transition-in .athlete-card:nth-child(1)  { animation-delay: 0.1s; }
  .cards-grid.transition-in .athlete-card:nth-child(2)  { animation-delay: 0.15s; }
  .cards-grid.transition-in .athlete-card:nth-child(3)  { animation-delay: 0.2s; }
  .cards-grid.transition-in .athlete-card:nth-child(4)  { animation-delay: 0.25s; }
  .cards-grid.transition-in .athlete-card:nth-child(5)  { animation-delay: 0.3s; }
  .cards-grid.transition-in .athlete-card:nth-child(6)  { animation-delay: 0.35s; }
  .cards-grid.transition-in .athlete-card:nth-child(n+7)  { animation-delay: 0.4s; }

  @keyframes slideOutLeft {
    0%   { transform: translateX(0) scale(1);   opacity: 1; }
    30%  { transform: translateX(-10%) scale(0.98); opacity: 0.7; }
    100% { transform: translateX(-120%) scale(0.9);  opacity: 0; }
  }
  @keyframes slideInRight {
    0%   { transform: translateX(120%) scale(0.9);  opacity: 0; }
    60%  { transform: translateX(-3%) scale(1.01);  opacity: 0.9; }
    80%  { transform: translateX(1%) scale(0.99);   opacity: 1; }
    100% { transform: translateX(0) scale(1);        opacity: 1; }
  }

  /* ===== 场次切换覆盖层 ===== */
  .session-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    pointer-events: none;
    animation: overlayFadeIn 0.35s ease-out;
  }
  @keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .session-overlay-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .session-overlay-sessions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }
  .session-overlay-num {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: white;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    line-height: 1;
  }
  .session-overlay-arrow {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: rgba(255, 255, 255, 0.5);
    animation: arrowPulse 0.6s ease-out;
    line-height: 1;
  }
  .session-overlay-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
  }
  .session-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  @keyframes popIn {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
  }
  @keyframes arrowPulse {
    0%   { transform: scale(0.3); opacity: 0; }
    50%  { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1);   opacity: 0.8; }
  }

  /* ===== 赛后庆祝特效 ===== */
  .celebration-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 300;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, rgba(255,215,0,0.35) 0%, rgba(0,0,0,0.85) 100%);
    pointer-events: none;
    animation: celebFadeIn 0.5s ease-out;
  }
  @keyframes celebFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
  }
  .celebration-flash {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 301;
    pointer-events: none;
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.5) 0%, transparent 60%);
    animation: celebFlash 1.0s ease-out forwards;
  }
  @keyframes celebFlash {
    0%   { opacity: 1; }
    40%  { opacity: 0.6; }
    100% { opacity: 0; }
  }
  .celebration-message {
    position: relative; z-index: 302;
    text-align: center;
    animation: celebMsgIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
  }
  @keyframes celebMsgIn {
    0%   { opacity: 0; transform: scale(0.3) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
  }
  .celebration-trophy {
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 1;
    filter: drop-shadow(0 0 40px rgba(255,215,0,0.6));
    animation: celebTrophy 1.5s ease-in-out infinite;
  }
  @keyframes celebTrophy {
    0%,100% { transform: translateY(0) scale(1); }
    50%     { transform: translateY(-8px) scale(1.05); }
  }
  .celebration-title {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 60px rgba(255,215,0,0.4), 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.08em;
    margin-top: 8px;
  }
  .celebration-subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    margin-top: 10px;
    letter-spacing: 0.04em;
  }

  /* 纸屑粒子 */
  .confetti-container {
    position: fixed; top: -20px; left: 0; right: 0; bottom: 0;
    z-index: 301;
    pointer-events: none;
    overflow: hidden;
  }
  .confetti-wrapper {
    position: absolute; top: -20px;
    animation: confettiDrift ease-in-out infinite;
  }
  .confetti-piece {
    display: block;
    opacity: 0;
    animation: confettiFall linear forwards;
  }
  @keyframes confettiFall {
    0%   { opacity: 0; transform: translateY(0) rotate(0deg) scale(1); }
    5%   { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(105vh) rotate(720deg) scale(0.5); }
  }
  @keyframes confettiDrift {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(var(--sway, 15px)); }
    75%     { transform: translateX(calc(var(--sway, 15px) * -1)); }
  }

  /* Alpine.js cloak：初始化完成前隐藏带 x-cloak 的元素 */
  [x-cloak] { display: none !important; }

  /* 数据加载完成后淡入 */
  @keyframes fadeIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
  .fade-in { animation: fadeIn 0.4s ease-out forwards; }

  /* ===== 移动端适配（手机/平板） ===== */

  /* 平板及以下 */
  @media (max-width: 1024px) {
    .top-bar { padding: 10px 16px 8px; }
    .event-title { font-size: clamp(1rem, 3vw, 1.6rem); }
    .event-subtitle { font-size: clamp(0.75rem, 2vw, 1rem); }
    .cards-grid { padding: 0 12px 16px; gap: 10px; }
    .score-number { font-size: clamp(1.4rem, 4vw, 2.4rem); }
    .score-number.pending { font-size: clamp(1rem, 3vw, 1.8rem); }
    /* 卡片宽度调整 */
    .cards-grid.count-1 .athlete-card { max-width: 100%; }
    .cards-grid.count-2 .athlete-card { width: calc(50% - 5px); max-width: 100%; }
    .cards-grid.count-3 .athlete-card { width: calc(50% - 5px); max-width: 100%; }
    .cards-grid.count-4 .athlete-card { width: calc(50% - 5px); }
    .cards-grid.count-5 .athlete-card,
    .cards-grid.count-6 .athlete-card { width: calc(50% - 5px); }
    .cards-grid.count-7 .athlete-card,
    .cards-grid.count-8 .athlete-card { width: calc(33.33% - 7px); }
    .cards-grid.count-gt8 .athlete-card { width: calc(33.33% - 7px); }
    /* 装饰彩带隐藏 */
    .ribbon-tl, .ribbon-tr { display: none; }
    .ribbon-wave { height: 40px !important; }
  }

  /* 手机竖屏 */
  @media (max-width: 640px) {
    html, body { overflow: auto; height: auto; min-height: 100vh; }
    .top-bar { padding: 8px 12px 6px; }
    .event-title { font-size: clamp(0.9rem, 4vw, 1.3rem); letter-spacing: 0.02em; }
    .event-subtitle { font-size: clamp(0.7rem, 3vw, 0.95rem); }
    .cards-grid { padding: 0 8px 80px; gap: 8px; }
    /* 手机端全部单列或双列 */
    .cards-grid.count-1 .athlete-card,
    .cards-grid.count-2 .athlete-card,
    .cards-grid.count-3 .athlete-card,
    .cards-grid.count-4 .athlete-card { width: 100%; max-width: 100%; }
    .cards-grid.count-5 .athlete-card,
    .cards-grid.count-6 .athlete-card,
    .cards-grid.count-7 .athlete-card,
    .cards-grid.count-8 .athlete-card,
    .cards-grid.count-gt8 .athlete-card { width: calc(50% - 4px); }
    .score-number { font-size: clamp(1.2rem, 5vw, 2rem); }
    .score-number.pending { font-size: clamp(0.9rem, 4vw, 1.4rem); }
    /* 全屏按钮缩小 */
    .fullscreen-btn { width: 32px; height: 32px; border-radius: 8px; }
    /* 波浪隐藏 */
    .ribbon-wave { display: none; }
    /* 卡片内边距紧凑 */
    .athlete-card { border-radius: 12px; }
    /* 单卡片模式：运动员名字放大 */
    .cards-grid.count-1 .athlete-info { font-size: clamp(1rem, 4vw, 1.4rem); }
    .cards-grid.count-1 .score-number { font-size: clamp(2rem, 8vw, 3.5rem); }
    /* 滚动播报 */
    .rolling-bar { font-size: clamp(0.7rem, 3vw, 1rem); }
  }

  /* 手机横屏 */
  @media (max-width: 900px) and (orientation: landscape) {
    .top-bar { padding: 6px 16px 4px; }
    .cards-grid { padding: 0 12px 12px; gap: 8px; }
    .score-number { font-size: clamp(1.2rem, 3vh, 2rem); }
    .cards-grid.count-1 .score-number { font-size: clamp(2rem, 6vh, 4rem); }
    .ribbon-wave { display: none; }
  }
