/* ============================================================
   泳娃记录 · Design Token v1.0（css/main.css 全面改版）
   - 主蓝沿用应用原色系：实底/文字用 #0072AD（白字对比度 5.24:1 ✓），
     渐变与图标用品牌亮蓝 #0088CC 保持识别（对比度数据见 design.md）
   - 8px 间距栅格 / 3 级字重 / 语义徽章 / 状态矩阵
   ============================================================ */
:root {
    /* 色彩 Token */
    --primary-700: #0072AD;      /* 实底主按钮、链接、选中态（白字 5.24:1） */
    --primary-600: #0088CC;      /* 品牌亮蓝：图标、渐变亮端、焦点环 */
    --primary-100: #E3F2FB;      /* 浅蓝底 */
    --primary-050: #F2F8FC;      /* 更浅底 / 输入框填充 */
    --accent-700: #0E7C86;       /* 辅助蓝绿（白字 4.95:1） */
    --accent-100: #E0F4F5;

    --ink-900: #1B2330;          /* 主正文（白底 14.7:1） */
    --ink-700: #3A4454;          /* 次要正文 */
    --ink-500: #626C7A;          /* 弱化说明（下限） */
    --ink-450: #5C7590;          /* 12–13px 次要信息：时间、星期、tab 未选中（白底 4.9:1） */
    --ink-300: #9AA3B2;          /* 仅占位符/装饰 */
    --line: #E7EDF3;             /* 分隔线 */
    --chip-quiet: #F1F4F8;       /* 安静态控件底色（无边框 chip/胶囊，白底与浅蓝背景之间） */
    --bg: #F0F6FA;               /* 页面背景：全站统一浅水蓝，避免各页出现不同灰蓝 */
    --surface: #FDFEFF;          /* 卡片表面（近白，微蓝调，避免刺眼纯白） */

    /* 语义色（实底均保证白字 ≥4.5:1） */
    --success-solid: #15803D;    /* 5.02:1 */
    --success-100: #E3F5EA;
    --success-text: #116B38;     /* 浅底徽章字 5.82:1 */
    --danger-solid: #DC2626;     /* 4.83:1 */
    --danger-100: #FEECEB;
    --danger-text: #B42318;      /* 5.76:1 */
    --warning-text: #9A4A00;     /* 慢速徽章字 5.55:1 */
    --warning-100: #FDEFE0;
    --pb-text: #8A5A00;          /* PB 徽章字 5.37:1 */
    --pb-100: #FFF3D6;

    /* 控件 / 状态中性色 */
    --input-border: #D2DEE8;     /* 输入框 / 选择器默认边框（比分隔线深一档，边界清晰） */
    --input-bg: #F7FAFC;         /* 输入框 / 选择器填充（极浅蓝灰，避免纯白刺眼） */
    --btn-disabled-bg: #C7D2DB;   /* 按钮加载 / 禁用底 */
    --skeleton-from: #EAEFF5;     /* 骨架屏渐变深端 */
    --skeleton-to: #F3F7FA;       /* 骨架屏渐变亮端 */

    /* 字阶（标准档） */
    --text-display: 32px;
    --text-h2: 20px;
    --text-h3: 17px;
    --text-body: 16px;
    --text-caption: 14px;
    --text-micro: 12px;
    /* 展示数字 / 控件文本（沿用现有设计值，后续可再收敛到标准档） */
    --text-num: 22px;        /* 列表成绩、强调数字 */
    --text-num-soft: 17px;   /* 静音成绩 */
    --text-stat: 19px;       /* 日历统计数字 */
    --text-btn: 15px;        /* 主按钮 / 强调日期文字 */
    --text-btn-sm: 13px;     /* 次按钮文字 */
    --text-tip: 13px;        /* 提示 / 摘要 / 辅助标题 */
    --text-label: 12px;      /* 徽章 / 标签 / 表头 */

    /* 间距（8px grid） */
    --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
    --space-4: 16px; --space-5: 24px; --space-6: 32px;

    /* 圆角 / 阴影 / 动效 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-1: 0 1px 2px rgba(27,35,48,.06);
    --shadow-2: 0 4px 14px rgba(27,35,48,.12);
    --shadow-3: 0 12px 32px rgba(27,35,48,.18);
    --dur-fast: 150ms;
    --dur-base: 240ms;
    --dur-enter: 200ms;                          /* 页面/条目进入 */
    --ease-out: cubic-bezier(0,0,0.2,1);
    --ease-in: cubic-bezier(0.4,0,1,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1); /* 点亮/确认类回弹 */

    /* 布局 */
    --app-max: 480px;
    --header-h: 52px;
    --tabbar-h: 66px;
    --tabbar-float: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, system-ui, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 表单输入类控件仍允许选中文本，便于复制/修改已填内容 */
input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
html, body {
    height: 100%;
    background: var(--bg);
    color: var(--ink-900);
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 焦点可见性（键盘导航） */
:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 画布：手机优先，桌面端放宽 ===== */
.app-container {
    height: 100%;
    max-width: var(--app-max);
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    position: relative;
}
.page-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top));
    /* 底部留白要盖过 TAB 栏 + 中央录入按钮：中央按钮比 TAB 顶出约 20px，
       原来只留 24px 时滚动到末尾，最后一条记录会被 FAB 压住一点 */
    padding-bottom: calc(var(--tabbar-h) + var(--tabbar-float) + env(safe-area-inset-bottom) + 56px);
}

/* ===== 顶部标题栏 ===== */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    max-width: var(--app-max);
    margin: 0 auto;
    height: var(--header-h);
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: calc(var(--space-4) + env(safe-area-inset-left));
    padding-right: calc(var(--space-4) + env(safe-area-inset-right));
    background: rgba(253,254,255,0.96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--line);
}
.header-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--text-h3);
    font-weight: 700;
    color: var(--primary-700);
    letter-spacing: 0.2px;
}
.header-title svg { display: block; }
.header-swimmer-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.header-swimmer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    padding: 4px 10px 4px 4px;
    font-size: var(--text-caption);
    background: var(--primary-050);
    color: var(--ink-900);
    max-width: 160px;
    font-weight: 500;
    cursor: pointer;
}
.header-swimmer:hover { border-color: var(--primary-600); }
.header-swimmer:disabled { cursor: default; }
.header-swimmer:disabled:hover { border-color: var(--line); }
.hs-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
/* 头像里要放两个字（取「名」后 2 字）：22px 圆装两字太挤，改成小药丸，字 10px 不换行 */
.hs-avatar.is-2 {
    width: auto;
    min-width: 22px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap;
}
.hs-name {
    max-width: 84px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hs-arrow { color: var(--ink-500); display: inline-flex; flex-shrink: 0; }
.hs-arrow svg { width: 15px; height: 15px; }

/* ===== 卡片 ===== */
.card {
    background: var(--surface);
    margin: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-3) calc(var(--space-4) - 4px);
    box-shadow: var(--shadow-1);
}
.card-title {
    font-size: var(--text-btn);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-3);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-2);
}
.card-title .card-sub {
    font-size: var(--text-micro);
    font-weight: 400;
    color: var(--ink-500);
    margin-left: auto;
}
.card-head-action {
    flex-shrink: 0;
}
/* 记录页标题行：标题与操作分组，副标题单独一行，避免 390 宽五元素挤成一列 */
.rec-title-text { white-space: nowrap; }
.card-title .card-title-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}
.card-sub-line {
    margin: calc(-1 * var(--space-1)) 0 var(--space-3);
    font-size: var(--text-micro);
    color: var(--ink-500);
    line-height: 1.4;
}
@media (max-width: 380px) {
    .rec-title-text { font-size: var(--text-caption); }
}

/* ===== 表单（浮动标签） ===== */
/* 全局兜底：原生控件按内在内容宽度不收缩时，禁止超出父级宽度 */
input, select, textarea, button {
    max-width: 100%;
}
input[type="number"] {
    width: 100%;
    min-width: 0;
}
textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    padding: 10px var(--space-3);
    font-size: var(--text-caption);
    color: var(--ink-900);
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
textarea:focus {
    border-color: var(--primary-700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,136,204,0.16);
}
.form-item {
    position: relative;
    min-width: 0;
    margin-bottom: var(--space-3);
}

/* 复合控件的 form-item（如"选择赛事"内含搜索框+下拉+按钮）：保持常规上方标签布局 */
.form-item.form-item-composite label {
    display: block;
    font-size: var(--text-micro);
    color: var(--ink-700);
    margin-bottom: 5px;
    font-weight: 500;
}
.form-item.form-item-composite input,
.form-item.form-item-composite select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 42px;
    padding: 0 var(--space-3);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-caption);
    background: var(--input-bg);
    color: var(--ink-900);
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

/* 普通 form-item：浮动标签。label 初始居中充当占位，聚焦/有值时上浮到边框 */
.form-item:not(.form-item-composite) label {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-caption);
    color: var(--ink-500);
    font-weight: 500;
    line-height: 1;
    margin: 0;
    padding: 0 4px;
    background: transparent;
    pointer-events: none;
    z-index: 3;
    transform-origin: left center;
    transition: top var(--dur-fast) ease, transform var(--dur-fast) ease,
                color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.form-item:not(.form-item-composite) input,
.form-item:not(.form-item-composite) select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 52px;
    padding: 18px var(--space-3) 6px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-caption);
    background: var(--input-bg);
    color: var(--ink-900);
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.form-item:not(.form-item-composite) select {
    -webkit-appearance: none;
    appearance: none;
    background: var(--input-bg) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23626C7A' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 32px;
}
.form-item input:focus, .form-item select:focus {
    border-color: var(--primary-700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,136,204,0.16);
}
.form-item input:disabled {
    background: var(--bg);
    color: var(--ink-300);
    border-color: var(--line);
}
.form-item input::placeholder {
    color: var(--ink-300);
}
/* 空值且未聚焦时隐藏占位文字，由居中 label 充当占位，避免文字重叠 */
.form-item:not(.form-item-composite):not(.is-float):not(:focus-within) input::placeholder {
    color: transparent;
}
/* 上浮状态：有值(is-float) 或 聚焦 → label 移到框顶边框上（白底形成嵌入式标题） */
.form-item:not(.form-item-composite).is-float label,
.form-item:not(.form-item-composite):focus-within label {
    top: 0;
    transform: translateY(-50%) scale(0.84);
    background-color: var(--surface);
    color: var(--ink-700);
}
.form-item:not(.form-item-composite):focus-within label {
    color: var(--primary-700);
}
.form-hint {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin: -4px 0 var(--space-3);
    line-height: 1.7;            /* 多行提示（OCR 结果、校验说明）不要挤成一团 */
}
/* 截图识别的结果提示（赛事表单 #comp-ocr-tip、成绩录入 #res-ocr-tip）：
   它们紧跟在全宽按钮下方，默认 -4px 会贴到按钮上，多行时又挤成一团 */
[id$="-ocr-tip"] {
    margin-top: 8px;
    line-height: 1.75;
}
.row-2 {
    display: flex;
    gap: var(--space-2);
    min-width: 0;
}
.row-2 .form-item {
    flex: 1;
    min-width: 0;
}

/* 赛事候选列表（「选择赛事」输入即过滤，点击列表项即选中） */
.comp-picker {
    position: relative;
}
.comp-picker input[type="text"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 42px;
    padding: 0 var(--space-3);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-caption);
    background: var(--input-bg);
    color: var(--ink-900);
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.comp-picker input[type="text"]:focus {
    border-color: var(--primary-700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,136,204,0.16);
}
.comp-list {
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.comp-list .comp-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background-color var(--dur-fast);
}

/* 快捷建赛：库里没有这场时，就地新建（不把人赶去别的页面） */
.comp-quick {
    margin-top: 8px;
    margin-bottom: 12px;
    border: 1px dashed var(--line-strong, var(--line));
    border-radius: var(--radius-sm);
    background: var(--surface-sunken, rgba(0, 136, 204, 0.03));
    padding: 8px 10px;
}
.comp-quick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
/* 赛事名可能很长：允许折到两行，别截成「没找到「XXX」…」让后半句「可以就地新建」看不见 */
.comp-quick-why {
    font-size: var(--text-caption);
    color: var(--text-secondary);
    min-width: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
}
.comp-quick-form { margin-top: 8px; display: grid; gap: 8px; }
.comp-quick-form input, .comp-quick-form select { width: 100%; }
.comp-quick-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.comp-list .comp-item:last-child {
    border-bottom: none;
}
.comp-list .comp-item.active {
    background: rgba(0, 136, 204, 0.06);
}
.comp-item-name {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
}
.comp-item-meta {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: 3px;
    line-height: 1.3;
}
.comp-empty {
    padding: 14px 12px;
    text-align: center;
    color: var(--ink-500);
    font-size: var(--text-caption);
}
.comp-picked {
    margin-top: 8px;
    border: 1px solid var(--primary-700);
    border-radius: var(--radius-sm);
    background: rgba(0, 136, 204, 0.05);
    padding: 10px 12px;
}
.comp-picked-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.comp-picked-main {
    flex: 1;
    min-width: 0;
}
.comp-picked-name {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
    word-break: break-all;
}
.comp-picked-meta {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: 3px;
}
.comp-picked-change {
    flex: 0 0 auto;
    border: 1px solid var(--primary-700);
    color: var(--primary-700);
    background: var(--surface);
    border-radius: 999px;
    padding: 0 14px;
    min-height: 44px;
    font-size: var(--text-micro);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
}

