  * { font-family: 'Noto Sans SC', sans-serif; box-sizing: border-box; }
  [x-cloak] { display: none !important; }

  /* ===== 首次加载遮罩 spinner ===== */
  .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #0a0e1a;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .loading-wrap {
    text-align: center;
  }
  .loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #2196F3;
    border-radius: 50%;
    margin: 0 auto;
    animation: loadingSpin 0.8s linear infinite;
  }
  .loading-text {
    color: #94a3b8;
    font-size: 1.125rem;
    margin-top: 1rem;
    font-weight: 500;
  }
  @keyframes loadingSpin {
    to { transform: rotate(360deg); }
  }

  /* ===== 断网提示条（SSE 失败时显示，已修复的优化-3） ===== */
  .connection-warning {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
  }
  .connection-warning svg {
    width: 18px;
    height: 18px;
  }
  @media (prefers-reduced-motion: no-preference) {
    .connection-warning {
      animation: warningPulse 2s ease-in-out infinite;
    }
  }
  @keyframes warningPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; transform: translateX(-50%) scale(1.02); }
  }

  /* ===== 背景 ===== */
  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-cyan-track {
    background-color: #0a1f2e;
    background-image:
      /* 装饰圆点 */
      radial-gradient(circle 5px at 88% 25%, rgba(255, 255, 255, 0.18), transparent 70%),
      radial-gradient(circle 4px at 95% 70%, rgba(0, 212, 160, 0.30), transparent 70%),
      radial-gradient(circle 3px at 12% 80%, rgba(212, 255, 102, 0.30), transparent 70%),
      radial-gradient(circle 6px at 78% 88%, rgba(0, 191, 255, 0.25), transparent 70%),
      /* 水平速度线（跑步轨迹） */
      repeating-linear-gradient(
        90deg,
        transparent 0px, transparent 80px,
        rgba(255, 255, 255, 0.025) 80px, rgba(255, 255, 255, 0.025) 82px
      ),
      /* 对角速度线（跑步速度） */
      linear-gradient(15deg, transparent 49.7%, rgba(0, 212, 160, 0.06) 50%, transparent 50.3%),
      linear-gradient(-15deg, transparent 49.8%, rgba(0, 191, 255, 0.05) 50%, transparent 50.2%),
      /* 蓝→青绿渐变光晕（左上深蓝 → 右中青绿） */
      radial-gradient(ellipse 1200px 700px at 30% 30%, rgba(0, 102, 255, 0.30), transparent 60%),
      radial-gradient(ellipse 900px 600px at 75% 55%, rgba(0, 191, 255, 0.22), transparent 55%),
      radial-gradient(ellipse 800px 500px at 85% 75%, rgba(0, 212, 160, 0.25), transparent 55%),
      /* 底部黄绿高光（参考图） */
      radial-gradient(ellipse 600px 200px at 50% 100%, rgba(212, 255, 102, 0.18), transparent 60%),
      /* 主底色（深青） */
      linear-gradient(135deg, #051428 0%, #0a1f2e 50%, #0c1f1a 100%);
  }

  /* 5. 跳绳律动 - 深蓝底 + 跳绳椭圆轨迹 + 中心光晕 + 装饰点 */
  .bg-preset-rope-rhythm {
    background-color: #0a1c2e;
    background-image:
      /* 装饰能量点 */
      radial-gradient(circle 4px at 15% 20%, rgba(255, 255, 255, 0.20), transparent 70%),
      radial-gradient(circle 5px at 85% 35%, rgba(212, 255, 102, 0.35), transparent 70%),
      radial-gradient(circle 3px at 20% 65%, rgba(0, 212, 160, 0.40), transparent 70%),
      radial-gradient(circle 4px at 90% 85%, rgba(0, 191, 255, 0.35), transparent 70%),
      /* 跳绳轨迹（多层同心椭圆，模拟跳绳划过空气的残影） */
      repeating-radial-gradient(
        ellipse 280px 90px at 50% 55%,
        transparent 0px, transparent 12px,
        rgba(255, 255, 255, 0.025) 12px, rgba(255, 255, 255, 0.025) 14px
      ),
      repeating-radial-gradient(
        ellipse 420px 130px at 50% 55%,
        transparent 0px, transparent 20px,
        rgba(0, 191, 255, 0.025) 20px, rgba(0, 191, 255, 0.025) 22px
      ),
      repeating-radial-gradient(
        ellipse 560px 180px at 50% 55%,
        transparent 0px, transparent 30px,
        rgba(0, 212, 160, 0.022) 30px, rgba(0, 212, 160, 0.022) 32px
      ),
      /* 横向速度线（跳绳手柄飞过） */
      repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 35px,
        rgba(255, 255, 255, 0.015) 35px, rgba(255, 255, 255, 0.015) 37px
      ),
      /* 蓝→青绿渐变（左上天蓝 → 右下青绿） */
      radial-gradient(ellipse 900px 700px at 25% 35%, rgba(0, 102, 255, 0.25), transparent 60%),
      radial-gradient(ellipse 800px 600px at 75% 70%, rgba(0, 212, 160, 0.28), transparent 55%),
      radial-gradient(ellipse 500px 400px at 50% 50%, rgba(0, 191, 255, 0.15), transparent 50%),
      /* 底部黄绿光晕 */
      radial-gradient(ellipse 700px 200px at 50% 100%, rgba(212, 255, 102, 0.12), transparent 60%),
      /* 主底色 */
      linear-gradient(135deg, #0a1c2e 0%, #0e2a3a 50%, #0a2520 100%);
  }

  /* 6. 活力运动 - 深蓝底 + 对角跑步速度线 + 波浪线 + 黄绿高光 */
  .bg-preset-vitality-sport {
    background-color: #0a1825;
    background-image:
      /* 装饰圆点 */
      radial-gradient(circle 5px at 20% 15%, rgba(255, 255, 255, 0.18), transparent 70%),
      radial-gradient(circle 3px at 80% 20%, rgba(212, 255, 102, 0.35), transparent 70%),
      radial-gradient(circle 4px at 25% 75%, rgba(0, 212, 160, 0.30), transparent 70%),
      radial-gradient(circle 6px at 75% 80%, rgba(0, 191, 255, 0.30), transparent 70%),
      /* 横向波浪线（细密正弦） */
      repeating-linear-gradient(
        0deg,
        transparent 0px, transparent 50px,
        rgba(255, 255, 255, 0.025) 50px, rgba(255, 255, 255, 0.025) 51px
      ),
      /* 对角跑步速度线（粗体+细密） */
      linear-gradient(25deg, transparent 49.6%, rgba(0, 212, 160, 0.08) 50%, transparent 50.4%),
      linear-gradient(25deg, transparent 49.85%, rgba(255, 255, 255, 0.05) 50%, transparent 50.15%),
      linear-gradient(-25deg, transparent 49.7%, rgba(0, 191, 255, 0.07) 50%, transparent 50.3%),
      linear-gradient(-25deg, transparent 49.85%, rgba(255, 255, 255, 0.04) 50%, transparent 50.15%),
      /* 顶部深蓝 + 底部青绿渐变 */
      radial-gradient(ellipse 1000px 600px at 50% 0%, rgba(0, 102, 255, 0.30), transparent 60%),
      radial-gradient(ellipse 900px 500px at 50% 100%, rgba(0, 212, 160, 0.30), transparent 60%),
      /* 中心光晕（青色能量） */
      radial-gradient(ellipse 600px 400px at 50% 50%, rgba(0, 191, 255, 0.15), transparent 55%),
      /* 底部黄绿高光带 */
      radial-gradient(ellipse 800px 250px at 50% 95%, rgba(212, 255, 102, 0.22), transparent 60%),
      /* 主底色 */
      linear-gradient(180deg, #0a1825 0%, #0d2030 50%, #0a2020 100%);
  }

  /* 7. 天际翱翔 - 深天蓝底 + 上升斜线 + 云层光感 */
  .bg-preset-sky-soar {
    background-color: #0a1828;
    background-image:
      repeating-linear-gradient(
        -20deg,
        transparent 0px, transparent 80px,
        rgba(120, 200, 255, 0.04) 80px, rgba(120, 200, 255, 0.04) 82px
      ),
      repeating-linear-gradient(
        20deg,
        transparent 0px, transparent 100px,
        rgba(80, 180, 240, 0.025) 100px, rgba(80, 180, 240, 0.025) 102px
      ),
      radial-gradient(ellipse 800px 400px at 50% 100%, rgba(100, 200, 255, 0.18), transparent 60%),
      radial-gradient(ellipse 500px 300px at 30% 80%, rgba(80, 180, 240, 0.10), transparent 55%),
      radial-gradient(ellipse 500px 300px at 70% 60%, rgba(120, 200, 255, 0.08), transparent 55%),
      linear-gradient(180deg, rgba(10,24,40,0.98) 0%, rgba(20,40,60,0.96) 50%, rgba(30,55,80,0.96) 100%);
  }

  /* 10. 律动脉搏 - 深黑红底 + 心跳波纹 + 红蓝双色脉冲 */
  .bg-preset-pulse-rhythm {
    background-color: #0a080c;
    background-image:
      repeating-radial-gradient(
        circle 120px at 50% 55%,
        transparent 0px, transparent 38px,
        rgba(255, 50, 80, 0.035) 38px, rgba(255, 50, 80, 0.035) 40px
      ),
      repeating-radial-gradient(
        circle 240px at 50% 55%,
        transparent 0px, transparent 78px,
        rgba(80, 50, 200, 0.025) 78px, rgba(80, 50, 200, 0.025) 80px
      ),
      repeating-radial-gradient(
        circle 360px at 50% 55%,
        transparent 0px, transparent 118px,
        rgba(255, 30, 60, 0.018) 118px, rgba(255, 30, 60, 0.018) 120px
      ),
      radial-gradient(ellipse 600px 500px at 50% 50%, rgba(255, 50, 80, 0.12), transparent 50%),
      radial-gradient(ellipse 300px 400px at 25% 40%, rgba(80, 50, 200, 0.08), transparent 55%),
      radial-gradient(ellipse 300px 400px at 75% 40%, rgba(255, 20, 60, 0.06), transparent 55%),
      linear-gradient(180deg, #0a080c 0%, #120d18 50%, #0a080c 100%);
  }

  /* 自定义图片 */
  .bg-preset-custom {
    background-size: cover; background-position: center;
  }

  /* ===== 暗色背景下的内容适配（通用） ===== */
  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-cyan-track .event-title  { color: #f0fdff; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(0,191,255,0.22); }
  body.bg-mode-cyan-track .event-subtitle { color: #00d4a0; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-cyan-track .text-slate-700 { color: #d1f5ee !important; }
  body.bg-mode-cyan-track .text-slate-500 { color: #7ee8d0 !important; }

  /* 5. 跳绳律动：青绿主调主题 */
  body.bg-mode-rope-rhythm .event-title  { color: #f0fdf4; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(0,212,160,0.25); }
  body.bg-mode-rope-rhythm .event-subtitle { color: #5eead4; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-rope-rhythm .text-slate-700 { color: #a7f3d0 !important; }
  body.bg-mode-rope-rhythm .text-slate-500 { color: #6ee7b7 !important; }

  /* 6. 活力运动：天蓝青绿黄绿多彩主题 */
  body.bg-mode-vitality-sport .event-title  { color: #f0fdff; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(0,191,255,0.22); }
  body.bg-mode-vitality-sport .event-subtitle { color: #d4ff66; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-vitality-sport .text-slate-700 { color: #c7e9ff !important; }
  body.bg-mode-vitality-sport .text-slate-500 { color: #99e8d0 !important; }

  /* 7. 天际翱翔：天蓝云层主题 */
  body.bg-mode-sky-soar .event-title  { color: #f0f9ff; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(120,200,255,0.18); }
  body.bg-mode-sky-soar .event-subtitle { color: #93c5fd; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-sky-soar .text-slate-700 { color: #dbeafe !important; }
  body.bg-mode-sky-soar .text-slate-500 { color: #bfdbfe !important; }

  /* 10. 律动脉搏：红蓝脉冲主题 */
  body.bg-mode-pulse-rhythm .event-title  { color: #fce4ec; text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,50,80,0.15); }
  body.bg-mode-pulse-rhythm .event-subtitle { color: #ef9a9a; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  body.bg-mode-pulse-rhythm .text-slate-700 { color: #f8bbd9 !important; }
  body.bg-mode-pulse-rhythm .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; }

  /* 自定义图片：通用高对比白 */
  .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-2 .athlete-card { width: calc(50% - 7px); max-width: 560px; }
  .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; }
  }

  /* ===== 比赛选择界面 ===== */
  .selector-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10000;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a2332 100%);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .selector-card {
    width: 90%;
    max-width: 640px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 48px 40px;
    backdrop-filter: blur(20px);
  }
  .selector-title {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
  }
  .selector-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin-bottom: 32px;
  }
  .selector-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .selector-empty {
    text-align: center;
    padding: 40px 0;
  }
  .selector-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 20px 24px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
  }
  .selector-item:hover {
    background: rgba(33,150,243,0.2);
    border-color: rgba(33,150,243,0.5);
    transform: translateX(4px);
  }
  .selector-item-name {
    flex: 1;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
  }
  .selector-item-meta {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
  }
  .selector-item-arrow {
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
  }
  .selector-item:hover .selector-item-arrow {
    color: #2196F3;
  }

  /* ===== 内容/封面图模式切换 ===== */

  /* 内容模式容器：包裹 top-bar + cards-grid + bottom-bar */
  .content-mode-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  /* 封面图模式覆盖层：全屏显示比赛封面图 */
  .cover-mode-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0a0a12;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 封面图未设置时的占位内容 */
  .cover-mode-placeholder {
    text-align: center;
    padding: 40px;
  }