/* ===== 赛事成绩曲线看板：动画与指标胶囊 ===== */
.chart-svg {
    display: block;
    margin-top: 4px;
}
.chart-title-mini {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin: 6px 0 8px;
}
.chart-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
/* 「另有 N 条犯规/弃权/接力未计入」是口径说明，不是可点筛选 → 纯文字注释，不用胶囊 */
.chart-note {
    margin: -4px 0 10px;
    font-size: var(--text-micro);
    line-height: 1.5;
    color: var(--ink-300);
}
/* 训练目标胶囊：未达标用赭金（与「最好成绩」绿胶囊区分），达标复用 chip-green */
.chip-goal {
    background: #faf1df;
    color: #8a5a12;
    font-weight: 600;
}
/* 多娃对比：图例 + 紫色对比胶囊（与品牌蓝、达标绿区分开） */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin: 2px 0 8px;
}
.chart-legend .lg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--text-micro);
    color: var(--ink-500);
}
.chart-legend .lg i {
    display: inline-block;
    width: 14px;
    height: 3px;
    border-radius: 2px;
}
.chart-legend .lg-cur i { background: #0072AD; }
.chart-legend .lg-cmp i { background: #8b5cf6; }
.chip-cmp {
    background: #f1ebfd;
    color: #5b3fb3;
    font-weight: 600;
}
.cmp-pick-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}
.cmp-pick.is-on {
    border-color: #8b5cf6;
    background: #f1ebfd;
    color: #5b3fb3;
}
.chip {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink-700);
    font-size: var(--text-micro);
    line-height: 1.4;
}
.chip b {
    font-weight: 700;
    color: var(--ink-900);
}
.chip-green {
    background: var(--success-100);
    border-color: var(--success-100);
    color: var(--success-text);
}
.chip-green b {
    color: var(--success-text);
}
.chip-muted {
    color: var(--ink-500);
}
/* 曲线描画动画 */
.chart-svg .chart-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: chartDraw 1.2s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes chartDraw {
    to { stroke-dashoffset: 0; }
}
/* 面积渐显 */
.chart-svg .chart-area {
    opacity: 0;
    animation: chartFadeIn .85s .35s ease-out forwards;
}
@keyframes chartFadeIn {
    to { opacity: 1; }
}
/* 多点逐个弹入 */
.chart-svg .chart-dot {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(.5);
    animation: chartDotPop .5s cubic-bezier(.34, 1.56, .64, 1) forwards;
    animation-delay: calc(.55s + var(--i, 0) * .09s);
}
@keyframes chartDotPop {
    to { opacity: 1; transform: scale(1); }
}
/* PB 基准线渐现 */
.chart-svg .chart-pb {
    opacity: 0;
    animation: chartFadeIn .5s .95s ease-out forwards;
}
/* 单点：淡入 + 双层脉冲光环 */
.chart-svg .chart-dot-single {
    opacity: 0;
    animation: chartFadeIn .6s .15s ease-out forwards;
}
.chart-svg .chart-halo {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: chartHalo 2.8s .3s ease-out infinite;
}
.chart-svg .chart-halo-2 {
    animation-delay: 1.7s;
}
@keyframes chartHalo {
    0% { transform: scale(.55); opacity: .30; }
    70% { transform: scale(1.7); opacity: 0; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* ===== 按钮：每屏至多 1 个实心主按钮 ===== */
.btn {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    background: var(--primary-700);
    color: #fff;
    font-size: var(--text-btn);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    transition: transform var(--dur-fast), opacity var(--dur-fast);
}
.btn:active {
    opacity: 0.85;
    transform: scale(0.985);
}
.btn-secondary {
    background: var(--surface);
    color: var(--primary-700);
    border: 1.5px solid var(--primary-700);
}
.btn-ghost {
    background: transparent;
    color: var(--ink-700);
    border: none;
    box-shadow: none;
}
.btn-success {
    background: var(--success-solid);
}
.btn-danger {
    background: var(--danger-solid);
}
.btn-sm {
    min-height: 44px;
    padding: 0 var(--space-3);
    font-size: var(--text-btn-sm);
    border-radius: var(--radius-sm);
    width: auto;
}
.btn-row {
    display: flex;
    gap: var(--space-2);
}
.btn-row .btn {
    flex: 1;
}

/* ===== 列表项 ===== */
.list-item {
    position: relative;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.list-item:last-child {
    border-bottom: none;
}
.li-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
/* 统一条目骨架：左列（类型图标 + 标题徽章）/ 右列（成绩或日期） */
.li-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.li-type-ic {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--primary-050);
    color: var(--primary-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.li-type-ic svg { width: 15px; height: 15px; }
.li-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.li-time--date {
    font-size: var(--text-btn);
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}
/* 带右上「⋯」操作的条目，主行为操作按钮预留位置
   按钮实际为 44×44 热区（::before 再扩命中层），右侧留白必须 ≥44px，
   否则成绩右端会被「⋯」压住（第一/五条：成绩与省略号粘连） */
.result-item .li-main,
.speed-item .li-main,
.checkin-item .li-main {
    padding-right: 44px;
}
.li-title {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-900);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}
.li-time {
    font-size: var(--text-num);
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.li-time-muted {
    color: var(--ink-300);
    font-size: var(--text-num-soft);
}
.li-meta {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: 5px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.li-meta-main {
    min-width: 0;
    flex: 0 1 auto;
}
/* 名次 / PB 徽章跟着赛事名左对齐，不再甩到行尾（与成绩数字不对齐显得松散） */
.li-meta-badges {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
/* 测速保存时刻：跟在日期后面，比日期淡一档，避免和内容抢注意力 */
.li-clock {
    font-size: var(--text-micro);
    color: var(--ink-450);
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
}
.li-clock:empty { display: none; }
.li-remark {
    margin-top: 4px;
}
.li-date {
    font-size: var(--text-btn);
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}
/* 长赛事名截断（悬浮可见全文） */
.truncate {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
/* 首页「最近记录」预览精简行：只留 项目/泳姿 + 成绩 + 日期，无徽章/赛事名/操作按钮 */
.compact-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.compact-item:last-child { border-bottom: none; }
.compact-item .li-meta { margin-top: 4px; }
/* 首页预览成绩再放大一档：列表里只有这一个数字是主角 */
.compact-item .li-time { font-size: 25px; font-weight: 800; letter-spacing: 0.4px; }
.compact-item .li-time-muted { font-size: var(--text-num-soft); font-weight: 600; }
/* 首页预览第二行：日期 + 赛事名（超长省略）+ 淡色名次，同一行左对齐 */
.compact-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.compact-date {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.compact-comp {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-300);
}
.badge-rank-soft {
    flex-shrink: 0;
    background: var(--bg);
    color: var(--ink-500);
    font-size: var(--text-label);
    padding: 1px 7px;
}
/* 列表条目右上「···」更多操作（危险操作收纳） */
.item-more {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--ink-300);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* 成绩与右上「⋯」之间留出视觉间隔，避免读成「3:31.61 …」 */
.result-item .li-time,
.speed-item .li-time {
    margin-right: 10px;
}
.item-more:active {
    background: var(--bg);
}

/* ===== D5 列表条目左滑手势：右侧露出编辑 / 删除操作（渐进增强，⋯ 菜单保留） ===== */
.list-item {
    touch-action: pan-y;
    overflow: hidden;
}
.li-slide {
    position: relative;
    z-index: 1;
    min-width: 0;
    background: var(--surface);
    transition: transform var(--dur-fast) var(--ease-out);
}
.li-swipe-actions {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    flex-direction: row;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-fast) var(--ease-out);
}
.list-item.is-swiped .li-swipe-actions {
    opacity: 1;
    visibility: visible;
}
.li-swipe-btn {
    flex: 0 0 72px;
    width: 72px;
    height: 100%;
    border: none;
    background: var(--danger-solid);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: var(--text-micro);
    cursor: pointer;
}
.li-swipe-btn.is-normal {
    background: var(--primary-700);
}
.li-swipe-btn svg { width: 20px; height: 20px; }

/* ===== 徽章：颜色 + 文字双通道 ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-label);
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}
.badge-pool {
    background: var(--primary-100);
    color: var(--primary-700);
}
/* 池型降级为行内淡色后缀：类型已由左侧图标+赛事名区分，不必再占一个胶囊 */
.li-pool {
    font-size: var(--text-tip);
    font-weight: 500;
    color: var(--ink-450);
    letter-spacing: .2px;
}
.li-pool::before { content: "·"; margin-right: 5px; }
.badge-fast {
    background: var(--success-100);
    color: var(--success-text);
}
.badge-slow {
    background: var(--warning-100);
    color: var(--warning-text);
}
.badge-pb {
    background: var(--pb-100);
    color: var(--pb-text);
}
.badge-foul {
    background: var(--danger-100);
    color: var(--danger-text);
}
.badge-rank {
    background: var(--accent-100);
    color: var(--accent-700);
}
.badge-neutral {
    background: var(--bg);
    color: var(--ink-700);
}
/* 等级徽章：与等级评估页共用同一套色板（0未定级/1三级/2二级/3一级/4健将/5国际健将） */
.badge-lv { font-weight: 700; }
.badge-lv.lv0 { background: #F1F3F5; color: #78838F; }
.badge-lv.lv1 { background: #EDF1F5; color: #54657A; }
.badge-lv.lv2 { background: #E2F5F2; color: #0F7A6A; }
.badge-lv.lv3 { background: #E4F1FC; color: #10699F; }
.badge-lv.lv4 { background: #F0EAFE; color: #6339AE; }
.badge-lv.lv5 { background: #FFF3D9; color: #94640A; }
/* 等级变更行：胶囊之间的箭头与行内对齐 */
.lv-arrow { color: #96A3B2; font-weight: 600; margin: 0 2px; }
.lv-tip { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
/* 等级变更行：胶囊不参与收缩，避免窄屏压成两行 */
.row-t .badge-lv, .lv-tip .badge-lv { flex: 0 0 auto; }
.lv-row .row-t { display: flex; align-items: center; gap: 2px; min-width: 0; }
/* 等级变更历史：单条删除与清空（只删流水，不动当前等级） */
.lv-row .lv-del {
    flex: 0 0 auto;
    align-self: center;
    width: 22px;
    height: 22px;
    margin-left: 2px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F1F4F8;
    color: #8A97A6;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
}
.lv-row .lv-del:hover { background: #FDE8E8; color: #C0392B; }
.lv-row .lv-del:disabled { opacity: .5; cursor: default; }
.lv-clear { margin-top: 10px; width: 100%; color: #8A97A6; }
.lv-note { margin-top: 7px; font-size: var(--text-micro); line-height: 1.6; color: var(--ink-450); }
/* 协作/共享档案标识：蓝色系，和「使用中」「等级」区分开 */
.badge-share {
    background: var(--primary-100);
    color: var(--primary-700);
}
/* 记录条目整行可点（不用只盯着右侧 44pt 的 ⋯） */
.list-item.is-tappable { cursor: pointer; }
.list-item.is-tappable:active { background: var(--primary-050); }

/* ===== A1 记录流：类型分段筛选 ===== */
.rec-seg {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-2) 0;
    flex-wrap: wrap;
}
.rec-seg-btn {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-full);
    color: var(--ink-700);
    font-size: var(--text-label);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.rec-seg-btn.active {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: #fff;
    font-weight: 600;
}

/* ===== 记录页视图切换（列表 / 日历）：收在卡片标题右侧，尺寸比筛选段小一档 ===== */
.rec-view-seg {
    display: inline-flex;
    margin-left: auto;
    padding: 2px;
    gap: 2px;
    background: var(--primary-050);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
}
.rec-view-btn {
    width: 34px;
    min-height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: var(--radius-full);
    color: var(--ink-700);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.rec-view-btn svg {
    width: 16px;
    height: 16px;
}
.rec-view-btn.active {
    background: var(--primary-700);
    color: #fff;
}

/* ===== 第四十一批：记录按月分组折叠 + 时间范围 + 回到最新 ===== */
.rec-range {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-1) 0 var(--space-2);
    flex-wrap: wrap;
}
.rec-range-label {
    font-size: var(--text-micro);
    color: var(--ink-500);
}
.rec-range-btn {
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-full);
    color: var(--ink-700);
    font-size: var(--text-caption);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.rec-range-btn.active {
    background: var(--primary-100);
    border-color: var(--primary-600);
    color: var(--primary-700);
    font-weight: 600;
}
/* 五个范围芯片（本月/近三月/近半年/今年/全部）：单行横排，超出可横向滑动，不折行 */
.rec-range-line {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rec-range-line::-webkit-scrollbar { display: none; }
.rec-range-line .rec-range-btn { flex: 0 0 auto; white-space: nowrap; }

/* 记录页筛选工具条：时间范围收成一个胶囊（选项进弹层），不再平铺 5 个按钮 */
.rec-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 8px;
}
.rec-range-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--chip-quiet, #f1f4f7);
    color: var(--ink-700);
    font-size: var(--text-caption);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), transform 120ms var(--ease-out);
}
.rec-range-trigger:active { transform: scale(.97); }
.rec-range-trigger:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.rec-range-ic,
.rec-range-arrow { display: inline-flex; align-items: center; color: var(--ink-500); }
.rec-range-ic svg,
.rec-range-arrow svg { width: 14px; height: 14px; display: block; }
.rec-range-trigger::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* 记录页筛选：泳姿 / 距离两行独立 chips（数据驱动，只出现真实存在的选项） */
.rec-filter-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 10px;
}
.rec-filter-row {
    display: flex;
    /* 单行横向滚动：8 个泳姿标签挤成两行会让工具栏高出一截，也打断阅读节奏 */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: center;
    gap: 6px;
    /* 上下留 5px，让 chip 的 44px 命中区不被 overflow 裁掉 */
    padding: 5px 0;
}
.rec-filter-row::-webkit-scrollbar { display: none; }
.rec-filter-row[hidden] { display: none; }
.rec-fchip {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    background: var(--chip-quiet, #f1f4f7);
    color: var(--ink-500);
    font-size: var(--text-caption);
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform 120ms var(--ease-out);
}
.rec-fchip.active {
    background: var(--primary-100);
    border-color: var(--primary-600);
    color: var(--primary-700);
    font-weight: 600;
}
.rec-fchip:active { transform: scale(.96); }
.rec-fchip:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}
/* 距离行视觉上比泳姿行弱一档：泳姿是主筛选，距离是叠加上去的 */
#rec-dist-filter .rec-fchip {
    color: var(--ink-500);
}
#rec-dist-filter .rec-fchip.active {
    color: var(--primary-700);
}
/* 触控热区：34px 视觉高，伪元素补到 44px */
.rec-fchip { position: relative; }
.rec-fchip::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
    pointer-events: none;
}
.rec-month-group {
    margin-top: var(--space-1);
}
/* 月份标题：普通行内分隔（页面用了 -webkit-overflow-scrolling 复合滚动，sticky 实测不生效，故不做吸顶） */
.rec-month {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 44px;
    padding: 8px var(--space-2);
    margin: 0 0 2px;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-700);
    font-size: var(--text-caption);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.rec-month-label {
    flex: 1;
    min-width: 0;
    color: var(--ink-900);
}
.rec-month-count {
    color: var(--ink-500);
    font-weight: 400;
}
.rec-month-ic {
    display: inline-flex;
    color: var(--ink-300);
    transition: transform var(--dur-fast) var(--ease-out);
}
.rec-month-ic svg { width: 18px; height: 18px; display: block; }
.rec-month.is-open .rec-month-ic { transform: rotate(180deg); }
.rec-month:active { background: var(--primary-050); }

/* ===== 赛事页「按赛事分组」：一场比赛一组，组头承载赛事信息，组内只列成绩 ===== */
.cmp-group + .cmp-group {
    border-top: 1px solid var(--line);
}
.cmp-group-head {
    display: block;
    width: 100%;
    padding: 12px var(--space-2) 10px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.cmp-group-head:active {
    background: var(--primary-050);
}
.cmp-gh-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-micro);
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
}
.cmp-gh-date { min-width: 0; }
.cmp-gh-count {
    margin-left: auto;
    flex-shrink: 0;
}
.cmp-gh-ic {
    display: inline-flex;
    color: var(--ink-300);
    flex-shrink: 0;
    transition: transform var(--dur-fast) var(--ease-out);
}
.cmp-gh-ic svg { width: 18px; height: 18px; display: block; }
.cmp-group.is-open .cmp-gh-ic { transform: rotate(180deg); }
.cmp-gh-name {
    display: block;
    margin-top: 3px;
    font-size: var(--text-caption);
    font-weight: 700;
    line-height: 1.45;
    color: var(--ink-900);
}
.cmp-gh-sub {
    display: block;
    margin-top: 3px;
    font-size: var(--text-micro);
    line-height: 1.5;
    color: var(--ink-300);
}
.cmp-group-body {
    padding-bottom: 4px;
}
/* 回到最新浮标 */
.rec-top-btn {
    position: fixed;
    right: calc((100vw - var(--app-max)) / 2 + var(--space-4));
    bottom: calc(var(--tabbar-h) + var(--tabbar-float) + env(safe-area-inset-bottom) + var(--space-4));
    z-index: 90;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary-700);
    box-shadow: var(--shadow-md, 0 6px 20px rgba(27, 35, 48, .12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.rec-top-btn[hidden] { display: none; }
.rec-top-btn svg {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}
.fast {
    color: var(--success-text);
    font-weight: 600;
}
.slow {
    color: var(--warning-text);
    font-weight: 600;
}
.foul {
    color: var(--danger-text);
    font-weight: 600;
}

/* ===== 秒表计时器（三态：初始 / 计时中 / 结束回填） ===== */
.stopwatch {
    background: var(--primary-050);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-3) var(--space-3);
    text-align: center;
    margin-bottom: var(--space-3);
    border: 1px solid var(--primary-100);
}
.stopwatch-display {
    font-size: 40px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary-700);
    letter-spacing: 1px;
    line-height: 1.1;
    transition: color var(--dur-base);
}
.stopwatch.running .stopwatch-display {
    color: var(--danger-solid);
}
.stopwatch.running {
    background: var(--danger-100);
    border-color: var(--danger-100);
}
.stopwatch-btn {
    margin-top: var(--space-2);
}
.stopwatch-btn.running {
    background: var(--danger-solid);
}
.stopwatch-hint {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: var(--space-2);
}

/* 测速连测：轮次提示条 + 双按钮区 */
.speed-lap {
    background: var(--primary-050);
    border: 1px solid var(--primary-100);
    color: var(--primary-700);
    font-size: var(--text-micro);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
}
/* 测速弹层：多娃选择胶囊 */
.speed-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.speed-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: var(--radius-full);
    color: var(--ink-700);
    font-size: var(--text-label);
    line-height: 1.3;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out);
}
.speed-pill.active {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: #fff;
    font-weight: 600;
}
.speed-pill:active { background: var(--primary-100); }
.speed-pill.active:active { background: var(--primary-600); border-color: var(--primary-600); }
/* 同名泳娃：胶囊里补一行生日 / 等级，点之前就能分辨是谁的档案 */
.speed-pill.has-sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 14px;
    line-height: 1.15;
}
.speed-pill-sub {
    font-size: var(--text-micro);
    font-weight: 400;
    color: var(--ink-500);
    white-space: nowrap;
}
.speed-pill.active .speed-pill-sub { color: rgba(255, 255, 255, 0.82); }
/* 按钮内的次级说明（对比泳娃等） */
.btn-sub {
    display: block;
    margin-top: 2px;
    font-size: var(--text-micro);
    font-weight: 400;
    color: var(--ink-500);
}
.btn.is-on .btn-sub { color: var(--ink-600); }
.speed-actions {
    margin-top: var(--space-1);
}
.speed-actions .btn-ghost.btn-block {
    margin-top: var(--space-2);
    /* 次操作给个浅底描边，别和主按钮抢主色，也别弱到看不见 */
    background: #F1F6FA;
    border: 1px solid var(--line);
    color: var(--primary-700);
}

/* ===== 底部 tabbar ===== */
.tabbar {
    /* 悬浮胶囊：左右留 10px、底部留 8px，圆角与页面浅蓝背景形成层次 */
    position: fixed;
    left: 50%;
    bottom: calc(var(--tabbar-float) + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(calc(100% - 20px), calc(var(--app-max) - 20px));
    height: var(--tabbar-h);
    padding: 0 6px;
    display: flex;
    border: 0;
    border-radius: 24px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 8px 24px rgba(19,62,110,0.13), 0 0 0 1px rgba(19,62,110,0.045);
    z-index: 100;
}
.tab-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-bottom: 8px;
    box-sizing: border-box;
    color: var(--ink-450);
    font-size: var(--text-micro);
    cursor: pointer;
    position: relative;
    transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
/* 选中态底部短指示条 */
.tab-item::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 11px;
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--primary-700);
    opacity: 0;
    transform: translateX(-50%) scaleX(.3);
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.tab-item:active {
    transform: scale(0.94);
}
.tab-item.active {
    color: var(--primary-700);
}
.tab-item.active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}
.tab-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tab-item.active .tab-icon svg {
    stroke-width: 2.1;
}
.tab-icon svg { display: block; }
.tab-text {
    font-size: var(--text-micro);
    line-height: 14px;
    letter-spacing: .2px;
    white-space: nowrap;
}
.tab-badge {
    position: absolute;
    top: 1px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger-solid);
    border: 1.5px solid #fff;
}

/* ===== 中央凸起主按钮（录入入口收纳） ===== */
.tab-center {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin-top: -14px;
    align-self: flex-start;
    border: none;
    border-radius: 50%;
    background: var(--primary-700);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 3px 白环把圆和底栏上沿分开，阴影只留柔和扩散 */
    box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(11, 95, 147, 0.22);
    transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out),
                box-shadow var(--dur-fast) var(--ease-out);
}
.tab-center:active {
    transform: scale(0.93);
    background: var(--primary-600);
}
.tab-center svg { display: block; transition: transform var(--dur-fast) var(--ease-out); }
.tab-center.radial-open { transform: scale(1.06); background: var(--primary-600); }
.tab-center.radial-open svg { transform: rotate(45deg); }

/* ===== 中央按钮扇形（径向）展开菜单 ===== */
.radial-menu {
    position: fixed;
    inset: 0;
    z-index: 310;
    pointer-events: none;
}
.radial-item {
    position: absolute;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.radial-menu.open .radial-item {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}
.radial-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary-700);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast) var(--ease-out),
        background var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out);
}
.radial-item:hover .radial-icon {
    background: var(--primary-050);
    border-color: var(--primary-600);
    color: var(--primary-700);
    transform: translateY(-2px) scale(1.18);
    box-shadow: var(--shadow-3);
}
.radial-item:active .radial-icon {
    transform: scale(1.06);
    background: var(--primary-100);
}
.radial-icon svg { width: 22px; height: 22px; }
.radial-label {
    font-size: 10px;
    line-height: 1;
    color: #fff;
    white-space: nowrap;
    background: rgba(15, 23, 42, 0.32);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
/* 键盘聚焦项高亮（与 hover 同外观：放大 + 上浮） */
.radial-item.key-active .radial-icon,
.radial-item:focus-visible .radial-icon {
    background: var(--primary-050);
    border-color: var(--primary-600);
    color: var(--primary-700);
    transform: translateY(-2px) scale(1.18);
    box-shadow: var(--shadow-3);
}
.radial-item:focus { outline: none; }

/* ===== 底部弹层 Sheet（表单收纳入口） ===== */
.sheet-mask {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out);
    z-index: 290;
}
.sheet-mask.open {
    opacity: 1;
    pointer-events: auto;
}
.sheet {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translate(-50%, calc(105% + var(--sheet-drag, 0px)));
    width: 100%;
    max-width: var(--app-max);
    max-height: 86vh;
    background: var(--surface);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -20px 60px rgba(9,32,45,.18);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: transform var(--dur-base) var(--ease-out);
    /* 底部安全区交给 .sheet-body / .sheet-foot 自己吃，避免固定底栏悬空一截 */
}
.sheet.open {
    transform: translate(-50%, var(--sheet-drag, 0px));
}
/* 拖动中取消过渡，手指跟随；松手由 CSS 过渡回弹 */
.sheet.is-dragging { transition: none; }
.sheet-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #DCE7EF;
    margin: 10px auto 2px;
    flex-shrink: 0;
}
.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 12px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-900);
}
.sheet-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    background: #EFF4F8;
    color: var(--ink-700);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sheet-body {
    padding: var(--space-4) var(--space-4) calc(var(--space-5) + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
/* 有固定底栏时，安全区由底栏吃，正文底部回到常规留白 */
.sheet.has-foot .sheet-body {
    padding-bottom: var(--space-5);
}

/* ===== 「···」操作菜单 ===== */
.menu-mask {
    position: fixed;
    inset: 0;
    z-index: 305;
    display: none;
}
.menu-mask.open { display: block; }
/* 扇形菜单专用：毛玻璃压暗背景，突出上层图标钮 */
.menu-mask.mask-blur {
    background: rgba(15, 23, 42, 0.30);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    backdrop-filter: blur(10px) saturate(1.15);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .menu-mask.mask-blur { background: rgba(15, 23, 42, 0.32); }
}
.action-menu {
    position: fixed;
    min-width: 148px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-3);
    padding: 6px;
    z-index: 310;
    animation: menu-in var(--dur-fast) var(--ease-out);
}
@keyframes menu-in {
    from { opacity: 0; transform: translateY(4px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 42px;
    padding: 0 var(--space-3);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: var(--text-caption);
    color: var(--ink-900);
    cursor: pointer;
    text-align: left;
}
.menu-item:active {
    background: var(--bg);
}
.menu-item.danger {
    color: var(--danger-solid);
    font-weight: 600;
}

/* ===== 空状态（图标 + 说明 + 行动按钮） ===== */
.empty {
    text-align: center;
    padding: 34px 20px;
}
.empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #EAF5FC;
    color: #0072AD;
    font-size: 24px;
    line-height: 1;
    opacity: 1;
}
.empty-icon svg { width: 24px; height: 24px; }
.empty-text {
    font-size: 13px;
    color: var(--ink-500);
    margin: 0 0 14px;
    line-height: 1.75;
    padding: 0 6px;
}
.empty .btn {
    width: auto;
    min-height: 40px;
    padding: 0 var(--space-5);
    display: inline-flex;
}
.empty-acts {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 新账号首页引导（还没有泳娃时替换空壳 Hero） ===== */
.onb {
    padding: var(--space-4) var(--space-4) var(--space-3);
}
.onb-tt {
    font-size: var(--text-h2);
    font-weight: 700;
    color: var(--ink-900);
}
.onb-sub {
    margin-top: 6px;
    font-size: var(--text-caption);
    color: var(--ink-500);
    line-height: 1.55;
}
.onb-steps {
    margin: var(--space-3) 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.onb-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.onb-step.is-now {
    border-color: var(--primary-600);
    background: var(--primary-050);
}
.onb-no {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--chip-quiet);
    color: var(--ink-700);
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
}
.onb-step.is-now .onb-no {
    background: var(--primary-700);
    color: #fff;
}
.onb-body { flex: 1; min-width: 0; }
.onb-t {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.3;
}
.onb-d {
    margin-top: 3px;
    font-size: var(--text-tip);
    color: var(--ink-500);
    line-height: 1.45;
}
.onb-flag {
    flex: none;
    align-self: center;
    font-size: var(--text-tip);
    color: var(--primary-700);
    font-weight: 600;
}
.onb-btn {
    width: 100%;
    margin-top: var(--space-3);
}
.onb-foot {
    margin-top: 10px;
    text-align: center;
    font-size: var(--text-tip);
    color: var(--ink-300);
}

/* ===== 提示文字 ===== */
.tip {
    font-size: var(--text-tip);
    color: var(--ink-500);
    padding: 0;
    margin: 0 0 10px;
    line-height: 1.7;             /* 多行提示与下方浮动标签留出呼吸感，避免贴在一起 */
}
/* 提示文字后面紧跟输入框时，再多留一点间距（浮动标签会占到框顶） */
.tip + .form-item { margin-top: 14px; }
.page-tip {
    text-align: center;
    color: var(--ink-500);
    font-size: var(--text-caption);
    padding: var(--space-5) var(--space-3);
    line-height: 1.5;
}

/* ===== 登录页 ===== */
.login-view {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    background: linear-gradient(180deg, var(--primary-100) 0%, var(--bg) 100%);
}
.login-card {
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-5);
    box-shadow: var(--shadow-2);
}
.login-title {
    font-size: 21px;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-5);
    color: var(--ink-900);
}
.login-link {
    color: var(--primary-700);
    cursor: pointer;
    font-size: var(--text-tip);
}

/* ===== 首页泳娃概览卡 ===== */
.swim-hero {
    background:
        radial-gradient(140% 100% at 92% 4%, rgba(255,255,255,.15) 0%, rgba(255,255,255,0) 58%),
        radial-gradient(90% 80% at 4% 98%, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 62%),
        linear-gradient(152deg,#1A6D95 0%,#22789F 54%,#2A82A8 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    margin: 10px;
    padding: 14px 16px 13px;
    box-shadow: 0 6px 18px rgba(11,90,140,0.10);
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    transition: transform var(--dur-fast) var(--ease-out);
}
/* 右上角原来有个 0.04 白大圆，被裁出一条硬弧线像渲染瑕疵，已去掉 */
.swim-hero-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.swim-hero-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
/* Hero 头像两个字时缩一号，避免贴边 */
.swim-hero-avatar.is-2 { font-size: 16px; letter-spacing: -0.5px; }
/* 有头像照片：整块裁圆填充，不再显示文字 */
.hs-avatar.has-photo,
.swim-hero-avatar.has-photo,
.swimmer-avatar.has-photo { padding: 0; overflow: hidden; background: transparent !important; }
.hs-avatar.has-photo > img,
.swim-hero-avatar.has-photo > img,
.swimmer-avatar.has-photo > img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* 我的页泳娃卡：44px 头像 + 姓名同一行 */
.swimmer-head-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.swimmer-avatar-btn { padding: 0; border: 0; background: transparent; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.swimmer-avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; letter-spacing: 0; line-height: 1; box-sizing: border-box; }
.swimmer-avatar.is-2 { font-size: 13px; letter-spacing: -0.5px; }
.swimmer-avatar.has-photo { box-shadow: 0 0 0 1px var(--line); }
.swimmer-head-row .li-title { min-width: 0; }
.swim-hero-info {
    flex: 1;
    min-width: 0;
}
.swim-hero-name {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}
/* 同名泳娃区分：名字后面的小字（生日 / 等级），只在重名时出现 */
.swim-hero-subname {
    display: inline-block;
    margin-left: 8px;
    font-size: var(--text-micro);
    font-weight: 500;
    opacity: 0.78;
    vertical-align: 2px;
}
.swim-hero-badge {
    display: inline-block;
    font-size: var(--text-micro);
    background: rgba(0,0,0,0.32);
    border-radius: var(--radius-full);
    padding: 2px 9px;
    margin-top: 4px;
    font-weight: 500;
}
/* Hero 泳娃卡等级徽章：与我的页泳娃卡共用同一套六档配色（深底上换实心浅底彩字） */
.swim-hero-badge.badge-lv { font-weight: 700; }
.swim-hero-badge.badge-lv.lv0 { background: rgba(255,255,255,.22); color: #fff; }
.swim-hero-badge.badge-lv.lv1 { background: #E7EDF3; color: #49596B; }
.swim-hero-badge.badge-lv.lv2 { background: #D9F2ED; color: #0B6E60; }
.swim-hero-badge.badge-lv.lv3 { background: #DCEDFB; color: #0B5F93; }
.swim-hero-badge.badge-lv.lv4 { background: #EAE2FD; color: #5B32A4; }
.swim-hero-badge.badge-lv.lv5 { background: #FDEECB; color: #8A5C08; }
.swim-hero-stats {
    display: flex;
    gap: var(--space-2);
    margin-top: 10px;
}
/* 空数据时不留三个 0，换成一条能引导下一步的说明 */
.swim-hero-empty {
    margin-top: 10px;
    padding: 13px 14px 15px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
}
.swim-hero-empty .she-t {
    font-size: var(--text-btn);
    font-weight: 700;
    color: #fff;
}
.swim-hero-empty .she-d {
    margin-top: 5px;
    font-size: var(--text-tip);
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
}
.swim-hero-empty .she-btn {
    margin-top: 12px;
    min-height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: var(--radius-full);
    background: #fff;
    color: var(--primary-700);
    font-size: var(--text-btn-sm);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(6, 32, 52, .18);
}
.swim-hero-empty .she-btn:active { transform: scale(.97); }
.sh-stat {
    flex: 1;
    background: rgba(0,0,0,0.20);
    border-radius: var(--radius-md);
    padding: 7px 4px;
    text-align: center;
}
.sh-stat-icon {
    font-size: 15px;
}
.sh-stat b {
    display: block;
    font-size: var(--text-tip);
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sh-stat span {
    display: block;
    font-size: var(--text-label);
    opacity: 0.92;
    margin-top: 2px;
}

/* Hero 近期最佳成绩条 */
.sh-best {
    margin-top: var(--space-3);
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-md);
    padding: 10px var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.sh-best-label { font-size: var(--text-micro); opacity: 0.9; display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.sh-best-time { font-size: var(--text-h2); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.sh-best-meta { margin-left: auto; font-size: var(--text-micro); opacity: 0.92; text-align: right; min-width: 0; }

/* ===== Hero 内各泳姿最佳明细 ===== */
.hero-best {
    margin-top: 10px;
    background: rgba(9,66,102,0.16);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--radius-md);
    padding: 9px 11px;
}
.hero-best-title {
    font-size: var(--text-micro);
    font-weight: 600;
    opacity: 0.92;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.hero-best-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-3); }
.hb-group { min-width: 0; }
.hb-stroke {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: var(--text-tip);
    font-weight: 600;
    opacity: 0.95;
    padding-bottom: 2px;
    margin-bottom: 3px;
    border-bottom: 1px solid rgba(255,255,255,0.22);
}
.hb-row {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 0;
    border-top: none;
    min-width: 0;
}
.hb-group:first-child .hb-row:first-of-type { border-top: none; }
.hb-dist {
    width: 36px;
    flex-shrink: 0;
    font-size: var(--text-caption);
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}
.hb-cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
/* 两列窄块内宽度有限：训练（测速）列收起，行内仅留距离 + 比赛成绩；测速有值后再做纵向双行适配 */
.hb-cell--speed { display: none; }
.hb-cell-label { width: 28px; flex-shrink: 0; font-size: var(--text-label); opacity: 0.8; }
.hb-cell-time { margin-left: auto; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-cell-time.muted { opacity: 0.4; font-weight: 400; }
.hb-cell:has(.hb-cell-time.muted) .hb-cell-label { opacity: 0.4; }
/* 同泳姿还有几个距离没展示（+N） */
.hb-more { flex-shrink: 0; font-size: var(--text-label); opacity: 0.7; font-variant-numeric: tabular-nums; }
/* 混合泳：跨两列整行，结构与其它泳姿一致（标题行带表头线 + 成绩行） */
.hb-group--wide { grid-column: 1 / -1; margin-top: 6px; }
.hb-row--wide { border-top: none; }
/* 点泳姿卡展开全部距离 */
.hb-group--tap { cursor: pointer; }
.hb-group--tap:active { opacity: 0.72; }
/* 弹层：某泳姿全部最佳 */
.hb-all-hint { font-size: var(--text-label); color: var(--ink-500); margin-bottom: var(--space-2); }
.hb-all-list { display: flex; flex-direction: column; }
.hb-all-row { display: flex; align-items: baseline; gap: var(--space-2); padding: 10px 0; border-bottom: 1px solid var(--line); }
.hb-all-row:last-child { border-bottom: none; }
.hb-all-dist { width: 52px; flex-shrink: 0; font-size: var(--text-caption); color: var(--ink-700); font-variant-numeric: tabular-nums; }
.hb-all-time { flex-shrink: 0; font-size: var(--text-h3); font-weight: 700; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.hb-all-meta { flex: 1; min-width: 0; text-align: right; font-size: var(--text-label); color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 首页「赛事节奏」横向带：Hero 下方独立白卡，每场一个点，横向看最近 5 场 ===== */
.rail-card {
    background: var(--surface);
    margin: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-3) calc(var(--space-3) - 2px);
    box-shadow: var(--shadow-1);
}
.hero-rail-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: var(--text-btn);
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: var(--space-2);
}
.hero-rail-sub { font-weight: 400; color: var(--ink-500); font-size: var(--text-micro); }
.rail-stage { --rail-n: 5; }
.rail-row { display: grid; grid-template-columns: repeat(var(--rail-n), minmax(0, 1fr)); }
.rail-dates { margin-bottom: 3px; }
.rail-date {
    text-align: center;
    font-size: var(--text-micro);
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 虚线轴 + 右端箭头：轴从第一个节点中心起，箭头收在卡片内侧 */
.rail-dots {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--rail-n), 1fr);
    height: 26px;
    align-items: center;
}
.rail-axis {
    position: absolute;
    top: 50%;
    left: calc(50% / var(--rail-n));
    right: 1px;
    height: 2px;
    margin-top: -1px;
    background-image: repeating-linear-gradient(to right, #A3B9CC 0 5px, transparent 5px 10px);
    background-repeat: repeat-x;
    background-size: auto 2px;
    transform: none;
}
.rail-axis::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -4px;
    border-left: 7px solid #9FB6C9;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}
.rail-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
    touch-action: manipulation;
}
/* 节点上下的细引线，模仿参考图的竖向短线 */
.rail-node::before,
.rail-node::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1.5px;
    background: #CFE0EC;
    transform: translateX(-50%);
}
.rail-node::before { top: -8px; height: 10px; }
.rail-node::after { bottom: -8px; height: 10px; }
.rail-node.is-latest::before,
.rail-node.is-latest::after { background: #A9CDE6; }
.rail-dot {
    position: relative;
    z-index: 1;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--primary-600);
    box-shadow: 0 0 0 3px var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.rail-dot::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-600);
}
.rail-node.is-latest .rail-dot { border-color: var(--primary-700); }
.rail-node.is-latest .rail-dot::after { background: var(--primary-700); }
.rail-date.is-latest { color: var(--primary-700); font-weight: 600; }
/* 破纪录节点：赭金强调，和「今天」的主蓝区分开 */
.rail-node.is-pb .rail-dot { border-color: var(--pb-text); }
.rail-node.is-pb .rail-dot::after { background: var(--pb-text); }
.rail-node.is-pb::before,
.rail-node.is-pb::after { background: #CFE0EC; }
.rail-date.is-pb,
.rail-time.is-pb { color: var(--pb-text); }
.rail-node:active .rail-dot { transform: scale(1.18); }
.rail-times { margin-top: 6px; }
.rail-time {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-900);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rail-time em {
    display: block;
    margin-top: 2px;
    font-style: normal;
    font-weight: 400;
    font-size: var(--text-micro);
    color: var(--ink-500);
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rail-time.is-latest { color: var(--primary-700); }
.rail-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    margin-left: auto;
    padding: 4px 0 4px 8px;
    font-size: var(--text-micro);
    font-weight: 500;
    color: var(--primary-700);
    cursor: pointer;
    white-space: nowrap;
}
.rail-more svg { width: 14px; height: 14px; }

/* ===== 生涯时间线（我的页）：年份可折叠 + 赛事单行，一条约 52px ===== */
.tl { padding-top: 2px; }
.tl-year-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 0 6px;
    border: 0;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--ink-500);
}
.tl-year-row:first-child { padding-top: 2px; }
.tl-yr {
    font-size: var(--text-micro);
    font-weight: 700;
    letter-spacing: 0.06em;
}
.tl-yr-meta { font-size: var(--text-micro); }
.tl-yr-caret {
    margin-left: auto;
    font-size: var(--text-micro);
    color: var(--primary-600);
}
.tl-item {
    position: relative;
    display: flex;
    gap: 8px;
    padding: 6px 0 6px 24px;
    min-width: 0;
}
.tl-item::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line);
}
.tl-item:first-of-type::before { top: 12px; }
.tl-item:last-child::before { bottom: calc(100% - 12px); }
.tl-dot {
    position: absolute;
    left: 2px;
    top: 13px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--ink-300);
}
.tl-item--start .tl-dot { border-color: var(--ink-500); }
.tl-item--comp .tl-dot { border-color: var(--primary-600); background: var(--primary-100); }
.tl-item--level .tl-dot { border-color: #8A5A00; background: var(--pb-100); }
.tl-body { flex: 1 1 auto; min-width: 0; }
.tl-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tl-date {
    flex: 0 0 auto;
    font-size: var(--text-micro);
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
}
.tl-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-time {
    flex: 0 0 auto;
    font-size: var(--text-caption);
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}
.tl-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
    font-size: var(--text-micro);
    color: var(--ink-500);
}
.tl-flag {
    font-size: var(--text-micro);
    font-weight: 600;
    border-radius: var(--radius-full);
    padding: 0 6px;
    line-height: 1.6;
}
.tl-flag--pb { color: var(--pb-text); background: var(--pb-100); }
.tl-flag--seq { color: var(--primary-700); background: var(--primary-100); }
.tl-item[data-comp] { cursor: pointer; }

/* ===== 快捷入口 ===== */
.quick-nav {
    display: flex;
    gap: var(--space-2);
    margin: 0 var(--space-2) var(--space-2);
}
.quick-item {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-2);
    text-align: center;
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition: transform var(--dur-fast);
}
.quick-item:active {
    opacity: 0.85;
    transform: scale(0.98);
}
.quick-item-icon {
    font-size: 21px;
    display: inline-flex;
    justify-content: center;
    color: var(--primary-600);
}
.quick-item-icon svg { width: 22px; height: 22px; }
.quick-item-text {
    font-size: var(--text-tip);
    margin-top: var(--space-1);
    color: var(--ink-900);
    font-weight: 500;
}

/* ===== 打卡日历 ===== */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}
.cal-title {
    font-size: var(--text-btn);
    font-weight: 700;
    color: var(--ink-900);
}
.btn-cal {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 18px;
    line-height: 1;
    border: none;
    cursor: pointer;
    padding: 0;
}
.btn-cal:active { opacity: 0.75; }
.cal-stats {
    display: flex;
    justify-content: space-between;
    gap: var(--space-1);
    background: var(--primary-050);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-1);
    margin-bottom: var(--space-3);
}
.cal-stat {
    flex: 1;
    text-align: center;
}
.cal-stat b {
    display: block;
    font-size: var(--text-stat);
    color: var(--primary-700);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.cal-stat span {
    font-size: var(--text-label);
    color: var(--ink-500);
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.cal-dow {
    text-align: center;
    font-size: var(--text-label);
    color: var(--ink-500);
    padding: var(--space-1) 0;
    font-weight: 600;
}
.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: var(--text-caption);
    color: var(--ink-700);
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-1);
}
.cal-empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
}
.cal-cell.has {
    background: var(--success-100);
    color: var(--success-text);
    font-weight: 700;
}
.cal-cell.today {
    outline: 2px solid var(--primary-700);
    outline-offset: -2px;
}
/* 没打卡的日子也能点：过去＝补卡，今天＝打卡。默认不染色（整月染色太吵），只给按压反馈 */
.cal-cell.can-makeup {
    cursor: pointer;
}
.cal-cell.can-makeup:active {
    transform: scale(.96);
    background: rgba(0, 136, 204, .10);
}
.cal-hint {
    margin: 6px 2px 2px;
    font-size: var(--text-caption);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
/* 还没到的日子不给点：不能提前打卡 */
.cal-cell.is-future {
    color: var(--text-tertiary, var(--text-secondary));
    opacity: .45;
    cursor: default;
    box-shadow: none;
    background: transparent;
}
.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success-solid);
    display: inline-block;
    margin-left: 3px;
}
.cal-detail-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: var(--text-tip);
    color: var(--primary-700);
    margin: var(--space-3) 0 6px;
    font-weight: 700;
}
.cal-detail-add {
    margin-left: auto;
    background: none;
    border: 0;
    padding: 2px 4px;
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--primary-700);
    cursor: pointer;
}

/* ===== 成绩对比看板 ===== */
.chart-svg {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    background: var(--surface);
    border-radius: var(--radius-sm);
}
.chart-summary {
    font-size: var(--text-tip);
    color: var(--primary-700);
    margin: var(--space-2) 0 6px;
    font-weight: 700;
    line-height: 1.5;
}
.chart-detail {
    margin-top: 6px;
}
/* 看板底部「查看全部明细」入口：轻量按钮，把逐条明细交给下方成绩列表 */
.chart-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: 10px;
    padding: 0 var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface, #fff);
    color: var(--primary-700);
    font-size: var(--text-tip);
    font-weight: 700;
    cursor: pointer;
    transition: transform 120ms ease, background 160ms ease;
}
.chart-more:active {
    transform: scale(.97);
    background: var(--bg);
}
/* 成绩列表顶部的项目筛选条 */
.res-exact-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 8px;
    padding: 8px var(--space-3);
    border-radius: var(--radius-md);
    background: #eef6fc;
    border: 1px solid #d6e9f6;
}
.res-exact-txt {
    font-size: var(--text-tip);
    color: var(--primary-700);
    font-weight: 700;
}
.res-exact-clear {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #cfe3f2;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-700);
    font-size: var(--text-tip);
    font-weight: 700;
    cursor: pointer;
}

/* ===== 编辑面板 ===== */
.edit-panel {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-top: 6px;
}

/* ===== 同场批量录入：单行成绩块 ===== */
.batch-row {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-3);
}
.batch-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.batch-row-title {
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-700);
}
/* 截图识别把原文项目名带出来（如「4X50米自由泳接力」）：距离列存的是总距离 200，
   家长看原文才敢确认没认错项目，也不至于被「200 米」这个换算过的数字搞懵 */
.batch-row-proj {
    margin-left: 6px;
    font-weight: 400;
    color: var(--ink-500);
}
.batch-del {
    border: none;
    background: transparent;
    color: var(--danger-text);
    font-size: var(--text-caption);
    padding: 6px 10px;
    cursor: pointer;
}
.batch-row .form-item { margin-bottom: 8px; }
/* 识别到「这一项没有时间」的行：标题上挂个小标，免得家长以为成绩框漏填 */
.batch-flag {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: var(--text-micro);
    font-weight: 600;
    color: var(--warning-text);
    background: var(--warning-100);
}
.batch-flag[hidden] { display: none; }

/* ===== 布局宽度：固定手机单列，宽屏不再放宽 / 双栏（app-max 见 :root） ===== */

/* ===== 全局 Toast 轻提示（白色浮层 / 图标 + 文案 / 底部浮出） ===== */
.toast {
    position: fixed;
    left: 50%;
    /* 默认贴在底部导航上方（tabbar 的总高度已包含底部安全区） */
    bottom: var(--toast-bottom, calc(var(--tabbar-h) + var(--tabbar-float) + 24px));
    width: calc(100% - 48px);
    max-width: calc(var(--app-max) - 48px);
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 1px solid rgba(27,35,48,.08);
    border-radius: 14px;
    background: #FFFFFF;
    color: var(--ink-900);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(.98);
    transition: opacity 180ms var(--ease-out), transform 200ms var(--ease-out);
    box-shadow: 0 10px 26px rgba(27,35,48,.14), 0 2px 6px rgba(27,35,48,.06);
    z-index: 400;
}
.toast.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.toast-ic {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-700);
}
.toast-ic svg { width: 18px; height: 18px; }
.toast-body { min-width: 0; }
.toast-title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink-900); }
.toast-sub { margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.35; color: var(--ink-500); }
.toast-delta { margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.35; color: #A76B00; }
.toast.success .toast-ic { background: #E8F7EF; color: #137A55; }
.toast.info .toast-ic { background: #EAF5FC; color: var(--primary-700); }
.toast.warn .toast-ic { background: #FFF4E5; color: #A25A12; }
.toast.error .toast-ic { background: #FDECEC; color: #C0392B; }
.toast.achievement .toast-ic { background: #FFF4D8; color: #A76B00; }
.toast.achievement { border-color: rgba(167,107,0,.18); }
.toast.achievement .toast-title { color: #7A4E00; font-weight: 600; }

/* ===== 全局确认对话框（替代原生 confirm） ===== */
.dlg-mask {
    position: fixed;
    inset: 0;
    z-index: 380;
    background: rgba(15,23,42,0.40);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .dlg-mask { -webkit-backdrop-filter: blur(5px) saturate(1.04); backdrop-filter: blur(5px) saturate(1.04); }
}
.dlg-mask.open { display: flex; }
.dlg {
    width: 100%;
    max-width: 336px;
    background: var(--surface);
    border: 1px solid rgba(27,35,48,.08);
    border-radius: 18px;
    padding: 20px 20px 16px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(9,32,45,.22), 0 4px 16px rgba(9,32,45,.08);
    animation: dlg-in var(--dur-fast) var(--ease-out);
}
@keyframes dlg-in {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: none; }
}
.dlg-head { display: flex; align-items: center; gap: 11px; }
.dlg-ic {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #EAF5FC; color: #0072AD;
}
.dlg-ic svg { width: 20px; height: 20px; }
.dlg.tone-danger .dlg-ic { background: #FDECEC; color: #C0392B; }
.dlg.tone-warn .dlg-ic { background: #FFF4E5; color: #A25A12; }
.dlg.tone-success .dlg-ic { background: #E8F7EF; color: #137A55; }
.dlg-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-900);
}
.dlg-msg {
    font-size: 13px;
    color: var(--ink-700);
    line-height: 1.7;
    margin: 10px 0 18px;
    white-space: pre-line;
}
.dlg .dlg-btns {
    display: flex;
    gap: 10px;
}
.dlg .dlg-btns .btn {
    flex: 1;
    min-height: 46px;
    border-radius: 12px;
    font-size: 14px;
}
.dlg .dlg-btns #dlg-cancel {
    background: #F3F7FA;
    border: 1px solid rgba(27,35,48,.10);
    color: var(--ink-700);
}
.dlg .dlg-btns #dlg-cancel:active { background: #EAF1F7; }


/* ===== 形变提交（A 档）：整宽主按钮在请求超过 300ms 时收起成圆形，成功后展开 ===== */
.btn[data-morph="1"] {
    overflow: hidden;
    transition: width .26s cubic-bezier(.2,.8,.2,1), border-radius .26s,
                background-color .2s ease, transform .12s ease;
}
.btn[data-morph="1"]:active:not(.is-loading) { transform: scale(.97); }
.btn[data-morph="1"].is-loading {
    background: #0F84BE;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(15,132,190,.10);
}
.btn[data-morph="1"].is-morphing {
    width: 46px !important;
    min-width: 46px;
    padding-left: 0;
    padding-right: 0;
    border-radius: 999px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn[data-morph="1"].is-morphing .btn-spin { width: 18px; height: 18px; }
/* 次要按钮（ghost）也走形变：收起时保持白底蓝环转圈，不抢主按钮的实心蓝 */
.btn-ghost[data-morph="1"].is-loading {
    background: #fff;
    color: var(--primary-700);
    box-shadow: 0 0 0 4px rgba(0,114,173,.06);
}
.btn-ghost[data-morph="1"].is-morphing .btn-spin {
    border-color: rgba(0,114,173,.22);
    border-top-color: var(--primary-700);
}
.btn[data-morph="1"].is-done { border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) {
    .btn[data-morph="1"] { transition: background-color .15s ease; }
}
/* ===== 按钮加载态（提交中禁用 + 转圈） ===== */
.btn.is-loading {
    background: var(--btn-disabled-bg);
    color: #fff;
    cursor: not-allowed;
    pointer-events: none;
}
/* ===== B 档：非形变按钮 —— 按下压缩，加载保持品牌色，成功 ✓ 回弹 ===== */
.btn { transition: background-color .18s ease, color .18s ease, transform .12s ease; }
.btn:active:not(.is-loading):not(.is-done) { transform: scale(.97); }
.btn.is-loading:not([data-morph="1"]) {
    background: #0F84BE;
    box-shadow: 0 0 0 4px rgba(15,132,190,.08);
}
.btn-ghost.is-loading:not([data-morph="1"]) {
    background: #fff;
    color: var(--primary-700);
    border-color: rgba(0,114,173,.45);
    box-shadow: 0 0 0 4px rgba(0,114,173,.06);
}
.btn-ghost.is-loading:not([data-morph="1"]) .btn-spin {
    border-color: rgba(0,114,173,.22);
    border-top-color: var(--primary-700);
}
@keyframes btnDonePop {
    0% { transform: scale(1); }
    38% { transform: scale(1.035); }
    100% { transform: scale(1); }
}
.btn.is-done { animation: btnDonePop .3s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) {
    .btn.is-done { animation: none; }
    .btn:active:not(.is-loading):not(.is-done) { transform: none; }
}

.btn-spin {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-rot 0.8s linear infinite;
    display: inline-block;
}
@keyframes btn-rot { to { transform: rotate(360deg); } }

/* ===== 统一线性 SVG 图标：对齐与尺寸（替代 emoji） ===== */
.card-title-ic { display: inline-flex; color: var(--primary-600); }
.card-title-ic svg, .sheet-title svg { width: 17px; height: 17px; }
.sheet-title { display: inline-flex; align-items: center; gap: 7px; }
.empty-ic { display: flex; align-items: center; justify-content: center; color: #0072AD; }
.empty-ic svg { width: 24px; height: 24px; }
.btn > svg { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; }
.meta-ic { display: inline-flex; color: var(--ink-300); }
.li-meta > svg, .comp-item-meta > svg, .comp-picked-meta > svg,
.meta-ic svg, .tip > svg, .chip > svg {
    width: 13px; height: 13px; vertical-align: -2px; flex: none;
}
.comp-picked-name > svg { width: 15px; height: 15px; color: var(--success-text); vertical-align: -2px; }
.chip { align-items: center; }
.login-title { display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-title svg { width: 22px; height: 22px; color: var(--primary-600); }

/* ===== P1-1 通用列表操作行 / 字段错误态（就近提示） ===== */
.li-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: var(--space-2);
}
/* 赛事/测速/打卡条目：「⋯」弱化到右上角，不独占一行；下移 3px 与第一行文字垂直居中 */
.result-item .li-actions,
.speed-item .li-actions,
.checkin-item .li-actions {
    position: absolute;
    top: 3px;
    right: 0;
    margin-top: 0;
}
.form-item.has-error input,
.form-item.has-error select {
    border-color: var(--danger-solid);
}
.form-item.has-error input:focus,
.form-item.has-error select:focus {
    box-shadow: 0 0 0 3px rgba(220,38,38,0.14);
}
.field-error {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 4px);
    font-size: var(--text-micro);
    color: var(--danger-text);
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
}
/* 错误文案不再参与 form-item 高度：否则 label / 密码眼睛按钮按 top:50% 会跟着下移，出现错位 */
.form-item.has-error { margin-bottom: calc(var(--space-3) + 22px); }
.field-error::before {
    content: "!";
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--danger-solid);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

/* ===== 骨架屏（列表加载中占位，替代纯文字"加载中…"） ===== */
.skeleton-wrap { padding: 4px 0 6px; }
.skeleton {
    border-radius: 12px;
    border: 1px solid rgba(27,35,48,.045);
    background: linear-gradient(90deg, var(--skeleton-from) 25%, var(--skeleton-to) 37%, var(--skeleton-from) 63%);
    background-size: 400% 100%;
    animation: skel 1.2s ease-in-out infinite;
    margin-bottom: 10px;
}
.skeleton.skel-line { height: 12px; border-radius: 6px; }
.skeleton.skel-line.short { width: 55%; }
.skeleton.skel-card { height: 84px; }
@keyframes skel {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

/* ===== 全局错误态：接口失败 / 加载异常，提供重试入口（P2-5） ===== */
.state-error {
    text-align: center;
    padding: var(--space-5) var(--space-3);
}
.state-error .empty-icon { background: #FDECEC; color: var(--danger-solid); }
.state-error .empty-text { color: var(--ink-700); }
.state-error .btn {
    min-height: 40px;
    padding: 0 var(--space-5);
    display: inline-flex;
    align-items: center;
}

/* ===== 卡片标题右侧「查看全部」出口（P1-6） ===== */
.card-more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--primary-700);
    font-size: var(--text-micro);
    font-weight: 500;
    min-height: 32px;
    padding: 0 var(--space-1);
    cursor: pointer;
}
.card-more svg { width: 13px; height: 13px; }

/* ===== 弹层宽屏限宽居中（P1-5） ===== */
@media (min-width: 768px) {
    .sheet { max-width: 480px; }
}

/* ===== 秒表两态：开始 / 结束·重新计时 / 重置 ===== */
.stopwatch-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    flex-wrap: wrap;
}
.stopwatch-actions .btn { min-height: 42px; }

/* 局部间距通用类（替代散落内联 style） */
.btn-block { width: 100%; margin-top: var(--space-3); }
.btn-edit-comp { margin-top: 6px; }
.tip-mb { margin-bottom: 6px; }

/* ===== 我的页账号卡（P1-6 → 设置区重排） ===== */
.account-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar-sm {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    background: var(--primary-100);
    color: var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}
.account-info { flex: 1 1 auto; min-width: 0; }
.account-name {
    font-size: var(--text-h3);
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.25;
}
.account-sub {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: 2px;
}
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: var(--space-2);
}
.account-grid .btn { width: 100%; }
.account-logout {
    display: block;
    width: 100%;
    margin-top: var(--space-3);
    padding: 12px 0 2px;
    border: 0;
    border-top: 1px solid var(--line);
    background: none;
    color: var(--danger-text);
    font-size: var(--text-micro);
    font-family: inherit;
    cursor: pointer;
}
.account-logout:active { opacity: 0.6; }
.swimmer-hint {
    font-size: var(--text-micro);
    color: var(--ink-500);
    margin-top: 4px;
}

/* ===== 成绩详情弹层（P2-4 看板下钻） ===== */
.detail-hero { text-align: center; padding: var(--space-3) 0 var(--space-4); }
.detail-hero-time { font-size: 30px; font-weight: 700; color: var(--primary-700); font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.detail-hero-sub { font-size: var(--text-caption); color: var(--ink-500); margin-top: 4px; }
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--text-caption); }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--ink-500); flex-shrink: 0; }
.detail-val { color: var(--ink-900); text-align: right; min-width: 0; }

/* ===== 设置中心（P2-7） ===== */
.setting-group { margin-bottom: var(--space-4); }
.setting-group-title { font-size: var(--text-micro); color: var(--ink-300); font-weight: 600; margin-bottom: var(--space-1); }

/* 看板数据点可点击（P2-4） */
.chart-dot-click { cursor: pointer; }
.chart-dot-click:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; border-radius: 50%; }

/* ===== 密码可见性切换（眼睛按钮） ===== */
.form-item.has-pwd input { padding-right: 44px; }
.pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--ink-500);
    cursor: pointer;
    z-index: 4;
}
.pwd-toggle:hover { color: var(--primary-700); }

/* ===== 我的页：当前使用泳娃高亮 ===== */
.swimmer-item.is-current {
    background: var(--primary-050);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-md);
    padding-left: var(--space-3);
    padding-right: var(--space-3);
}
/* A4：非当前条目可点选切换，hover 给浅底反馈 */
.swimmer-item:not(.is-current) { cursor: pointer; }
.swimmer-item:not(.is-current):hover {
    background: var(--bg);
    border-radius: var(--radius-md);
}

/* ===== 我的页泳娃卡：备注标签化 + 操作按钮一行均分贴底（去掉右下角孤立按钮留出的空白） ===== */
.swimmer-item .swimmer-remark {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink-500);
    font-size: var(--text-micro);
    line-height: 1.6;
}
.swimmer-item .li-actions {
    justify-content: stretch;
    gap: 8px;
    margin-top: 10px;
}
.swimmer-item .li-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    padding: 0 8px;
    gap: 4px;
}
.swimmer-item .li-actions .item-more {
    flex: none;
    width: 44px;
}

/* ===== 自研选择器（底部动作表） ===== */
.picker-source {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.picker-trigger {
    width: 100%;
    height: 52px;
    padding: 18px var(--space-3) 6px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--ink-900);
    font-size: var(--text-caption);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.picker-trigger:hover { border-color: var(--primary-600); }
.picker-trigger:focus-visible { border-color: var(--primary-700); outline: none; box-shadow: 0 0 0 3px rgba(0,136,204,0.16); }
.picker-trigger.is-empty .picker-trigger-text { color: var(--ink-500); }
.picker-trigger-text { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-trigger-arrow { color: var(--ink-500); flex-shrink: 0; display: inline-flex; }
.picker-trigger-arrow svg { width: 16px; height: 16px; }

.picker-mask {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out);
    z-index: 360;
}
.picker-mask.open { opacity: 1; pointer-events: auto; }
.picker-sheet {
    position: fixed; bottom: 0; left: 50%;
    transform: translate(-50%, 105%);
    width: 100%; max-width: var(--app-max);
    max-height: 70vh;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-3);
    z-index: 365;
    display: flex; flex-direction: column;
    transition: transform var(--dur-base) var(--ease-out);
    padding-bottom: env(safe-area-inset-bottom);
}
.picker-sheet.open { transform: translate(-50%, 0); }
.picker-sheet-bar { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 4px; flex-shrink: 0; }
.picker-sheet-title { font-size: var(--text-h3); font-weight: 700; color: var(--ink-900); padding: 6px var(--space-4) var(--space-2); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.picker-options { overflow-y: auto; padding: var(--space-2) 0 var(--space-3); -webkit-overflow-scrolling: touch; }
.picker-option {
    width: 100%;
    min-height: 48px;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
    padding: 12px var(--space-4);
    border: none; background: transparent;
    font-size: var(--text-body); color: var(--ink-900);
    cursor: pointer; text-align: left;
}
.picker-option-label { flex: 1; min-width: 0; }
.picker-option-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.picker-option-sub { font-size: var(--text-micro); color: var(--ink-500); font-weight: 400; line-height: 1.35; }
.picker-option.has-sub { min-height: 56px; padding-top: 10px; padding-bottom: 10px; }
/* 分组标题：粘顶，长列表滚动时当前组的名字一直在 */
.picker-group {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px var(--space-4) 5px;
    background: var(--bg);
    font-size: var(--text-micro);
    font-weight: 600;
    color: var(--ink-500);
    letter-spacing: 0.02em;
}
.picker-option.selected .picker-option-sub { color: var(--primary-700); font-weight: 400; opacity: 0.9; }
.picker-option-check { color: var(--primary-700); display: inline-flex; flex-shrink: 0; }
.picker-option-check svg { width: 18px; height: 18px; }
.picker-option.selected { background: var(--primary-050); color: var(--primary-700); font-weight: 600; }
.picker-option:active { background: var(--primary-100); }

/* ===== 成绩时间选择器（分/秒/百分位三列动作表） ===== */
.form-item.has-time input { padding-right: 44px; }
.time-pick-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent;
    color: var(--ink-500); cursor: pointer; z-index: 4;
}
.time-pick-toggle:hover { color: var(--primary-700); }
.time-pick-toggle:disabled { opacity: 0.4; pointer-events: none; }
.time-pick-toggle svg { width: 19px; height: 19px; }

/* 测速成绩：整块可点，直接唤出分/秒/百分秒 选择器（不再靠右侧小图标） */
.form-item.has-time .time-field {
    padding-right: 44px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.4px;
    font-variant-numeric: tabular-nums;
    color: #16324F;
}
.form-item.has-time .time-field[readonly] {
    cursor: pointer;
    caret-color: transparent;
}
/* 右侧只做「可编辑」暗示，不拦点击：整块框都是热区 */
.form-item.has-time .time-field-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--ink-300);
    pointer-events: none;
}
.form-item.has-time .time-field-chevron svg { width: 100%; height: 100%; display: block; }
.form-item.has-time .time-field:not(:placeholder-shown) + .time-field-chevron { color: var(--ink-450); }
/* 成绩字段用「固定上方标签 + 占位写明格式」，与选择器区分开：它是点开面板，不是下拉 */
.form-item.has-time.form-item-composite .time-field {
    height: 52px;
    padding: 0 44px 0 14px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .4px;
    font-variant-numeric: tabular-nums;
    color: #16324F;
}
.form-item.has-time.form-item-composite .time-field::placeholder {
    color: var(--ink-300);
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 17px;
}

.tp-mask {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.45);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out);
    z-index: 360;
}
.tp-mask.open { opacity: 1; pointer-events: auto; }
.tp-sheet {
    position: fixed; bottom: 0; left: 50%;
    transform: translate(-50%, 105%);
    width: 100%; max-width: var(--app-max);
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-3);
    z-index: 365;
    display: flex; flex-direction: column;
    transition: transform var(--dur-base) var(--ease-out);
    padding-bottom: env(safe-area-inset-bottom);
}
.tp-sheet.open { transform: translate(-50%, 0); }
.tp-bar { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px auto 4px; flex-shrink: 0; }
.tp-title { font-size: var(--text-h3); font-weight: 700; color: var(--ink-900); padding: 6px var(--space-4) var(--space-2); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.tp-cols { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4) 0; }
.tp-col { flex: 1; min-width: 0; }
.tp-col-label { text-align: center; font-size: var(--text-micro); color: var(--ink-500); margin-bottom: 6px; }
.tp-col-list { max-height: 216px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; -webkit-overflow-scrolling: touch; }
.tp-col-item {
    height: 40px; border: none; background: transparent; border-radius: var(--radius-sm);
    font-size: var(--text-caption); color: var(--ink-700); cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.tp-col-item.selected { background: var(--primary-100); color: var(--primary-700); font-weight: 600; }
.tp-preview { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 0.5px; color: var(--ink-900); font-variant-numeric: tabular-nums; padding: var(--space-3) 0 var(--space-2); }
.tp-btns { display: flex; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); }
.tp-btns .btn { flex: 1; }
/* 次要操作（键盘输入）收窄弱化，别和主按钮抢 */
.tp-btns .btn.tp-manual {
    flex: 0 0 auto;
    width: auto;
    padding-inline: 12px;
    font-size: var(--text-caption);
    font-weight: 500;
    color: var(--ink-500);
}
/* 三列滚动条隐藏：移动端靠滑动，静态细条反而像脏点 */
.tp-col-list { scrollbar-width: none; }
.tp-col-list::-webkit-scrollbar { width: 0; height: 0; }

/* ===== 调整成绩面板：秒 · 百分秒两段（≥60 秒才长分钟段）+ 快捷微调 ===== */
.adj-sub {
    text-align: center;
    font-size: 13px;
    color: #7A8CA3;
    margin: -4px 0 10px;
}
.adj-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 4px;
}
.adj-seg {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid #CFE3F5;
    background: #F7FBFF;
    border-radius: 14px;
    transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.adj-seg:focus-within {
    border-color: var(--primary-700);
    background: #fff;
}
/* 选择器要压过文件末尾的「移动端输入字号 16px」兜底规则 */
.adj-clock .adj-seg input {
    width: 2.1ch;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    color: #0B4A7A;
    letter-spacing: .5px;
    font-variant-numeric: tabular-nums;
    -webkit-appearance: none;
    appearance: none;
}
.adj-clock .adj-seg input::-webkit-outer-spin-button,
.adj-clock .adj-seg input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.adj-seg span {
    font-size: 13px;
    color: #8496AB;
}
.adj-clock .adj-seg-min input {
    width: 1.4ch;
    font-size: 30px;
}
.adj-dot {
    font-size: 34px;
    font-weight: 700;
    color: #0B4A7A;
    line-height: 1;
}
.adj-sep {
    font-size: 26px;
    color: #8496AB;
}
.adj-hint {
    text-align: center;
    font-size: 12px;
    color: var(--ink-450);
    margin-top: 8px;
}
.adj-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 12px;
}
.adj-step {
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #EAF4FD;
    color: #0B67A4;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background .15s var(--ease-out), transform .12s var(--ease-out);
}
.adj-step:active {
    background: #D9EBFA;
    transform: scale(.98);
}
.adj-origin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: #EFF7FE;
    color: #0B67A4;
    font-size: 13.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.adj-origin.is-fast { background: #E9F8F0; color: #10795A; }
.adj-origin.is-slow { background: #FDF4E8; color: #A65E14; }
.adj-restore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    background: transparent;
    color: #5C7590;
    font-size: 13px;
    cursor: pointer;
}
.adj-restore svg { width: 15px; height: 15px; }

/* 内联版（新增测速表单里）：贴着字段走，左对齐更符合其他输入框，尺寸略收 */
.adj-inline { padding-top: 2px; }
.adj-inline .adj-clock { justify-content: flex-start; gap: 6px; }
.adj-inline .adj-seg { flex: 0 0 auto; padding: 6px 10px; }
.adj-inline .adj-hint { margin-top: 4px; text-align: left; padding-left: 2px; }
.adj-inline .adj-steps { gap: 8px; margin: 8px 0 4px; }
.adj-inline .adj-step { height: 36px; font-size: 15.5px; }
/* 表单内的 input 会被 .form-item / input[type] 的通用宽度规则拉满，这里用更高特异度钉死两位宽度 */
.form-item .adj-inline .adj-clock .adj-seg input {
    width: 2.4ch;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 30px;
    line-height: 1.15;
}
.form-item .adj-inline .adj-clock .adj-seg.adj-seg-min input { width: 1.3ch; font-size: 24px; }
.adj-inline .adj-clock .adj-seg input::placeholder { color: #C3D2E0; }
/* 成绩字段吃 form-item-composite 的上方标签布局，这里只把内边距收紧一点 */
.form-item.is-adj { margin-bottom: 4px; }
/* ===== 调整成绩浮层：独立于 #sheet，z-index 更高，可叠在编辑弹层之上 ===== */
.adj-layer-wrap {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.adj-layer-mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .32);
}
.adj-layer {
    position: relative;
    width: 100%;
    max-width: var(--app-max);
    max-height: 88vh;
    overflow: auto;
    padding: 4px 18px calc(14px + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 40px rgba(19, 62, 110, .2);
    animation: adj-layer-in .22s var(--ease-out);
}
@keyframes adj-layer-in {
    from { transform: translateY(18px); opacity: .55; }
    to { transform: none; opacity: 1; }
}
.adj-layer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 4px;
}
.adj-layer-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 17px;
    font-weight: 700;
    color: #16324F;
}
.adj-layer-title svg { width: 19px; height: 19px; color: var(--primary-700); }
.adj-layer-x {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #F1F6FA;
    color: #5C7590;
    cursor: pointer;
}
.adj-layer-x svg { width: 16px; height: 16px; }
.adj-layer-body { padding: 2px 0 6px; }
.adj-layer-foot {
    display: flex;
    gap: 10px;
    padding: 6px 0 4px;
}
.adj-layer-foot .btn { flex: 1; }
/* 取消也是按钮，给个浅底块，避免在整宽底栏里像纯文字 */
.adj-layer-foot .btn-ghost { background: #F1F6FA; color: #3A4E63; }
.adj-layer-foot .btn-ghost:active { background: #E7EFF7; }
@media (min-width: 560px) {
    .adj-layer-wrap { align-items: center; }
    .adj-layer { max-width: 420px; border-radius: 20px; padding-bottom: 18px; }
}

#adj-cancel {
    background: #F1F6FA;
    color: #3A4E63;
}
#adj-cancel:active { background: #E7EFF7; }

/* 测速成绩可点开「调整成绩」：用极浅虚线下划线给一点可编辑暗示，不抢数字本身 */
.speed-item .li-time {
    cursor: pointer;
    border-bottom: 1px dashed rgba(11, 103, 164, .18);
    padding-bottom: 1px;
}
.speed-item .li-time:active { border-bottom-color: rgba(11, 103, 164, .5); }

/* ===== 移动端防聚焦自动放大 =====
   iOS Safari / 安卓 WebView 在输入控件字号 <16px 时，聚焦会自动放大整页，
   导致抽屉/页面横向溢出。这里把可输入/选择控件字号统一抬到 16px；规则置于
   样式表末尾，覆盖前面 caption(14px) 的控件字号。 */
.form-item input,
.form-item select,
.form-item textarea,
.comp-picker input,
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="url"],
textarea,
select {
    font-size: 16px;
}

/* ===== 页面与条目动效（只服务状态变化，不做装饰） ===== */

/* 1) 切页进入：内容轻微上移 + 淡入，只在切换瞬间播一次（类由 switchPage 加/删） */
.page-container.is-entering {
    animation: pageEnter var(--dur-enter) var(--ease-out) both;
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* 2) 列表首屏：前 6 条错开 30ms 依次进入；第 7 条起不播，避免长列表拖沓 */
.item-enter {
    animation: itemEnter var(--dur-enter) var(--ease-out) both;
}
@keyframes itemEnter {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
/* 各页面列表容器：按「所在分组的子序」挂 stagger，DOM 重建即重播。
   记录页/赛事页按月份分组，条目不是容器直接子元素，故用后代选择器，
   nth-child 相对各自分组计数（每组条目 ≤3，首屏两组依次进入即可） */
#rec-list-wrap .list-item:nth-child(-n+6),
#recent-rec-list .compact-item:nth-child(-n+6),
#result-list-wrap .list-item:nth-child(-n+6),
#comp-list > *:nth-child(-n+6) {
    animation: itemEnter var(--dur-enter) var(--ease-out) both;
}
#rec-list-wrap .list-item:nth-child(1),
#recent-rec-list .compact-item:nth-child(1),
#result-list-wrap .list-item:nth-child(1),
#comp-list > *:nth-child(1) { animation-delay: 0ms; }
#rec-list-wrap .list-item:nth-child(2),
#recent-rec-list .compact-item:nth-child(2),
#result-list-wrap .list-item:nth-child(2),
#comp-list > *:nth-child(2) { animation-delay: 30ms; }
#rec-list-wrap .list-item:nth-child(3),
#recent-rec-list .compact-item:nth-child(3),
#result-list-wrap .list-item:nth-child(3),
#comp-list > *:nth-child(3) { animation-delay: 60ms; }
#rec-list-wrap .list-item:nth-child(4),
#recent-rec-list .compact-item:nth-child(4),
#result-list-wrap .list-item:nth-child(4),
#comp-list > *:nth-child(4) { animation-delay: 90ms; }
#rec-list-wrap .list-item:nth-child(5),
#recent-rec-list .compact-item:nth-child(5),
#result-list-wrap .list-item:nth-child(5),
#comp-list > *:nth-child(5) { animation-delay: 120ms; }
#rec-list-wrap .list-item:nth-child(6),
#recent-rec-list .compact-item:nth-child(6),
#result-list-wrap .list-item:nth-child(6),
#comp-list > *:nth-child(6) { animation-delay: 150ms; }

/* 3) 打卡格子点亮：提交成功后该日格子回弹一次（类由 openCheckinSheet 提交分支加） */
.cal-cell {
    transition: background-color var(--dur-fast) var(--ease-out),
                color var(--dur-fast) var(--ease-out),
                transform 120ms var(--ease-out);
}
.cal-cell.has:active { transform: scale(.96); }
.cal-cell.is-fresh {
    animation: cellPop 260ms var(--ease-spring) both;
}
.cal-cell.is-fresh .cal-dot {
    animation: dotPop 300ms var(--ease-spring) both;
}
@keyframes cellPop {
    0%   { transform: scale(.8); }
    55%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}
@keyframes dotPop {
    0%   { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 4) 生涯轴：虚线从左描出 → 节点依次落位（--i 由 home.js 注入）→ 破纪录节点脉冲一次 */
.rail-axis {
    clip-path: inset(0 100% 0 0);
    animation: railDraw 520ms 60ms var(--ease-out) both;
}
@keyframes railDraw {
    to { clip-path: inset(0 0 0 0); }
}
.rail-node,
.rail-date,
.rail-time {
    animation: railIn 260ms var(--ease-out) both;
    animation-delay: calc(60ms + var(--i, 0) * 70ms);
}
@keyframes railIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}
.rail-node.is-pb .rail-dot {
    animation: pbPulse 700ms 380ms var(--ease-out) both;
}
@keyframes pbPulse {
    0%   { box-shadow: 0 0 0 3px var(--surface), 0 0 0 3px rgba(160,110,30,0); }
    45%  { box-shadow: 0 0 0 3px var(--surface), 0 0 0 9px rgba(160,110,30,.26); }
    100% { box-shadow: 0 0 0 3px var(--surface), 0 0 0 13px rgba(160,110,30,0); }
}

/* 5) 新成绩数字：破纪录时数字先赭金再回落（judge 由提交返回的 is_faster 决定） */
.li-time.is-pb-flash,
.li-time.is-pop {
    animation: timeFlash 880ms var(--ease-out) both;
}
@keyframes timeFlash {
    0%   { transform: scale(1.06); }
    60%  { transform: scale(1.02); }
    100% { transform: none; }
}
.li-time.is-pb-flash {
    animation: timeFlash 880ms var(--ease-out) both,
               pbTint 880ms var(--ease-out) both;
}
@keyframes pbTint {
    0%   { color: var(--pb-text); text-shadow: 0 0 10px rgba(160,110,30,.35); }
    55%  { color: var(--pb-text); }
    100% { text-shadow: none; }
}

/* 6) 通用按压反馈：补齐原本没有 :active 反馈的可点元素（只缩放，不改颜色） */
.rec-view-btn,
.rec-range-btn,
.chip,
.rail-more,
.cal-stat,
.tl-item {
    transition: transform 120ms var(--ease-out);
}
.rec-view-btn:active,
.rec-range-btn:active,
.chip:active,
.rail-more:active,
.cal-stat:active,
.tl-item:active {
    transform: scale(.96);
}

/* 6b) 触控热区补齐：视觉尺寸不变，用伪元素把可点区域撑到 44px 高（三端一致） */
.rec-view-btn,
.rec-range-btn,
.btn-cal,
.rail-more,
.item-more {
    position: relative;
}
.rec-view-btn::before,
.rec-range-btn::before,
.btn-cal::before,
.rail-more::before,
.item-more::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
    /* 透明命中层：只扩大可点面积，不改变任何视觉 */
}

/* 动效尊重系统偏好 */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
    }
}

/* ===== 多行输入（textarea）：禁用浮动标签，改常规上方标签（置于末尾以覆盖表单浮动标签规则） ===== */
.form-item.has-textarea label {
    position: static !important;
    transform: none !important;
    display: block;
    font-size: var(--text-micro);
    color: var(--ink-700);
    margin-bottom: 5px;
    padding: 0;
    line-height: 1.4;
}
.form-item.has-textarea textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 76px;
    height: auto;
    padding: 10px var(--space-3);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--ink-900);
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
}
.form-item.has-textarea textarea:focus {
    border-color: var(--primary-700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,136,204,0.16);
}
/* ===== 非输入控件的 form-item（里面放按钮/提示/文件框等）：同样改常规上方标签 =====
   浮动标签靠 input 的聚焦/有值上浮，块内没有 input 时会停在中间压住内容（导入弹层的截图识别区就是这种）。 */
.form-item.form-item-stack label {
    position: static !important;
    transform: none !important;
    display: block;
    font-size: var(--text-micro);
    color: var(--ink-700);
    margin-bottom: 6px;
    padding: 0;
    line-height: 1.4;
}
/* 截图识别结果区：与上方「识别截图」按钮拉开间距，标题不贴着按钮 */
#imp-ocr-result { margin-top: var(--space-3); }
#imp-ocr-result .setting-group-title { margin-top: 0; }
/* ===== 卡片标题内联操作按钮 + 列表搜索框 ===== */
.card-title-actions { flex-wrap: nowrap; }
.card-title-btn {
    margin-left: auto;
    flex-shrink: 0;
    height: 32px;
    padding: 0 10px;
    font-size: var(--text-micro);
    gap: 4px;
}
.card-title-btn svg { width: 14px; height: 14px; }
.search-input {
    width: 100%;
    height: 40px;
    margin-bottom: var(--space-2);
    padding: 0 var(--space-3);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--ink-900);
    box-sizing: border-box;
}
.search-input:focus {
    border-color: var(--primary-700);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,136,204,0.16);
}
/* ===== 疑似重复赛事面板（新增赛事前合并提醒） ===== */
.dup-panel {
    margin: var(--space-3) 0;
    padding: var(--space-3);
    border: 1px solid rgba(226,132,44,0.36);
    border-radius: var(--radius-sm);
    background: rgba(255,246,235,0.72);
}
.dup-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-2); }
.dup-title { font-size: var(--text-caption); font-weight: 600; color: #a8641c; }
.dup-sub { font-size: var(--text-micro); color: var(--ink-500); }
.dup-card {
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}
.dup-card-head { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.dup-card-name {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.4;
    word-break: break-word;
}
.dup-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dup-tag {
    font-size: var(--text-micro);
    line-height: 1.5;
    padding: 0 6px;
    border-radius: 999px;
    white-space: nowrap;
}
.dup-tag-date { color: #a8641c; background: rgba(226,132,44,0.14); }
.dup-tag-name { color: var(--primary-700); background: rgba(0,136,204,0.12); }
.dup-card-meta {
    margin-top: 2px;
    font-size: var(--text-micro);
    color: var(--ink-500);
    word-break: break-word;
}
.dup-card-actions { margin-top: var(--space-2); }
.dup-card-actions .btn { width: 100%; }
.dup-foot { display: flex; gap: var(--space-2); }
.dup-foot .btn { flex: 1; }

/* ===== 表单提示文案状态色（跨日赛事比赛日期校验等） ===== */
.form-hint.tip-warn { color: #a8641c; font-weight: 600; }
.form-hint.tip-ok { color: var(--primary-700); }

/* ===== 字段右内侧校验状态图标（仅错误时给红叉；合法不画勾，避免满屏绿勾的噪音） ===== */
.form-item .field-state {
    position: absolute;
    right: 12px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}
.form-item .field-state svg { width: 16px; height: 16px; }
.form-item.field-bad .field-state { color: var(--danger-solid); }
.form-item.field-bad input,
.form-item.field-bad textarea { padding-right: 38px; }
.form-item.has-time .field-state { right: 56px; }
.form-item.has-time.field-bad input { padding-right: 68px; }
/* 密码框：右侧已有眼睛按钮（right 6 + 44 宽），错误红叉要退到它左边，否则两个图标叠在一起 */
.form-item.has-pwd .field-state { right: 56px; }
.form-item.has-pwd.field-bad input { padding-right: 82px; }
/* 首页最近记录卡头：两个内联动作（记一条 / 查看全部）并排，右侧对齐 */
.card-title-actions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: auto;
    flex-wrap: nowrap;
}
.card-title-actions .card-more { margin-left: 0; flex-shrink: 0; }
.card-title-actions .card-more svg { width: 14px; height: 14px; }
/* 截图识别：赛事匹配结果提示条（家长最关心这批成绩挂到哪场比赛） */
.imp-match {
    display: block;
    margin: var(--space-2) 0 var(--space-3);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-tip);
    line-height: 1.5;
}
.imp-match-ok { background: rgba(52, 168, 118, .10); color: #1f7a52; }
.imp-match-warn { background: rgba(214, 158, 46, .12); color: #8a6416; }
/* ===== 品牌：泳迹（2026-11-26 定名与图标） ===== */
.login-title { margin-bottom: 6px; }
.login-title .login-logo {
    width: 56px; height: 56px; object-fit: contain; display: block;
}
.login-sub {
    text-align: center;
    font-size: var(--text-caption);
    color: var(--ink-500);
    margin: 0 0 var(--space-5);
    letter-spacing: .2px;
}
.header-title .header-logo {
    width: 34px; height: 34px; object-fit: contain; display: block;
}

/* ===== 品牌字「泳迹」：站酷庆科黄油体（SIL OFL，子集仅两字 3.3KB） ===== */
@font-face {
    font-family: "YongJiBrand";
    src: url("../fonts/yongji-wordmark.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
/* 只用在登录页品牌大字；黄油体笔画重，17px 的顶栏会显笨，顶栏保持系统字体 */
.login-title {
    font-family: "YongJiBrand", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 24px;
    letter-spacing: 1px;
    color: #0B3A66;
}
.login-title .login-logo { width: 40px; height: 40px; }

/* 英文名（品牌定名 Swim Trace）：小字、宽字距，压在中文名与标语之间 */
.login-brand-en {
    text-align: center;
    font-family: "Helvetica Neue", Arial, "PingFang SC", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3.2px;
    text-transform: uppercase;
    color: var(--primary-600);
    opacity: .85;
    margin: 4px 0 0;
}
.login-sub { letter-spacing: .5px; }

/* ===== 合规三件套：注销入口 / 法律链接 / 注销弹层提示（2026-11-26） ===== */
.account-delete {
    display: block; width: 100%; margin-top: 6px; padding: 10px 0;
    background: none; border: 0; min-height: 44px;
    color: var(--danger-text); font-size: 13px; text-align: center; cursor: pointer;
}
.account-delete:hover { text-decoration: underline; }
.account-legal {
    display: flex; gap: 8px; justify-content: center; align-items: center;
    margin-top: 4px; font-size: 12px; color: #7A8A99;
}
.account-legal a { color: #5B6B7A; text-decoration: none; }
.account-legal a:hover { text-decoration: underline; }
.danger-note {
    background: var(--danger-100); color: var(--danger-text);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
    font-size: 13px; line-height: 1.75;
}
.danger-note ul { margin: 6px 0 10px; padding-left: 18px; }
.danger-note strong { font-weight: 600; }

/* ===== 隐私政策 / 用户协议 阅读页 ===== */
.legal-page { max-width: 760px; margin: 0 auto; padding: 28px 20px 64px; }
.legal-page h1 { font-size: 22px; margin: 0 0 6px; color: #0B3A66; }
.legal-page .legal-meta { font-size: 12px; color: #7A8A99; margin-bottom: 22px; }
.legal-page h2 { font-size: 16px; margin: 26px 0 10px; color: #16436B; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.85; color: #2E3E4C; }
.legal-page ul { padding-left: 20px; }
.legal-page table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.legal-page th, .legal-page td { border: 1px solid #D6E2EC; padding: 8px 10px; text-align: left; vertical-align: top; line-height: 1.6; }
.legal-page th { background: #EEF4FA; font-weight: 600; }
.legal-page .legal-back {
    display: inline-block; margin-bottom: 18px; font-size: 13px;
    color: #0B6AA8; text-decoration: none;
}
.legal-page .legal-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid #D6E2EC; font-size: 12px; color: #7A8A99; }

/* ===== 加到桌面引导条（2026-11-26） ===== */
.install-tip {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--tabbar-h) + var(--tabbar-float) + env(safe-area-inset-bottom) + 10px);
    width: min(calc(100% - 24px), 420px);
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; box-sizing: border-box;
    background: #FFFFFF; border: 1px solid var(--border, #D6E2EC);
    border-radius: 14px; box-shadow: 0 6px 22px rgba(11, 58, 102, .14);
    z-index: 1200;
    animation: installTipIn .26s ease-out;
}
@keyframes installTipIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.install-tip-hide { opacity: 0; transform: translate(-50%, 8px); transition: opacity .24s, transform .24s; }
.install-tip-icon { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.install-tip-body { flex: 1; min-width: 0; }
.install-tip-title { font-size: 13px; font-weight: 600; color: #0B3A66; line-height: 1.4; }
.install-tip-desc { font-size: 11.5px; color: #5B6B7A; line-height: 1.5; margin-top: 2px; }
.install-tip-act {
    flex: none; padding: 7px 12px; border: 0; border-radius: 10px;
    background: #0088CC; color: #fff; font-size: 12px; cursor: pointer;
}
.install-tip-x {
    flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: none;
    color: #9AAAB8; font-size: 17px; line-height: 1; cursor: pointer;
}

/* ===== 2026-11-26 体验：登录页空间居中 + 提交态反馈 ===== */
/* 用 dvh：手机浏览器工具栏收起/展开时，登录卡片不再被顶偏 */
.app-container { height: 100dvh; }
.login-view {
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(env(safe-area-inset-top) + 24px) var(--space-5) calc(env(safe-area-inset-bottom) + 24px);
}
/* margin-block:auto 负责垂直居中；内容超过一屏时自动退回顶部，不会被裁一半 */
.login-card { margin-block: auto; }
@media (max-height: 540px) {
    .login-view { align-items: flex-start; }
    .login-card { margin-block: 0; }
}
/* 提交中：置灰 + 不可点（文案由 JS 换成「请稍候…」+ 转圈） */
.btn.is-loading { cursor: not-allowed; box-shadow: none; }
/* 提交成功：短暂变绿「✓ 已保存」，让用户确认这一下确实点到了 */
.btn.is-done { background: var(--success-solid); color: #fff; cursor: default; pointer-events: none; }

/* ===== 2026-11-26 触控命中区补强（视觉不变，只放大可点范围） ===== */
/* 顶栏切泳娃：可见高度 32，纵向命中区补到 44（高频导航，不能用小胶囊） */
.header-swimmer { position: relative; }
.header-swimmer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
}
/* 记录页视图切换（列表 / 日历）：34×30 → 40×36 */
.rec-view-btn { width: 40px; min-height: 36px; }
/* 卡片右上角文字链（全部 / 记一条 / 导入 / 对比 / 目标）：纵向补到 40 */
.card-more { position: relative; }
.card-more::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
}
/* 生涯时间线年份行：23px → 36px */
.tl-year-row { padding-top: 8px; padding-bottom: 8px; min-height: 36px; }

/* 筛选 chip 与时间范围：34px 视觉不变，纵向命中补到 44 */
.rec-fchip, .rec-range-trigger { position: relative; }
.rec-fchip::after,
.rec-range-trigger::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
}

/* ===== 全局请求进度条（顶栏下方 2px，只在 160ms 以上的请求出现） ===== */
.req-bar {
    position: fixed;
    /* 贴在顶栏下沿：压在最上面会盖住 logo，放 0 又会被 header 挡住 */
    top: calc(var(--header-h) + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    height: 2px;
    width: 0;
    max-width: var(--app-max);
    background: var(--primary-600);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: width .25s var(--ease-out), opacity .18s linear;
}
.req-bar.on { opacity: 1; }

/* 「⋯」更多操作：命中区已 44×44，但 17px 浅灰太弱，提到可辨中性色 + 按下反馈 */
.item-more { color: var(--ink-500); }
.item-more:active { color: var(--ink-900); background: rgba(27,35,48,.06); }

/* ===== 弹层固定底栏：主按钮不再随长表单滚出可视区（键盘弹起时尤其明显） ===== */
.sheet-foot {
    flex-shrink: 0;
    padding: 10px var(--space-4) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 16px rgba(27,35,48,.06);
}
.sheet-foot:empty { display: none; }
.sheet-foot > .btn { width: 100%; }
/* 成组按钮一起上浮到固定底栏时，中间留一口气（原 margin 随父级 speed-actions 失效） */
.sheet-foot > .btn + .btn { margin-top: var(--space-2); }
/* 次操作搬到固定底栏后仍是「有边界的按钮」，不要退化成一行裸字 */
.sheet-foot > .btn-ghost.btn-block {
    background: #F1F6FA;
    border: 1px solid #D3E1EC;
    color: var(--primary-700);
}
.sheet-foot .dlg-btns { display: flex; gap: var(--space-2); }
.sheet-foot .dlg-btns .btn { flex: 1; }

/* ===== 忘记密码入口（登录卡片内的行内链接） ===== */
.login-link { color: var(--primary-600); text-decoration: none; font-weight: 500; }
.login-link:hover { text-decoration: underline; }

/* ===== 监护人同意勾选（添加泳娃弹层） ===== */
.consent-check {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px; margin: 4px 0 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm, 10px);
    background: var(--surface-soft, #F5F8FB);
    font-size: 13px; line-height: 1.5; color: #3D4C5A;
}
.consent-check input[type=checkbox] {
    width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--primary-600);
}
.consent-check a { color: var(--primary-600); text-decoration: none; }
.consent-check.has-error { border-color: var(--danger, #D64545); }
.consent-check.has-error span { color: var(--danger, #D64545); }

/* ===== 文档类页面（隐私政策 / 用户协议）=====
   全局 html,body 是 overflow:hidden（App 外壳自己滚动），文档页直接放在 body 里会被裁成不可滚动。
   这里解除限制，让文档页按正常文档流整页滚动。 */
html.legal-doc, body.legal-doc {
    height: auto;
    min-height: 100%;
    overflow: visible;
}
body.legal-doc {
    overflow-y: auto;
    overscroll-behavior-y: contain;
}
.legal-page { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* ===== 安卓 PWA 安装横幅（Chromium beforeinstallprompt）===== */
.pwa-tip {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 90; display: flex; align-items: center; gap: 10px;
    max-width: calc(100% - 32px);
    padding: 12px 14px;
    background: rgba(11, 58, 102, .94); color: #fff;
    border-radius: 12px; box-shadow: 0 8px 24px rgba(11, 58, 102, .28);
    font-size: 13px; line-height: 1.45;
}
.pwa-tip-txt { flex: 1; min-width: 0; }
.pwa-tip .pwa-install {
    flex: 0 0 auto; padding: 7px 14px; border: 0; border-radius: 8px;
    background: #fff; color: #0B3A66; font-size: 13px; font-weight: 600;
}
.pwa-tip .pwa-close {
    flex: 0 0 auto; width: 24px; height: 24px; border: 0; background: transparent;
    color: rgba(255,255,255,.8); font-size: 18px; line-height: 1;
}

/* ===== 我的页「分享给好友」弹层 ===== */
.share-preview {
    margin: 2px 0 12px;
    border-radius: var(--radius-md, 14px);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(11, 58, 102, .14);
    background: #EEF4FA;
    display: flex;
    align-items: center;
    justify-content: center;
    height: min(52vh, 470px);
    -webkit-user-select: auto;
    user-select: auto;
}
.share-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    -webkit-touch-callout: default;   /* iOS 允许长按保存图片 */
}
.share-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: #3D4C5A;
    margin-bottom: 12px;
}

/* ===== 教练协作（S1）：弹层内成员名单 / 邀请码 ===== */
.collab-note{font-size:12px;line-height:1.6;color:var(--ink-500);background:var(--primary-050);border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:14px}
.collab-block{margin-bottom:16px}
.collab-block-title{font-size:13px;font-weight:600;color:var(--ink-700);margin-bottom:8px}
.collab-members{display:flex;flex-direction:column;gap:8px}
.collab-member{display:flex;align-items:center;gap:10px;background:var(--input-bg);border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.cm-main{flex:1;min-width:0}
.cm-name{font-size:14px;color:var(--ink-900);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cm-meta{font-size:12px;color:var(--ink-500);margin-top:2px}
.collab-empty{font-size:13px;color:var(--ink-500);padding:10px 2px}
.collab-pending{font-size:12px;color:var(--ink-700);background:var(--pb-100);border-radius:8px;padding:8px 10px;margin-top:8px;line-height:1.5}
.collab-pending b{color:var(--pb-text);letter-spacing:1px}
.collab-code{margin-top:12px;text-align:center;background:var(--primary-050);border:1px dashed var(--primary-600);border-radius:12px;padding:14px 12px}
.cc-label{font-size:12px;color:var(--ink-500)}
.cc-num{font-size:30px;font-weight:700;letter-spacing:6px;color:var(--primary-700);margin:6px 0 4px;font-variant-numeric:tabular-nums}
.cc-hint{font-size:12px;color:var(--ink-500);line-height:1.5}


/* ============================================================
   年度成长报告（.rp-*）：三页 A4 版式
   基准：docs/_report_mock.html，截图 1588×2246（794×1122.5 @2x）
   这块是「印刷品」设计，配色独立于 App Token，改动请同时核对三页截图
   ============================================================ */
.rp-wrap{--rp-brand:#0B6F9C;--rp-deep:#084C6B;--rp-soft:#E8F4FA;--rp-accent:#2FB39A;--rp-line:#DCE9F0}
.rp-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-4px 0 10px}
.rp-tools-t{font-size:12px;color:var(--ink-500);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-tools-a{display:flex;gap:8px;flex:0 0 auto}
.rp-btn{border:1px solid var(--primary-700);background:var(--primary-700);color:#fff;border-radius:999px;padding:7px 14px;font-size:13px;cursor:pointer;white-space:nowrap;flex:0 0 auto}
.rp-btn[disabled]{background:var(--btn-disabled-bg);border-color:var(--btn-disabled-bg);cursor:default}
.rp-btn-ghost{background:#fff;color:var(--primary-700)}
.rp-stage{background:#E9F1F5;border-radius:10px;overflow:hidden;padding:8px 0 0}
.rp-scaler{width:794px;transform-origin:top left}
.rp-page{width:794px;height:1122.5px;background:#fff;position:relative;overflow:hidden;margin:0 0 20px;box-shadow:0 6px 18px rgba(12,42,58,.12);font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#152A35}
.rp-page:first-child{margin-top:4px}

/* —— 头尾 —— */
.rp-pad{position:absolute;inset:44px 46px 0}
.rp-head{display:flex;align-items:center;justify-content:space-between;height:34px}
.rp-brand{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;letter-spacing:.5px;color:var(--rp-deep)}
.rp-brand svg{width:22px;height:22px}
.rp-head-r{font-size:12px;color:#8299A6;letter-spacing:2px}
.rp-foot{position:absolute;left:46px;right:46px;bottom:26px;display:flex;align-items:center;justify-content:space-between;
    font-size:10px;color:#8299A6;letter-spacing:.6px;border-top:1px solid var(--rp-line);padding-top:9px}
.rp-no{letter-spacing:1.6px}

/* —— 封面 —— */
.rp-cover-band{position:absolute;left:0;right:0;top:0;height:352px;overflow:hidden;
    background:linear-gradient(150deg,#0B6F9C 0%,#0E86A9 55%,#2FB39A 120%)}
.rp-rings{position:absolute;right:-70px;top:-90px;width:330px;height:330px;border-radius:50%;
    background:radial-gradient(circle at 60% 40%,rgba(255,255,255,.22),rgba(255,255,255,0) 62%)}
.rp-wave{position:absolute;left:0;bottom:-1px;width:100%;height:104px}
.rp-cover-head{position:absolute;left:46px;right:46px;top:44px;display:flex;align-items:center;justify-content:space-between;color:#fff}
.rp-b{display:flex;align-items:center;gap:9px;font-size:16px;font-weight:700;letter-spacing:1px}
.rp-b svg{width:26px;height:26px;stroke:#fff;fill:none}
.rp-t{font-size:11px;letter-spacing:3px;opacity:.85}
.rp-idcard{position:absolute;left:46px;right:46px;top:198px;display:flex;align-items:center;gap:22px}
.rp-ava{width:96px;height:96px;border-radius:50%;background:rgba(255,255,255,.22);border:2px solid rgba(255,255,255,.55);
    display:flex;align-items:center;justify-content:center;font-size:30px;color:#fff;font-weight:700;letter-spacing:2px;overflow:hidden}
.rp-ava img{width:100%;height:100%;object-fit:cover}
.rp-nm{font-size:40px;font-weight:700;color:#fff;letter-spacing:2px;line-height:1.1}
.rp-lvbadge{display:inline-block;margin-left:12px;padding:3px 10px;border-radius:20px;background:rgba(255,255,255,.18);
    border:1px solid rgba(255,255,255,.4);font-size:11.5px;color:#fff;letter-spacing:.6px;vertical-align:3px}
.rp-meta{margin-top:9px;font-size:12.5px;color:rgba(255,255,255,.9);letter-spacing:.8px}
.rp-meta i{display:inline-block;width:4px;height:4px;border-radius:50%;background:rgba(255,255,255,.7);margin:0 9px;vertical-align:2px}

/* —— 关键词 / 四格 / 等级 / 注脚 —— */
.rp-keyword{position:absolute;left:46px;right:46px;top:392px;font-size:26px;font-weight:700;letter-spacing:1.5px;color:var(--rp-deep);line-height:1.4}
.rp-sub{display:block;margin-top:8px;font-size:12.5px;font-weight:400;color:#456070;letter-spacing:.4px}
.rp-keyword:before{content:"";display:block;width:32px;height:3px;background:var(--rp-accent);border-radius:2px;margin-bottom:14px}
.rp-stats{position:absolute;left:46px;right:46px;top:512px;display:grid;gap:12px}
.rp-stat{background:var(--rp-soft);border:1px solid #D4E8F2;border-radius:14px;padding:16px 14px 14px;text-align:center}
.rp-n{font-size:30px;font-weight:700;color:var(--rp-brand);letter-spacing:.5px;line-height:1.1;font-variant-numeric:tabular-nums}
.rp-n small{font-size:12px;font-weight:600;margin-left:2px;color:var(--rp-deep)}
.rp-l{margin-top:9px;font-size:11.5px;color:#456070;letter-spacing:.5px}
.rp-level{position:absolute;left:46px;right:46px;top:648px;border:1px solid var(--rp-line);border-radius:14px;padding:16px 18px;
    display:flex;align-items:center;gap:16px;background:#FBFDFE}
.rp-cap{font-size:12px;color:#8299A6;letter-spacing:2px;flex:0 0 68px}
.rp-from,.rp-to{font-size:15px;font-weight:700;color:#152A35}
.rp-to{color:var(--rp-brand)}
.rp-arrow{flex:1;height:1px;background:linear-gradient(90deg,var(--rp-line),var(--rp-accent),var(--rp-line));position:relative}
.rp-arrow:after{content:"";position:absolute;right:-1px;top:-3.5px;border:4px solid transparent;border-left-color:var(--rp-accent)}
.rp-date{font-size:12px;color:#8299A6;margin-left:6px}
.rp-quote{position:absolute;left:46px;right:46px;top:742px;font-size:13px;line-height:2.1;color:#456070;
    border-left:3px solid var(--rp-soft);padding-left:14px}

/* —— 照片位 —— */
.rp-photos{position:absolute;left:46px;right:46px;top:858px;display:flex;gap:12px}
.rp-photos2{position:absolute;left:46px;right:46px;top:726px;display:flex;gap:12px}
.rp-photo{flex:1;height:158px;border-radius:12px;border:1px dashed #C9DDE8;background:linear-gradient(160deg,#F2F9FC,#E4F1F7);
    display:flex;align-items:center;justify-content:center;text-align:center;font-size:10.5px;color:#7E9AA8;line-height:1.7;overflow:hidden}
.rp-photos2 .rp-photo{height:152px}
.rp-photo img{width:100%;height:100%;object-fit:cover}

/* —— 水印 —— */
.rp-wm{position:absolute;inset:0;pointer-events:none;display:flex;align-items:center;justify-content:center}
.rp-wm span{transform:rotate(-24deg);font-size:52px;letter-spacing:8px;color:rgba(11,111,156,.055);font-weight:700}

/* —— 分页标题 / 表格 —— */
.rp-sec-title{display:flex;align-items:baseline;gap:10px;margin-top:26px}
.rp-sec-title h2{font-size:18px;font-weight:700;letter-spacing:1px;color:var(--rp-deep);margin:0}
.rp-sec-title span{font-size:10.5px;color:#8299A6;letter-spacing:2px}
.rp-table{width:100%;border-collapse:collapse;margin-top:14px;font-variant-numeric:tabular-nums}
.rp-table thead th{font-size:10.5px;color:#8299A6;font-weight:400;text-align:right;padding:0 6px 9px;letter-spacing:.6px}
.rp-table thead th:first-child,.rp-table thead th:nth-child(2){text-align:left}
.rp-table tbody td{font-size:12.5px;padding:7px 6px;border-top:1px solid var(--rp-line);text-align:right;color:#152A35}
.rp-table tbody td:first-child{font-weight:600;text-align:left}
.rp-table tbody td:nth-child(2){text-align:left;color:#456070;font-size:12px}
.rp-best{font-weight:700;color:var(--rp-brand);font-size:15px}
.rp-prev{color:#8299A6;font-size:12px}
.rp-up{color:var(--rp-accent);font-weight:700;font-size:12px}
.rp-dash{color:#C2D4DE}

/* —— 进步条 —— */
.rp-prog{margin-top:22px}
.rp-prog-row{display:flex;align-items:center;gap:12px;margin-bottom:11px}
.rp-lb{flex:0 0 150px;font-size:12.5px;color:#152A35}
.rp-bar{flex:1;height:8px;background:#EDF4F8;border-radius:4px;overflow:hidden}
.rp-bar i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#2FB39A,#0B6F9C)}
.rp-vl{flex:0 0 74px;text-align:right;font-size:12.5px;font-weight:700;color:var(--rp-accent);font-variant-numeric:tabular-nums}
.rp-prog-note{margin-top:6px;font-size:12px;color:#456070;line-height:1.8}

/* —— 曲线 —— */
.rp-chart{margin-top:14px;border:1px solid var(--rp-line);border-radius:14px;padding:12px 14px 6px;background:#FCFEFF}
.rp-chart svg{display:block;width:100%;height:136px}

/* —— 赛场 —— */
.rp-comp{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}
.rp-comp > div{background:#F7FBFD;border:1px solid var(--rp-line);border-radius:12px;padding:10px;text-align:center}
.rp-comp b{display:block;font-size:18px;color:var(--rp-brand);font-variant-numeric:tabular-nums}
.rp-comp span{display:block;margin-top:5px;font-size:12px;color:#456070}
.rp-hl{margin-top:12px;font-size:12.5px;color:#456070;line-height:2}
.rp-hl b{color:#152A35;font-weight:600}

/* —— 热力图 / 月度 —— */
.rp-heat{margin-top:16px;display:flex;gap:14px}
.rp-grid{flex:1;display:grid;grid-auto-rows:9px;gap:3px}
.rp-cell{border-radius:2px;background:#EFF5F8}
.rp-cell.l1{background:#BFE0EE}
.rp-cell.l2{background:#4BA5C7}
.rp-cell.l3{background:#0B6F9C}
.rp-side{flex:0 0 118px;display:flex;flex-direction:column;justify-content:center;gap:6px}
.rp-side b{font-size:22px;color:var(--rp-brand);font-variant-numeric:tabular-nums}
.rp-side span{font-size:12px;color:#456070;line-height:1.5}
.rp-monthly{margin-top:18px;display:flex;align-items:flex-end;gap:9px;height:92px;border-bottom:1px solid var(--rp-line);padding-bottom:2px}
.rp-monthly i{flex:1;background:linear-gradient(180deg,#2FB39A,#0B6F9C);border-radius:3px 3px 0 0}
.rp-monthly i.is-zero{background:#E7EFF4}
.rp-mlabels{display:flex;gap:9px;margin-top:6px}
.rp-mlabels span{flex:1;text-align:center;font-size:9.5px;color:#8299A6}
.rp-mnote{margin-top:10px;font-size:12px;color:#456070;line-height:1.8}
.rp-mnote b{color:var(--rp-brand)}

/* —— 目标 / 寄语 / 尾页 —— */
.rp-goalbox{margin-top:18px;display:flex;gap:12px}
.rp-goalbox > div{flex:1;border:1px solid var(--rp-line);border-radius:12px;padding:13px 15px;background:#FBFDFE}
.rp-goalbox > div .rp-t{font-size:12px;color:#8299A6;letter-spacing:1.2px}
.rp-goalbox > div .rp-v{margin-top:6px;font-size:17px;font-weight:700;color:var(--rp-brand)}
.rp-note{margin-top:20px;border:1px dashed #C9DDE8;border-radius:14px;padding:16px 18px;min-height:78px;background:#FCFEFF}
.rp-note .rp-t{font-size:12px;color:#8299A6;letter-spacing:1.4px}
.rp-note .rp-c{margin-top:9px;font-size:13.5px;line-height:2;color:#152A35;outline:none}
.rp-note .rp-c.is-empty{color:#9AA3B2}
.rp-end{position:absolute;left:46px;right:46px;bottom:96px;display:flex;align-items:center;gap:20px;border-top:1px solid var(--rp-line);padding-top:18px}
.rp-qr{width:118px;height:118px;border:1px solid var(--rp-line);border-radius:10px;padding:4px;background:#fff;flex:0 0 auto;
    display:flex;align-items:center;justify-content:center;overflow:hidden}
.rp-qr img{width:100%;height:100%;object-fit:contain;display:block}
.rp-slogan b{display:block;font-size:17px;letter-spacing:3px;color:var(--rp-deep)}
.rp-slogan span{display:block;margin-top:6px;font-size:12px;color:#8299A6;letter-spacing:1px}

/* —— 空态 —— */
.rp-empty{margin-top:14px;font-size:12px;color:#8399A6;line-height:1.8;padding:14px 0}
.rp-empty-pad{padding:120px 60px 0;text-align:center;color:#456070}
.rp-empty-ico{color:var(--rp-brand);margin-bottom:14px}
.rp-empty-ico svg{width:44px;height:44px;stroke:var(--rp-brand);fill:none}
.rp-empty-pad h3{font-size:18px;color:var(--rp-deep);margin:0 0 10px}
.rp-empty-pad p{font-size:13px;line-height:1.9;color:#456070}
.rp-empty-no{margin-top:40px;font-size:10px;color:#9AA3B2;letter-spacing:1.6px}

/* —— 打印：只留报告，三页正好 A4 三张 —— */
@media print{
    @page{size:A4;margin:0}
    html,body{background:#fff!important}
    #page-container,.app-header,.tab-bar,.fab,.toast,.menu-mask,#sheet-mask{display:none!important}
    #sheet{position:static!important;transform:none!important;max-height:none!important;width:auto!important;max-width:none!important;
        box-shadow:none!important;border-radius:0!important;background:#fff!important}
    .sheet-bar,.sheet-head{display:none!important}
    .sheet-body{padding:0!important;overflow:visible!important}
    .rp-tools{display:none!important}
    .rp-wrap{display:block!important}
    .rp-stage{height:auto!important;background:#fff!important;overflow:visible!important;padding:0!important;border-radius:0}
    .rp-scaler{transform:none!important}
    .rp-page{margin:0!important;box-shadow:none!important;page-break-after:always;break-after:page}
    .rp-page:last-child{page-break-after:auto;break-after:auto}
}

/* ============================================================
   年度报告 · 第 3 页寄语就地编辑
   ============================================================ */
#rp-note-edit{cursor:pointer}
#rp-note-edit:focus-visible{outline:2px solid var(--primary-700);outline-offset:3px}
.rp-note-edit{display:flex;flex-direction:column;gap:8px}
.rp-ta{width:100%;box-sizing:border-box;border:1px solid #DCE9F0;border-radius:8px;padding:10px 12px;
    font-size:13px;line-height:1.6;font-family:inherit;color:#152A35;background:#fff;resize:vertical;min-height:74px}
.rp-ta:focus{outline:none;border-color:var(--primary-700)}
.rp-ta-bar{display:flex;align-items:center;gap:8px}
.rp-ta-n{margin-right:auto;font-size:12px;color:#8299A6}
/* 寄语编辑弹卡（挂在 #sheet 上，覆盖整个 sheet） */
.rp-modal{position:absolute;inset:0;z-index:12;display:flex;align-items:center;justify-content:center;
    padding:16px;background:rgba(9,32,45,.38);border-radius:inherit}
.rp-modal-card{width:100%;max-width:520px;background:#fff;border-radius:14px;padding:18px 18px 16px;
    box-shadow:0 18px 50px rgba(8,40,60,.28);display:flex;flex-direction:column;gap:9px}
.rp-modal-t{font-size:16px;font-weight:700;color:#152A35}
.rp-modal-sub{font-size:12px;color:#456070;line-height:1.5}.rp-modal .rp-ta{font-size:16px}
/* 品牌 LOGO 落位：封面白底圆角小方片 + 内页页眉小图 */
.rp-b-logo{height:40px;width:40px;object-fit:contain}
.rp-head-logo{height:18px;width:18px;object-fit:contain}
/* 工具条左侧（年份切换 + 说明） */
.rp-tools-l{display:flex;align-items:center;gap:9px;min-width:0;flex:1 1 auto}
@media (max-width:400px){.rp-tools-t{display:none}}
.rp-year{appearance:none;border:1px solid var(--rp-line,#DCE9F0);background:#fff;color:#084C6B;font-size:12px;
    font-weight:700;border-radius:8px;padding:4px 8px;line-height:1.2;font-family:inherit}
.rp-year:focus{outline:none;border-color:var(--rp-brand,#0B6F9C)}
/* ---- 封面无照片时的「三个数字」替代块（不留空占位） ---- */
.rp-cover-note{position:absolute;left:46px;right:46px;top:866px;border:1px solid var(--rp-line);
    border-radius:14px;background:linear-gradient(180deg,#F7FBFD,#FFF);padding:22px 26px}
.rp-cover-note .rp-cap{font-size:12px;letter-spacing:2px;color:#8299A6}
.rp-cover-note .rp-cn{display:flex;gap:34px;margin-top:12px}
.rp-cover-note .rp-cn b{font-size:34px;color:var(--rp-deep);font-weight:800;margin-right:5px}
.rp-cover-note .rp-cn span{font-size:12px;color:#456070}
.rp-cover-note .rp-cn-best{margin-top:14px;padding-top:12px;border-top:1px dashed var(--rp-line);
    font-size:12.5px;color:#456070}
.rp-cover-note .rp-cn-best b{color:var(--rp-brand)}
/* 第 3 页没有照片时，寄语框加高，避免页面下方空一大块 */
.rp-note.is-tall .rp-c{min-height:168px}
/* 照片网格改成能收放：有 1/2/3 张都排满一行 */
.rp-photos,.rp-photos2{display:grid;gap:12px}
.rp-photos{grid-auto-rows:auto}
.rp-photos2{grid-auto-rows:auto}

/* ---- 生成前的准备表单 ---- */
.rp-prep{display:block}
.rp-prep-card{margin-top:14px;display:flex;flex-direction:column;gap:14px}
.rp-prep-b{background:#fff;border:1px solid var(--line,#DCE9F0);border-radius:14px;padding:16px 18px;
    box-shadow:0 2px 10px rgba(8,76,107,.05)}
.rp-prep-b h3{margin:0 0 10px;font-size:15px;color:#084C6B;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.rp-prep-b h3 span{font-size:11.5px;font-weight:400;color:#8299A6}
.rp-prep .rp-ta{width:100%;min-height:86px;border:1px solid var(--line,#DCE9F0);border-radius:10px;
    padding:10px 12px;font-size:15px;line-height:1.7;color:#152A35;background:#FBFDFE;font-family:inherit;resize:vertical}
.rp-prep .rp-ta-bar{display:flex;justify-content:flex-end;margin-top:6px}
.rp-pgrid{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:96px;gap:10px}
.rp-slot{position:relative;border:1px dashed #CFE0EA;border-radius:12px;background:#F6FAFC;height:96px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;
    overflow:hidden;padding:0;font-family:inherit}
.rp-slot.has{border-style:solid;border-color:#DCE9F0;background:#fff}
.rp-slot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.rp-slot-i{font-size:20px;color:#0B6F9C;line-height:1}
.rp-slot-c{font-size:11px;color:#8299A6}
.rp-slot.is-busy{opacity:.5}
.rp-slot-del{position:absolute;right:6px;top:6px;width:22px;height:22px;border:0;border-radius:50%;
    background:rgba(6,36,52,.66);color:#fff;font-size:14px;line-height:1;cursor:pointer}
.rp-prep-tip{margin:10px 0 0;font-size:11.5px;color:#8299A6;line-height:1.6}
/* ---- 分享弹层：直接亮二维码，不再用海报图 ---- */
.share-qr-card{background:#fff;border:1px solid var(--line,#DCE9F0);border-radius:16px;padding:18px 18px 14px;
    display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:0 2px 12px rgba(8,76,107,.06)}
.share-qr-card img{width:210px;height:210px;object-fit:contain;display:block}
.share-qr-t{font-size:15px;font-weight:700;color:#084C6B}
.share-qr-u{font-size:12px;color:#8299A6;letter-spacing:.5px}
/* ============================================================
   「我的」页 v2 + 独立「设置」页（2026-11-30）
   结构：身份头 → 泳娃切换条 + 详情行 → 三组列表 → 退出
   规格：行高 52 / 图标 22 / 标题 16 / 右值 14 / 分割线左起 52
   ============================================================ */
.me-head{display:flex;align-items:center;gap:12px;padding:14px 16px 10px}
.me-id{flex:1;min-width:0}
.me-name{font-size:21px;font-weight:600;line-height:1.25;color:var(--ink-900,#1B2330);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.me-sub{margin-top:4px;font-size:12.5px;line-height:1.4;color:var(--ink-500,#626C7A)}
.me-link{flex:none;display:inline-flex;align-items:center;min-height:44px;padding:0 2px 0 10px;
    border:0;background:none;font:inherit;font-size:13px;color:var(--primary-700,#0072AD);cursor:pointer}
.me-link:active{opacity:.62}
/* 版本号前的 SVG 小图标：与右侧数值同一行，颜色跟 row-v 一致 */
.row-v-ver{display:inline-flex;align-items:center;gap:4px}
.row-v-ver svg{width:14px;height:14px;flex:none;opacity:.85}
.row-chev{width:7px;height:7px;margin-left:7px;border-top:1.5px solid var(--ink-300,#9AA3B2);
    border-right:1.5px solid var(--ink-300,#9AA3B2);transform:rotate(45deg);flex:none}

.list-group{margin:0 var(--space-2,8px) 14px}
.group-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:6px 6px 8px}
.group-head > span{font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--ink-500,#626C7A)}
.group-act{display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:0 6px;border:0;
    background:none;font:inherit;font-size:13px;color:var(--primary-700,#0072AD);cursor:pointer}
.group-act:active{opacity:.62}

/* 泳娃切换条 */
.kids-rail{display:flex;align-items:center;gap:6px;overflow-x:auto;overflow-y:hidden;
    padding:2px 2px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.kids-rail::-webkit-scrollbar{display:none}
.kid{flex:none;width:54px;display:flex;flex-direction:column;align-items:center;gap:5px;
    padding:0;border:0;background:none;font:inherit;cursor:pointer;min-height:64px}
.kid-av{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-size:14px;font-weight:600;
    background:var(--chip-quiet,#F1F4F8);color:var(--ink-700,#3A4454);box-shadow:0 0 0 0 rgba(0,114,173,0);
    transition:box-shadow .18s ease,background .18s ease,color .18s ease}
.kid-nm{font-size:12px;line-height:1.2;color:var(--ink-500,#626C7A);max-width:54px;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kid.is-on .kid-av{background:var(--primary-100,#E3F2FB);color:var(--primary-700,#0072AD);
    box-shadow:0 0 0 2px var(--primary-700,#0072AD)}
.kid.is-on .kid-nm{color:var(--primary-700,#0072AD);font-weight:600}
.kid-add .kid-av{background:none;border:1px dashed var(--input-border,#D2DEE8);color:var(--primary-700,#0072AD)}
.kid:active .kid-av{transform:scale(.94)}
.kid-av{transition:box-shadow .18s ease,background .18s ease,color .18s ease,transform .12s ease}

/* 当前娃详情行 */
.kid-detail{display:flex;align-items:center;gap:12px;min-height:56px;margin-top:4px;padding:10px 12px;
    border:1px solid var(--line,#E7EDF3);border-radius:var(--radius-md,12px);background:var(--surface,#FDFEFF);
    cursor:pointer}
.kid-detail:active{background:rgba(15,60,90,.045)}
.kd-av{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;
    font-size:14px;font-weight:600;background:var(--primary-100,#E3F2FB);color:var(--primary-700,#0072AD)}
.kd-main{flex:1;min-width:0}
.kd-name{display:flex;align-items:center;gap:6px;font-size:16px;font-weight:600;color:var(--ink-900,#1B2330);
    line-height:1.3}
.kd-name > span.badge{font-weight:500}
.kd-meta{margin-top:2px;font-size:12px;line-height:1.4;color:var(--ink-500,#626C7A);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kd-more{flex:none;min-width:44px;min-height:44px;margin:-10px -8px -10px 0;border:0;background:none;
    font:inherit;font-size:18px;color:var(--ink-500,#626C7A);cursor:pointer;border-radius:var(--radius-sm,8px)}
.kd-more:active{background:rgba(15,60,90,.06)}

/* 分组列表 */
.list-card{border:1px solid var(--line,#E7EDF3);border-radius:var(--radius-md,12px);background:var(--surface,#FDFEFF);
    overflow:hidden}
.row{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:0 14px 0 16px;
    border:0;background:none;font:inherit;text-align:left;cursor:pointer}
.row + .row::before{content:"";position:absolute;left:48px;right:0;top:0;height:1px;background:var(--line,#E7EDF3)}
.row:active{background:rgba(15,60,90,.045)}
.row-ic{flex:none;width:20px;height:20px;display:grid;place-items:center;color:#1686C7;opacity:1}
.row-ic svg{width:20px;height:20px}
.row-ic-empty{visibility:hidden}
.row-t{flex:1;min-width:0;font-size:15px;font-weight:500;color:var(--ink-900,#1B2330);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-v{flex:none;max-width:46%;font-size:13px;color:var(--ink-500,#626C7A);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row-danger .row-t,.row-danger .row-ic{color:var(--danger-text,#B42318)}
.row-danger .row-ic{opacity:.9}

.me-logout{display:block;width:calc(100% - var(--space-4,16px));margin:6px var(--space-2,8px) 24px;min-height:52px;
    border:1px solid var(--line,#E7EDF3);border-radius:var(--radius-md,12px);background:var(--surface,#FDFEFF);
    font:inherit;font-size:15px;font-weight:500;color:var(--danger-text,#B42318);cursor:pointer}
.me-logout:active{background:rgba(180,35,24,.06)}

/* 设置页（二级页，全宽，无底栏） */
.set-page{padding:0 0 24px}
.set-top{position:sticky;top:0;z-index:6;display:flex;align-items:center;gap:6px;min-height:52px;padding:0 8px;padding-top:env(safe-area-inset-top);
    background:var(--bg,#EAF1F7);border-bottom:1px solid var(--line,#E7EDF3)}
.set-back{display:inline-flex;align-items:center;gap:2px;min-height:44px;min-width:44px;padding:0 6px;
    border:0;background:none;font:inherit;font-size:15px;color:var(--primary-700,#0072AD);cursor:pointer}
.set-back .back-chev{width:8px;height:8px;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
    transform:rotate(45deg)}
.set-title{font-size:17px;font-weight:600;color:var(--ink-900,#1B2330)}
.set-body{padding-top:6px}
.set-hint{margin:2px 14px 10px;font-size:12px;line-height:1.6;color:var(--ink-500,#626C7A)}
.set-group{margin:0 var(--space-2,8px) 14px}
.set-group-t{padding:6px 6px 8px;font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--ink-500,#626C7A)}
.set-soon{font-size:12px;color:var(--ink-300,#9AA3B2)}

/* ===== 我的页顶部蓝色带（2026-11-30 追加） ===== */
.me-band{
    position:relative;overflow:hidden;margin:0 0 14px;padding:14px 14px 12px;
    border-radius:0 0 20px 20px;
    background:
        radial-gradient(140% 100% at 92% 4%, rgba(255,255,255,.15) 0%, rgba(255,255,255,0) 58%),
        radial-gradient(90% 80% at 4% 98%, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 62%),
        linear-gradient(152deg,#1A6D95 0%,#22789F 54%,#2A82A8 100%);
    box-shadow:0 6px 18px rgba(11,90,140,.10)}
.me-band::before,.me-band::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.03);pointer-events:none}
.me-band::before{width:168px;height:168px;right:-48px;top:-88px}
.me-band::after{width:118px;height:118px;left:-54px;bottom:-58px;background:rgba(255,255,255,.02)}
.me-band .me-head{padding:2px 2px 8px;position:relative;z-index:1}
.me-band .me-name{color:#fff;font-weight:700}
.me-band .me-sub{color:rgba(255,255,255,.86)}
.me-band .me-link{color:#fff}
.me-band .me-link .row-chev{border-top-color:rgba(255,255,255,.86);border-right-color:rgba(255,255,255,.86)}
.me-band .list-group{margin:0;position:relative;z-index:1}
.me-band .group-head > span{color:rgba(255,255,255,.90)}
.me-band .group-act{color:#fff}
.me-band .group-act svg{color:#fff}
.me-band .kid-nm{color:rgba(255,255,255,.94)}
.me-band .kid.is-on .kid-nm{color:#fff}
.me-band .kid.is-on .kid-av{box-shadow:0 0 0 2px rgba(255,255,255,.92)}
.me-band .kid-add .kid-av{border-color:rgba(255,255,255,.44);color:#fff;background:rgba(255,255,255,.08)}

/* 我的泳娃：玻璃拟态——蓝色只做背景，泳娃信息才是主体：统一 17% 白玻璃 + 24% 描边，不加双层渐变避免糊成亮块 */
.me-band .me-kids{background:none;border-radius:0;padding:0;margin:10px 0 2px;box-shadow:none}
.me-band .me-kids .group-head{align-items:center;padding:12px 2px 8px;margin-top:10px;
    border-top:1px solid rgba(255,255,255,.10)}
.me-band .me-kids .group-head > span{color:rgba(255,255,255,.80);font-size:13px;font-weight:600;letter-spacing:.4px}
.me-band .me-kids .group-act{min-height:30px;padding:0 12px;border-radius:999px;
    background:rgba(255,255,255,.17);border:1px solid rgba(255,255,255,.24);
    color:#fff;font-size:12.5px;font-weight:600;
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.me-band .me-kids .group-act svg{width:14px;height:14px;color:#fff}
.me-band .me-kids .group-act:active{background:rgba(255,255,255,.26)}
.me-band .me-kids .kids-rail{padding:0 0 8px;gap:4px}
.me-band .me-kids .kid{width:56px}
.me-band .me-kids .kid-av{width:44px;height:44px;font-size:15px;
    background:rgba(255,255,255,.17);border:1px solid rgba(255,255,255,.24);
    color:#fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.me-band .me-kids .kid-nm{color:rgba(255,255,255,.78)}
.me-band .me-kids .kid.is-on .kid-av{background:rgba(255,255,255,.94);color:var(--primary-700,#0072AD);
    border-color:rgba(255,255,255,.95);box-shadow:0 0 0 2px rgba(255,255,255,.4)}
.me-band .me-kids .kid.is-on .kid-nm{color:#fff}
.me-band .me-kids .kid-add .kid-av{border:1px dashed rgba(255,255,255,.44);background:rgba(255,255,255,.12);color:#fff}
.me-band .me-kids .kid-detail{background:rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.20);border-radius:14px;margin:8px 0 2px;padding:10px 12px;
    box-shadow:0 8px 18px rgba(6,51,82,.09);overflow:hidden;
    -webkit-backdrop-filter:blur(10px) saturate(150%);backdrop-filter:blur(10px) saturate(150%)}
.me-band .me-kids .kid-detail::before{display:none}
.me-band .me-kids .kid-detail:active{background:rgba(255,255,255,.24)}
.me-band .me-kids .kd-av{background:rgba(255,255,255,.90);color:var(--primary-700,#0072AD)}
.me-band .me-kids .kd-name{color:#fff}
.me-band .me-kids .kd-name .badge{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.26);color:#fff}
/* 深蓝个人卡上的等级徽章：未定级沿用半透明白；已定级换成等级色实心块，字色加深保证对比 */
.me-band .me-kids .kd-name .badge-lv.lv0{background:rgba(255,255,255,.22);color:#fff}
.me-band .me-kids .kd-name .badge-lv.lv1{background:#E7EDF3;color:#49596B}
.me-band .me-kids .kd-name .badge-lv.lv2{background:#D9F2ED;color:#0B6E60}
.me-band .me-kids .kd-name .badge-lv.lv3{background:#DCEDFB;color:#0B5F93}
.me-band .me-kids .kd-name .badge-lv.lv4{background:#EAE2FD;color:#5B32A4}
.me-band .me-kids .kd-name .badge-lv.lv5{background:#FDEECB;color:#8A5C08}
.me-band .me-kids .kd-meta{color:rgba(255,255,255,.84)}
.me-band .me-kids .kd-more{color:rgba(255,255,255,.82)}
.me-band .me-kids .kd-more:active{background:rgba(255,255,255,.18)}

/* ===== 2026-11-30 登录页改版：手机号+密码为主、协议行内勾选 ===== */
.login-wx-tip {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #EEF7FF;
    border: 1px solid #DCEBFB;
    color: #3F6D99;
    font-size: 13px;
    line-height: 1.5;
}
.login-agree {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 10px 2px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: #5B6B7A;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* 真 checkbox 藏在行内，整行 label 都是它的点击区 */
.login-agree-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.login-agree.warn { background: #FFF3F3; }
.login-agree a { color: var(--primary-600); text-decoration: none; }
.login-agree a:hover { text-decoration: underline; }
.login-agree-box {
    flex: none;
    width: 20px; height: 20px;
    margin-top: 0;
    border: 1px solid #C3D3E4;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    color: #fff;
}
.login-agree-box.on { background: var(--primary-600); border-color: var(--primary-600); }



/* ===== 成绩进步分析看板（替代旧「赛事成绩对比看板」） ===== */
.trend-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 16px 14px 8px;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(15, 132, 190, 0.10), rgba(15, 132, 190, 0) 58%),
        var(--surface);
}
.trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.trend-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: .2px;
    white-space: nowrap;
}
.trend-ic { display: inline-flex; }
.trend-pills { display: inline-flex; gap: 7px; margin-left: auto; }
.trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(15, 132, 190, 0.10);
    border-radius: 999px;
    background: #EEF4F9;
    color: var(--ink-800);
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.trend-pill:hover { background: #E6EFF7; }
.trend-pill:disabled { opacity: .55; cursor: default; }
.trend-pill:disabled:hover { background: #EEF4F9; }
.trend-pill:active { transform: scale(.97); }
.trend-pill:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
.trend-chev { color: #6C8194; flex: none; }

.trend-sum {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 2px 6px;
}
.trend-sum-item { min-width: 0; }
.trend-sum-item.is-right { text-align: right; }
.trend-k {
    font-size: 11.5px;
    color: var(--ink-400);
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.trend-best {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-top: 3px;
    color: var(--primary-700);
    line-height: 1.1;
}
.trend-best b {
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -0.6px;
    font-variant-numeric: tabular-nums;
}
.trend-best b.is-long { font-size: 26px; letter-spacing: -0.4px; }
.trend-unit { font-size: 12.5px; font-weight: 600; color: var(--primary-600); margin-right: 2px; }
.trend-delta {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    margin-top: 2px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.trend-delta b { font-size: 24px; font-weight: 800; }
.trend-delta.is-up { color: var(--success-solid); }
.trend-delta.is-down { color: #C2410C; }
.trend-delta-none {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-400);
}
.pb-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    margin-left: 5px;
    padding: 0 7px;
    border-radius: 6px;
    background: linear-gradient(180deg, #FFF8E6, #FFEFC9);
    border: 1px solid rgba(185, 133, 42, .28);
    color: #8A5A00;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .3px;
    align-self: center;
    transform: translateY(-2px);
}

.trend-chart { min-height: 150px; }
.trend-svg { display: block; margin: 2px 0 0; }
.trend-line { animation: trendFade .55s ease both; }
@keyframes trendFade { from { opacity: 0; } to { opacity: 1; } }
.trend-notes {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 2px 0;
    font-size: 10.5px;
    line-height: 1.5;
    color: var(--ink-300);
}
.trend-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    padding: 4px 2px 2px;
}
.trend-more {
    border: 0;
    background: none;
    padding: 2px 0;
    font-family: inherit;
    font-size: 11.5px;
    color: var(--primary-600);
    font-weight: 600;
    cursor: pointer;
}
.trend-foot-acts { display: inline-flex; gap: 12px; }
.trend-act {
    border: 0;
    background: none;
    padding: 2px 0;
    font-family: inherit;
    font-size: 11.5px;
    color: var(--ink-400);
    cursor: pointer;
}
.trend-act:hover { color: var(--primary-600); }
.trend-act:focus-visible, .trend-more:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; border-radius: 4px; }

/* 筛选弹层选项 */
.trend-opt-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.trend-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.trend-opt.is-on { border-color: var(--primary-500); background: #EFF8FD; }
.trend-opt-label { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.trend-opt-sub { font-size: 11.5px; color: var(--ink-400); margin-left: auto; }
.trend-opt-check { color: var(--primary-600); display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
    .trend-line { animation: none; }
    .trend-pill:active { transform: none; }
}
@media (max-width: 360px) {
    .trend-best b { font-size: 28px; }
    .trend-delta { font-size: 21px; }
    .trend-pill { height: 28px; padding: 0 10px; font-size: 12px; }
    .trend-pills { gap: 5px; }
}


/* ===== 标准分段胶囊 Tab（赛事/训练/记录可复用） ===== */
.comp-seg-wrap {
    padding: 10px 16px 8px;
    background: var(--bg);
}
.seg-tabs {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(7, 49, 60, .05);
    -webkit-tap-highlight-color: transparent;
}
.seg-tabs-track {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
}
.seg-tabs-thumb {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    border-radius: var(--radius-full);
    background: var(--primary-700);
    box-shadow: 0 4px 10px rgba(0, 114, 173, .22);
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), width .26s cubic-bezier(.2, .8, .2, 1);
    will-change: transform, width;
    pointer-events: none;
}
.seg-tabs:not(.is-ready) .seg-tabs-thumb { transition: none; }
.seg-tabs-btn {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--radius-full);
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: color .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.seg-tabs-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--primary-600);
}
.seg-tabs-ic svg { width: 15px; height: 15px; }
.seg-tabs-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.seg-tabs-btn.is-on {
    color: #fff;
    font-weight: 700;
}
.seg-tabs-btn.is-on .seg-tabs-ic { color: #fff; }
.seg-tabs-btn:active { transform: scale(.98); }
.seg-tabs-btn:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}
.seg-tabs.is-dragging .seg-tabs-btn { transition: color .14s ease; }
.seg-tabs.is-dragging .seg-tabs-btn:active { transform: none; }
.seg-tabs.is-dragging .seg-tabs-thumb {
    transition: none;
    box-shadow: 0 6px 16px rgba(0, 114, 173, .30);
}
.seg-swipe-viewport {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}
.seg-swipe-viewport.is-dragging { user-select: none; -webkit-user-select: none; }
.seg-swipe-track {
    position: relative;
    width: 100%;
    will-change: transform;
}
.seg-swipe-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-width: 0;
}
.seg-swipe-pane[hidden] { display: none; }
.comp-view[hidden] { display: none; }

/* ===== 记录页：测速 / 比赛 / 打卡三 Tab ===== */
.rec-tabs-wrap {
    padding: 10px 16px 2px;
    background: var(--bg);
}
.rec-tabs-wrap .seg-tabs { max-width: 420px; }
.rec-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
}
.rec-panel[hidden] { display: none; }
.rec-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 0 16px;
}
.rec-stat {
    min-width: 0;
    padding: 12px 12px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(7, 49, 60, .04);
    text-align: left;
}
.rec-stat-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    margin-bottom: 9px;
}
.rec-stat-ic {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #EAF6FD;
    color: var(--primary-700);
}
.rec-stat-ic svg { width: 14px; height: 14px; }
.rec-stat-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-micro);
    color: var(--ink-500);
}
.rec-stat-value {
    display: block;
    text-align: right;
    font-size: 23px;
    line-height: 1.05;
    color: var(--ink-900);
    font-weight: 800;
    letter-spacing: -.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.rec-stat-unit {
    margin-left: 3px;
    font-size: var(--text-micro);
    font-weight: 600;
    color: var(--ink-500);
    letter-spacing: 0;
}
.rec-section {
    margin: 0 16px;
    padding: 14px 14px 16px;
    border-radius: 18px;
}
.rec-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.rec-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-900);
}
.rec-section-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--primary-700);
}
.rec-section-ic svg { width: 17px; height: 17px; }
.rec-action-link {
    flex: 0 0 auto;
    border: 0;
    background: none;
    padding: 4px 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-700);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.rec-action-link:active { opacity: .7; }
.rec-more-btn {
    width: 100%;
    margin-top: 10px;
    padding: 11px 10px;
    border: 0;
    border-radius: 12px;
    background: #F2F8FC;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-700);
    cursor: pointer;
}
.rec-more-btn[hidden] { display: none; }
.rec-more-btn:active { opacity: .75; }

/* v284 打卡页：圆点日历 + 独立训练记录流 */
.rec-cal-card {
    padding: 14px 12px 10px;
}
.rec-cal-card #checkin-calendar { width: 100%; }
.rec-checkin-feed-card {
    padding-bottom: 6px;
}
.cal-head {
    margin-bottom: 4px;
}
.cal-nav {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F0F8FD;
    color: var(--primary-700);
    font: inherit;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cal-nav:active { background: #E1F2FB; }
.cal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: .2px;
}
.cal-grid {
    gap: 4px 2px;
}
.cal-dow {
    padding: 6px 0 8px;
    font-size: var(--text-micro);
    font-weight: 500;
    color: var(--ink-450);
}
.cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #4E6577;
    font-size: 13px;
}
.cal-empty {
    background: transparent;
    box-shadow: none;
}
.cal-num {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.cal-cell.has {
    background: transparent;
    color: #086C99;
    font-weight: 600;
}
.cal-cell.has .cal-num { background: #C7E9FB; box-shadow: inset 0 0 0 1px #A9DCF6; }
.cal-cell.today {
    outline: none;
}
.cal-cell.today .cal-num {
    background: var(--primary-700);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(8, 119, 165, .22);
}
.cal-cell.can-makeup:active {
    transform: none;
    background: transparent;
}
.cal-cell.can-makeup:active .cal-num { background: #EFF8FD; }
.cal-cell.is-future {
    background: transparent;
    box-shadow: none;
    opacity: .36;
}
.cal-cell.is-fresh .cal-num {
    animation: cellPop 260ms var(--ease-spring) both;
}
.cal-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 8px 0 2px;
    font-size: var(--text-micro);
    color: #5F7887;
}
.cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cal-lg {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}
.cal-lg-has { background: #C7E9FB; box-shadow: inset 0 0 0 1px #A9DCF6; }
.cal-lg-todo { background: transparent; border: 1.5px solid #D3E0EA; }
.cal-lg-today { background: var(--primary-700); }

.ck-feed { display: flex; flex-direction: column; }
.ck-day {
    padding: 7px 0 8px;
    border-bottom: 1px solid #EDF4F8;
    border-radius: 10px;
    transition: background-color .2s var(--ease-out);
}
.ck-day:first-child { padding-top: 0; }
.ck-day:last-child { border-bottom: 0; padding-bottom: 0; }
.ck-day.is-focus { background: #EAF7FF; }
.ck-day-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 2px;
}
.ck-day-label b {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-900);
}
.ck-day-label span {
    font-size: var(--text-micro);
    color: var(--ink-450);
}
.ck-day-label em {
    margin-left: auto;
    font-style: normal;
    font-size: var(--text-micro);
    color: var(--ink-450);
}
.ck-rec-list { display: flex; flex-direction: column; position: relative; }
/* 同一天多次打卡：用竖向时间线串起来，避免每行重复标题和“已完成” */
.ck-rec-list.is-multi::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: #D8EAF3;
    z-index: 0;
}
.ck-rec {
    display: grid;
    grid-template-columns: 14px 40px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
    position: relative;
}
.ck-rec-list.is-multi .ck-rec + .ck-rec { padding-top: 8px; }
.ck-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E8F7F0;
    color: #15825F;
    box-shadow: 0 0 0 3px #fff;
}
.ck-dot svg { width: 10px; height: 10px; }
.ck-time {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: #2A5366;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    white-space: nowrap;
}
.ck-rec-main { min-width: 0; display: flex; align-items: center; }
.ck-rec-kind {
    font-size: 12px;
    line-height: 1.3;
    color: #5F7887;
}
.ck-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ck-tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 6px;
    border-radius: 7px;
    background: #EFF8FD;
    color: #3F758A;
    font-size: var(--text-micro);
    line-height: 1.45;
}
.ck-rec .item-more {
    width: 24px;
    height: 24px;
    padding: 0;
    color: var(--ink-450);
}
.ck-empty {
    padding: 14px 0 8px;
    text-align: center;
}
.ck-empty-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #EAF6FD;
    color: var(--primary-700);
    margin-bottom: 6px;
}
.ck-empty-ic svg { width: 22px; height: 22px; }
.ck-empty b {
    display: block;
    font-size: 14px;
    color: var(--ink-900);
}
.ck-empty p {
    margin: 4px auto 10px;
    max-width: 240px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-450);
}
.ck-empty .btn-sm { width: auto; padding: 7px 14px; font-size: 12px; }
.ck-more { margin-top: 8px; }

.rec-section .rec-fchip {
    padding: 0 9px;
    font-size: 12px;
}
.rec-section .rec-filter-row { gap: 6px; }

.rec-comp-list { display: flex; flex-direction: column; gap: 10px; }
.rec-comp-card {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #FBFDFF;
    -webkit-tap-highlight-color: transparent;
}
.rec-comp-top { display: flex; align-items: flex-start; gap: 10px; }
.rec-comp-more {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: -4px -4px 0 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #68869A;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.rec-comp-more:active { background: #EAF4FA; }
.rec-comp-date {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 50px;
    border-radius: 11px;
    background: linear-gradient(160deg, var(--primary-700), #149AD1);
    color: #fff;
    line-height: 1.05;
    box-shadow: 0 4px 10px rgba(0, 114, 173, .18);
}
.rec-comp-date span { font-size: var(--text-micro); opacity: .85; }
.rec-comp-date b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-comp-main { flex: 1 1 auto; min-width: 0; }
.rec-comp-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--ink-900);
    word-break: break-word;
}
.rec-comp-meta {
    margin-top: 3px;
    font-size: var(--text-micro);
    line-height: 1.45;
    color: var(--ink-500);
    word-break: break-word;
}
.rec-comp-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 9px 0 8px;
}
.rec-comp-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 7px;
    background: #F0F6FA;
    font-size: 10px;
    color: var(--ink-600);
}
.rec-comp-badge b { font-size: var(--text-micro); color: var(--ink-900); }
.rec-comp-badge svg { width: 12px; height: 12px; }
.rec-comp-badge-pb {
    border: 1px solid #EFCF8E;
    background: linear-gradient(180deg, #FFF4D8, #FBE8BC);
    color: #8A5A00;
    font-weight: 700;
}
.rec-comp-badge-pb b { color: #8A5A00; }
.rec-comp-results {
    padding-top: 2px;
    border-top: 1px dashed #E4EFF5;
}
.rec-comp-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px 42px 24px 22px;
    align-items: center;
    column-gap: 4px;
    padding: 6px 0;
    border-bottom: 1px solid #EDF5F9;
    font-size: 12px;
}
.rec-comp-result:last-child { border-bottom: 0; }
.rec-comp-result-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink-700);
}
.rec-comp-time {
    justify-self: end;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-900);
    white-space: nowrap;
}
.rec-comp-rank {
    justify-self: center;
    padding: 1px 5px;
    border-radius: 5px;
    background: #F1F7FA;
    color: #5F7887;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}
.rec-comp-rank.is-empty { padding: 0; background: transparent; }
.rec-comp-pb {
    justify-self: end;
    white-space: nowrap;
}
.rec-comp-pb .pb-tag {
    padding: 1px 5px;
    font-size: 9.5px;
}
.rec-comp-pb.is-empty { padding: 0; background: transparent; }
.rec-comp-row-more {
    justify-self: end;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #68869A;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}
.rec-comp-row-more:active { background: #EAF4FA; }

/* 各泳姿成绩对比（成绩趋势页第二张卡） */
.stroke-cmp-card { padding: 15px 14px 16px; }
.sc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}
.sc-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--ink-900);
}
.sc-ic { display: inline-flex; color: var(--primary-600); }
.sc-ic svg { width: 19px; height: 19px; }
.sc-sub { flex: 0 0 auto; font-size: 10.5px; color: var(--ink-500); white-space: nowrap; }
.sc-list { display: flex; flex-direction: column; gap: 14px; }
.sc-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: baseline;
    column-gap: 9px;
}
.sc-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-900);
}
.sc-dist {
    margin-left: 5px;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--ink-500);
}
.sc-times {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.sc-from { color: var(--ink-500); }
.sc-arrow { color: var(--ink-300); font-size: var(--text-micro); }
.sc-to { color: var(--primary-700); font-weight: 800; }
.sc-delta {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}
.sc-delta b { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-delta.is-fast { color: var(--success-solid); }
.sc-delta.is-slow { color: #C2410C; }
.sc-delta.is-flat { color: var(--ink-500); font-size: var(--text-micro); font-weight: 500; }
.sc-unit { margin-left: 1px; font-size: 10px; font-weight: 500; }
.sc-track {
    height: 6px;
    margin-top: 7px;
    border-radius: 99px;
    background: #EDF3F7;
    overflow: hidden;
}
.sc-track i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #9BD8F2 0%, #4CADD9 52%, #0F84BE 100%);
    transition: width .35s ease;
}


/* 年份筛选 */
.tl-toolbar { padding: 14px 16px 2px; }
.tl-years { display: flex; gap: 9px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.tl-years::-webkit-scrollbar { display: none; }
.tl-year {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 16px;
    border: 1px solid #DFE8EF;
    border-radius: 999px;
    background: var(--surface);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tl-year.is-on {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 132, 190, .22);
}
.tl-year:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }

/* 时间线 */
.tl-wrap { padding: 0 14px 4px; }
.tl-section { margin-top: 14px; }
.tl-year-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--ink-900);
}
.tl-items { position: relative; }
.tl-items::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #CFE3F1;
}
.tl-item {
    display: grid;
    grid-template-columns: 40px 20px minmax(0, 1fr);
    align-items: start;
    gap: 0;
    padding: 0;
    margin-bottom: 18px;
}
.tl-item::before { content: none; }
.tl-date {
    padding-top: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #5E7C91;
    white-space: nowrap;
}
.tl-date b { display: block; font-weight: 600; color: #3F6178; }
.tl-date span { display: block; font-weight: 500; }
.tl-rail { position: relative; height: 100%; }
.tl-dot {
    position: absolute;
    top: 17px;
    left: 50%;
    width: 10px;
    height: 10px;
    border: 2px solid var(--primary-600);
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%);
    box-shadow: 0 0 0 3px #EAF4FB;
    z-index: 1;
}

/* 赛事卡 */
.tl-card {
    min-width: 0;
    padding: 13px 13px 9px;
    border: 1px solid #E6EEF5;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgba(21, 72, 105, .055);
}
.tl-card-head { display: flex; align-items: flex-start; gap: 8px; }
.tl-card-name {
    flex: 1;
    min-width: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    text-wrap: balance;
    color: var(--ink-900);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.tl-count {
    flex: none;
    margin-top: 1px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #EAF4FB;
    color: #2C6C93;
    font-size: var(--text-micro);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.tl-card-go {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: none;
    color: #93A5B4;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tl-card-go svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.tl-card-go:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 1px; border-radius: 50%; }
.tl-loc {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-size: 11.5px;
    color: #7E90A0;
    min-width: 0;
}
.tl-loc svg { width: 13px; height: 13px; flex: none; color: #8AA0B2; }
.tl-loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-loc .tl-pool-loc { flex: none; margin-left: 2px; }

.tl-table {
    margin-top: 9px;
    border: 1px solid #EDF2F7;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.tl-thead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px 28px 30px;
    align-items: center;
    padding: 0 10px;
}
.tl-thead {
    height: 30px;
    background: #F2F6FA;
    font-size: 11.5px;
    color: #8295A6;
    font-weight: 500;
}
.tl-row {
    position: relative;
    min-height: 36px;
    border-top: 1px solid #EFF3F7;
    font-size: 13px;
    cursor: pointer;
    overflow: hidden;
}
.tl-slide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px 28px 30px;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
}
.tl-row:first-of-type { border-top: 0; }
.tl-row:hover .tl-slide { background: #F8FBFD; }
.tl-row:focus-visible { outline: 2px solid var(--primary-600); outline-offset: -2px; }
.tl-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-project { padding-right: 6px; font-weight: 600; color: var(--ink-900); }
.tl-pool {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    border: 1px solid #DDEAF4;
    border-radius: 4px;
    background: #F4FAFD;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
    color: #5E87A0;
    vertical-align: 1px;
}
.tl-time { font-weight: 600; color: #23566F; font-variant-numeric: tabular-nums; }
.tl-rank { text-align: center; color: var(--ink-600); font-variant-numeric: tabular-nums; }
.tl-pb { text-align: center; }
.tl-time.is-muted, .tl-rank.is-muted { color: #9AA8B5; font-weight: 500; }
.pb-tag {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #EFCF8E;
    border-radius: 5px;
    background: linear-gradient(180deg, #FFF4D8, #FBE8BC);
    color: #8A5A00;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .2px;
}
/* 接力项目标识：实心浅蓝底，和「短池」这类描边小字区分开 */
.relay-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    border: 1px solid #C6DEF1;
    border-radius: 4px;
    background: #E3F0FA;
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .2px;
    color: #2C6E96;
    vertical-align: 1px;
    white-space: nowrap;
}
.tl-table-sheet { margin-top: 10px; }
.tl-table-sheet .tl-row { cursor: default; }

@media (max-width: 360px) {
    .tl-wrap { padding: 0 12px 4px; }
    .tl-item { grid-template-columns: 36px 16px minmax(0, 1fr); }
    .tl-items::before { left: 44px; }
    .tl-card { padding: 12px 11px 8px; }
    .tl-thead { grid-template-columns: minmax(0, 1fr) 54px 26px 28px; padding: 0 8px; }
    .tl-slide { grid-template-columns: minmax(0, 1fr) 54px 26px 28px; padding: 0 8px; }
    .tl-card-name { font-size: 15px; }
}

/* 生涯时间线抽屉：比赛页时间线复用了 .tl- 前缀，必须把抽屉侧样式重新隔离回来 */
#sheet-body .tl-item {
    display: flex;
    gap: 8px;
    padding: 6px 0 6px 24px;
    margin-bottom: 0;
    min-width: 0;
}
#sheet-body .tl-item::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line);
}
#sheet-body .tl-item:first-of-type::before { top: 12px; }
#sheet-body .tl-item:last-child::before { bottom: calc(100% - 12px); }
#sheet-body .tl-dot {
    position: absolute;
    left: 2px;
    top: 13px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--ink-300);
    border-radius: 50%;
    background: var(--surface);
    transform: none;
    box-shadow: none;
    z-index: auto;
}
#sheet-body .tl-item--start .tl-dot { border-color: var(--ink-500); }
#sheet-body .tl-item--comp .tl-dot { border-color: var(--primary-600); background: var(--primary-100); }
#sheet-body .tl-item--level .tl-dot { border-color: #8A5A00; background: var(--pb-100); }
#sheet-body .tl-body { flex: 1 1 auto; min-width: 0; }
#sheet-body .tl-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#sheet-body .tl-date {
    flex: 0 0 auto;
    padding-top: 0;
    font-size: var(--text-micro);
    line-height: 1.4;
    color: var(--ink-500);
    white-space: normal;
    font-variant-numeric: tabular-nums;
}
#sheet-body .tl-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--text-caption);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#sheet-body .tl-time {
    flex: 0 0 auto;
    font-size: var(--text-caption);
    font-weight: 700;
    color: var(--primary-700);
    font-variant-numeric: tabular-nums;
}
#sheet-body .tl-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
    font-size: var(--text-micro);
    color: var(--ink-500);
}


/* ===== 等级达标评估（grade.js）v2：结论横幅 + 白卡子块 + 彩色等级 pill ===== */
#sheet-body .gr-loading,
#sheet-body .gr-empty {
    padding: 34px 8px;
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-500, #6B7A89);
}

/* --- 总览卡 --- */
#sheet-body .gr-sum {
    padding: 16px 16px 13px;
    border: 1px solid #E2EDF9;
    border-radius: 18px;
    background:
        radial-gradient(120% 100% at 100% 0%, #E8F3FF 0%, rgba(232, 243, 255, 0) 62%),
        #FBFDFF;
    box-shadow: 0 1px 2px rgba(16, 58, 96, .04);
}
#sheet-body .gs-k {
    font-size: var(--text-micro);
    font-weight: 600;
    letter-spacing: .3px;
    color: #7C8B9B;
}
#sheet-body .gs-lv {
    margin-top: 5px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.3;
    color: #0F3A5C;
}
#sheet-body .gs-lv .gr-lv {
    padding: 1px 8px;
    border-radius: 7px;
    font-size: 17px;
    vertical-align: 2px;
}
#sheet-body .gs-none { font-size: 18px; font-weight: 700; color: #93A1AE; }
#sheet-body .gs-soft { font-size: 16px; font-weight: 700; color: #6F7E8D; }
#sheet-body .gs-meta { margin-top: 7px; font-size: 12px; color: #4E6070; }
#sheet-body .gs-close {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 4px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px dashed #E3ECF5;
    font-size: 12px;
    line-height: 1.5;
    color: #4E6070;
}
#sheet-body .gs-close-k { color: #93A1AE; }
#sheet-body .gs-close .gs-close-note { font-size: var(--text-micro); color: #93A1AE; }
#sheet-body .gs-close b { color: #16293B; font-variant-numeric: tabular-nums; }
#sheet-body .gr-src { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: #93A1AE; }
#sheet-body .gr-note {
    margin-top: 14px;
    font-size: var(--text-micro);
    line-height: 1.7;
    color: #93A1AE;
}

/* --- 分区标题 --- */
#sheet-body .gr-sec-title {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 700;
    color: #7C8B9B;
}

/* --- 项目卡 --- */
#sheet-body .gr-list { display: flex; flex-direction: column; gap: 12px; }
#sheet-body .gr-row {
    border: 1px solid #E4EDF7;
    border-radius: 18px;
    background:
        radial-gradient(78% 58% at 6% -8%, #DCEEFF 0, rgba(220, 238, 255, 0) 72%),
        linear-gradient(180deg, #F1F8FF 0, #FFFFFF 104px),
        #fff;
    box-shadow: 0 2px 10px rgba(16, 58, 96, .05);
    overflow: hidden;
}
#sheet-body .gr-row.focus { border-color: #BFDCF3; }
#sheet-body .gr-line {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 14px 5px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #12314E;
}
#sheet-body .gr-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#sheet-body .gr-name em {
    margin-left: 6px;
    font-style: normal;
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 0;
    color: #7C8B9B;
}
#sheet-body .gr-name .gr-focus {
    display: inline-block;
    margin-right: 5px;
    padding: 1px 5px;
    border-radius: 6px;
    background: var(--primary-100, #E3F0FA);
    color: var(--primary-700, #2C6E96);
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    vertical-align: 2px;
}
#sheet-body .gr-pb {
    flex: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.4px;
    font-variant-numeric: tabular-nums;
    color: #0B6FB8;
}
#sheet-body .gr-chev {
    flex: none;
    width: 7px;
    height: 7px;
    margin-left: 1px;
    border-right: 1.7px solid #A9B8C6;
    border-bottom: 1.7px solid #A9B8C6;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}
#sheet-body .gr-row.open .gr-chev { transform: rotate(225deg) translateY(-2px); }

/* --- 结论横幅 --- */
#sheet-body .gr-banner {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 9px;
    row-gap: 2px;
    align-items: center;
    width: calc(100% - 28px);
    margin: 6px 14px 13px;
    padding: 10px 11px;
    border: 1px solid #E6EDF4;
    border-radius: 13px;
    background: #F6F9FC;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
#sheet-body .gr-bicon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .75);
    color: #7C8B9B;
}
#sheet-body .gr-bicon svg { width: 16px; height: 16px; }
#sheet-body .gr-btitle {
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.4;
    color: #3E5162;
}
#sheet-body .gr-bsub {
    font-size: 11.5px;
    line-height: 1.45;
    color: #6B7A89;
}
#sheet-body .gr-banner .gr-lv { background: rgba(255, 255, 255, .8); }

#sheet-body .gr-banner.gold {
    border-color: #F1DCA8;
    background: linear-gradient(100deg, #FFF9EA, #FFF0CE);
}
#sheet-body .gr-banner.gold .gr-bicon { background: #FFF3D9; color: #C68A16; }
#sheet-body .gr-banner.gold .gr-btitle { color: #8A5A00; }
#sheet-body .gr-banner.gold .gr-bsub { color: #96703A; }

#sheet-body .gr-banner.ok {
    border-color: #C7E7D3;
    background: linear-gradient(100deg, #F1FBF4, #E5F6EC);
}
#sheet-body .gr-banner.ok .gr-bicon { background: #DFF3E6; color: #1B7A46; }
#sheet-body .gr-banner.ok .gr-btitle { color: #14663A; }
#sheet-body .gr-banner.ok .gr-bsub { color: #4E7A60; }

#sheet-body .gr-banner.lv0,
#sheet-body .gr-banner.lv1,
#sheet-body .gr-banner.lv2,
#sheet-body .gr-banner.lv3,
#sheet-body .gr-banner.lv4,
#sheet-body .gr-banner.lv5 {
    border-color: var(--lv-bd);
    background: var(--lv-bg);
}
#sheet-body .gr-banner.lv0 .gr-btitle,
#sheet-body .gr-banner.lv1 .gr-btitle,
#sheet-body .gr-banner.lv2 .gr-btitle,
#sheet-body .gr-banner.lv3 .gr-btitle,
#sheet-body .gr-banner.lv4 .gr-btitle,
#sheet-body .gr-banner.lv5 .gr-btitle { color: var(--lv-fg); }
#sheet-body .gr-banner.lv0 .gr-bicon,
#sheet-body .gr-banner.lv1 .gr-bicon,
#sheet-body .gr-banner.lv2 .gr-bicon,
#sheet-body .gr-banner.lv3 .gr-bicon,
#sheet-body .gr-banner.lv4 .gr-bicon,
#sheet-body .gr-banner.lv5 .gr-bicon { color: var(--lv-fg); }

/* --- 展开区 --- */
#sheet-body .gr-detail {
    padding: 12px 12px 14px;
    border-top: 1px solid #EDF3F9;
    background: linear-gradient(180deg, #F8FBFF, #FFFFFF);
}
#sheet-body .gr-detail[hidden] { display: none; }

/* 子块（正式比赛 / 训练参考） */
#sheet-body .gr-blk {
    margin-top: 8px;
    padding: 12px 12px 11px;
    border: 1px solid #E9F1F9;
    border-radius: 14px;
    background: #fff;
}
#sheet-body .gr-blk:first-child { margin-top: 0; }
#sheet-body .gr-blk-h {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
#sheet-body .gr-bico { display: inline-grid; place-items: center; width: 17px; height: 17px; color: #0E6FB8; }
#sheet-body .gr-bico svg { width: 17px; height: 17px; }
#sheet-body .gr-blk-t {
    font-size: 13.5px;
    font-weight: 800;
    color: #0E5F9E;
}
#sheet-body .gr-blk-s,
#sheet-body .gr-blk-v { font-size: 11.5px; line-height: 1.5; color: #8A98A6; }
#sheet-body .gr-blk-n {
    margin-top: 7px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.3px;
    line-height: 1.3;
    color: #12314E;
    font-variant-numeric: tabular-nums;
}
#sheet-body .gr-blk-n .gr-rank { font-size: 14px; font-weight: 700; color: #3E5162; }
#sheet-body .gr-blk-n .gr-lv { font-size: 15px; padding: 1px 7px; border-radius: 7px; vertical-align: 1px; }
#sheet-body .gr-blk-f {
    margin-top: 3px;
    font-size: 11.5px;
    line-height: 1.6;
    color: #8A98A6;
}
#sheet-body .gr-verdict {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px dashed #E9F1F9;
    font-size: 11.5px;
    line-height: 1.65;
}
#sheet-body .gr-verdict .gr-vico { flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-top: 1px; }
#sheet-body .gr-verdict .gr-vico svg { width: 14px; height: 14px; }
#sheet-body .gr-verdict.ok { color: #1B7A46; }
#sheet-body .gr-verdict.ok .gr-vico { color: #1B7A46; }
#sheet-body .gr-verdict.warn { color: #A76320; }
#sheet-body .gr-verdict.warn .gr-vico { color: #D08A2A; }

/* --- 等级 pill --- */
#sheet-body .gr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
#sheet-body .gr-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--lv-bd, #E4EAF1);
    border-radius: 999px;
    background: var(--lv-bg, #F5F8FB);
    font-size: 12.5px;
    line-height: 1.2;
}
#sheet-body .gr-chip i {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-style: normal;
    font-weight: 700;
    color: var(--lv-fg, #6B7A89);
}
#sheet-body .gr-chip i svg { width: 12px; height: 12px; }
#sheet-body .gr-chip b {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #25384A;
}
#sheet-body .gr-chip.on {
    box-shadow: 0 0 0 1.5px var(--lv-fg, #0B6FB8), 0 2px 6px rgba(16, 58, 96, .10);
}

/* 行内等级词 */
#sheet-body .gr-lv {
    display: inline-block;
    padding: 0 4px;
    margin: 0 1px;
    border-radius: 4px;
    background: var(--lv-bg, #EEF2F6);
    color: var(--lv-fg, #6B7A89);
    font-style: normal;
    font-weight: 700;
    vertical-align: 1px;
}
/* 等级色板：0 未定级 / 1 三级 / 2 二级 / 3 一级 / 4 健将 / 5 国际健将 */
#sheet-body .lv0 { --lv-bg: #F1F3F5; --lv-fg: #929EAA; --lv-bd: #E4E8EC; }
#sheet-body .lv1 { --lv-bg: #EDF1F5; --lv-fg: #647589; --lv-bd: #DCE3EA; }
#sheet-body .lv2 { --lv-bg: #E2F5F2; --lv-fg: #138675; --lv-bd: #C8E8E1; }
#sheet-body .lv3 { --lv-bg: #E4F1FC; --lv-fg: #1379B5; --lv-bd: #C6E1F5; }
#sheet-body .lv4 { --lv-bg: #F0EAFE; --lv-fg: #7049BB; --lv-bd: #DED3F7; }
#sheet-body .lv5 { --lv-bg: #FFF3D9; --lv-fg: #A87513; --lv-bd: #F2DFB0; }

/* 状态 badge（仍用于摘要区等零散位置） */
#sheet-body .gr-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: var(--text-micro);
    font-weight: 700;
    line-height: 1.7;
    background: #EEF2F6;
    color: #6B7A89;
}
#sheet-body .gr-badge.lv0,
#sheet-body .gr-badge.lv1,
#sheet-body .gr-badge.lv2,
#sheet-body .gr-badge.lv3,
#sheet-body .gr-badge.lv4,
#sheet-body .gr-badge.lv5 {
    background: var(--lv-bg);
    color: var(--lv-fg);
}
#sheet-body .gr-badge.warn { background: #FDF0E3; color: #A76320; }

/* --- 目标 / 主攻 --- */
#sheet-body .gr-goal-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 11px;
    border: 1px solid #D6E7F6;
    border-radius: 999px;
    background: #F3FAFF;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: #0E6FB8;
    cursor: pointer;
}
#sheet-body .gr-detail-foot { margin-top: 11px; }
#sheet-body .gr-focus-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #E6EEF7;
    border-radius: 13px;
    background: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: #25384A;
    cursor: pointer;
}
#sheet-body .gr-ficon { display: inline-grid; place-items: center; width: 16px; height: 16px; color: #98A6B4; }
#sheet-body .gr-ficon svg { width: 16px; height: 16px; }
#sheet-body .gr-ftxt { flex: 1 1 auto; min-width: 0; text-align: left; }
#sheet-body .gr-chev-r {
    flex: none;
    width: 7px;
    height: 7px;
    margin: 0 2px 0 0;
    border-right: 1.7px solid #C3CFDB;
    border-bottom: 1.7px solid #C3CFDB;
    transform: rotate(-45deg);
}
#sheet-body .gr-focus-btn.on { border-color: #CFE2F3; background: #F4FAFF; color: #0B6FB8; }
#sheet-body .gr-focus-btn.on .gr-ficon { color: #0B6FB8; }

/* --- 其余未测项目折叠 --- */
#sheet-body .gr-fold { margin-top: 12px; }
#sheet-body .gr-fold-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: 1px dashed #DBE7F2;
    border-radius: 13px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    color: #7C8B9B;
    cursor: pointer;
}
#sheet-body .gr-rest { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
#sheet-body .gr-rest[hidden] { display: none; }

/* ===== 小控件热区：视觉尺寸不动，可点范围撑到 44×44（WCAG 2.5.8 / iOS HIG）
   实测过小：⋯ 24×24、日历 ‹ › 34×34、＋测速 43×24、查看全部 73×32 —— 手指容易点空 ===== */
.rec-action-link,
.card-more,
.cal-nav,
.item-more,
.rec-more-btn,
.trend-more {
    position: relative;
}
.rec-action-link::after,
.card-more::after,
.cal-nav::after,
.item-more::after,
.rec-more-btn::after,
.trend-more::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    border-radius: 12px;
}
/* 胶囊按钮只补高度，横向不动，避免撑到相邻条目 */
.group-act { min-height: 36px; }
