/* ============================================================
   武术比赛报名系统 · 水墨灰 × 朱砂红 设计系统
   墨色为底，朱砂点睛；宣纸质感，柔和圆角
   ============================================================ */

:root {
  /* 墨色阶 */
  --ink-900: #2b2724;
  --ink-700: #4c4640;
  --ink-500: #79716a;
  --ink-300: #b5ada4;
  --ink-100: #e8e4de;

  /* 宣纸底色 */
  --paper: #f7f5f2;
  --paper-2: #efece7;
  --card: #ffffff;

  /* 朱砂红 */
  --zhu: #b03a35;
  --zhu-deep: #8e2c28;
  --zhu-bright: #c94a44;
  --zhu-tint: #f5eae8;
  --zhu-line: #e3c7c3;

  /* 辅助 */
  --ok: #5e8c61;
  --ok-bg: #eaf1ea;
  --warn: #b07d3a;
  --warn-bg: #f6efe4;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-card: 0 1px 3px rgba(43, 39, 36, .05), 0 6px 24px rgba(43, 39, 36, .06);
  --shadow-hover: 0 4px 10px rgba(43, 39, 36, .07), 0 12px 36px rgba(43, 39, 36, .10);

  --font-display: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink-700);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--zhu); transition: color .2s; }
a:hover { color: var(--zhu-deep); }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--zhu-tint); color: var(--zhu-deep); }

/* ---------------- 顶栏 ---------------- */
.header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  color: var(--ink-900);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--ink-100);
}
.header .brand {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-900);
}
.header .brand img { height: 34px; }
.header .meta { font-size: 13px; text-align: right; color: var(--ink-500); display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.header .meta .team {
  color: var(--zhu);
  background: var(--zhu-tint);
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 8px;
}
/* v2.8.1 队伍名称 + 下方「点此修改」入口（两行右对齐，与菜单按钮垂直居中） */
.header .team-block { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; line-height: 1.15; }
.header .team-block .team { margin-left: 0; }
.header .team-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--zhu);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: color .15s, border-color .15s;
}
.header .team-edit-link .icon { font-size: 11px; }
.header .team-edit-link:hover { border-bottom-color: var(--zhu); }
.header .team-edit-link.locked { color: var(--ink-300); cursor: not-allowed; }
.header .team-edit-link.locked:hover { border-bottom-color: transparent; }

/* 印章式 logo（朱红方章） */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--zhu);
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), 0 2px 6px rgba(176, 58, 53, .35);
  user-select: none;
}

/* ---------------- 步骤导航 ---------------- */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--ink-100);
  padding: 10px 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  color: var(--ink-500);
  white-space: nowrap;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
}
.nav a:hover, .nav span:hover { color: var(--ink-900); background: var(--paper-2); }
.nav a.active, .nav span.active {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-color: var(--zhu-line);
  font-weight: 600;
}

/* ---------------- 布局与卡片 ---------------- */
.container { max-width: 1400px; margin: 0 auto; padding: 28px 24px 48px; }
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232, 228, 222, .8);
  padding: 28px;
  margin-bottom: 20px;
}

.title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 22px;
  color: var(--ink-900);
  letter-spacing: 1px;
}
.subtitle {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 14px;
  color: var(--ink-900);
  padding-left: 12px;
  border-left: 3px solid var(--zhu);
}

/* ---------------- 表单 ---------------- */
.form-row { display: flex; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.form-label { width: 140px; padding-top: 9px; color: var(--ink-500); text-align: right; padding-right: 16px; }
.form-input { flex: 1; min-width: 200px; }
.form-label .required { color: var(--zhu); margin-right: 4px; }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  color: var(--ink-700);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-300); }
input:focus, select:focus, textarea:focus {
  border-color: var(--zhu);
  box-shadow: 0 0 0 3px var(--zhu-tint);
}
input.error, select.error { border-color: var(--zhu-bright); background: var(--zhu-tint); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 26px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 14px;
  letter-spacing: 2px;
  transition: all .2s;
  background: var(--paper-2);
  color: var(--ink-900);
  cursor: pointer;
}
.btn:hover { background: #e5e1da; }
.btn-primary {
  background: var(--zhu);
  color: #fff;
  box-shadow: 0 3px 10px rgba(176, 58, 53, .25);
}
.btn-primary:hover { background: var(--zhu-deep); transform: translateY(-1px); }
.btn-danger { background: var(--zhu); color: #fff; }
.btn-default {
  background: var(--card);
  color: var(--ink-700);
  border: 1px solid var(--ink-100);
}
.btn-default:hover { border-color: var(--ink-300); color: var(--ink-900); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* v2.9.25 身份证号重复拦截提示模块（页面内横幅，非弹窗） */
.dup-block {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 14px; padding: 16px 18px;
  background: var(--zhu-tint);
  border: 1px solid var(--zhu-line);
  border-left: 5px solid var(--zhu);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(176,58,53,.10);
}
.dup-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  background: var(--zhu); color: #fff; font-size: 21px; line-height: 38px;
  text-align: center; font-weight: 700;
}
.dup-main { flex: 1; min-width: 0; }
.dup-title { font-size: 15px; font-weight: 700; color: var(--zhu-deep); letter-spacing: 1px; margin-bottom: 4px; }
.dup-text { font-size: 14px; color: var(--ink-700); line-height: 1.7; }
.dup-rows { font-size: 12.5px; color: var(--ink-500); margin-top: 6px; }
.dup-rows b { color: var(--zhu-deep); font-weight: 700; }
.dup-close {
  flex: 0 0 auto; cursor: pointer;
  background: var(--zhu); color: #fff; border: none;
  padding: 10px 22px; border-radius: 999px; font-size: 14px; font-weight: 700;
  font-family: var(--font-body); letter-spacing: 1px;
}
.dup-close:hover { background: var(--zhu-deep); }
/* 重复行标红 */
tr.dup-row td { background: #fdf1f0; }
tr.dup-row input.cell-dup { border-color: var(--zhu) !important; background: #fff; color: var(--zhu-deep); font-weight: 700; }
.dup-mark { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--zhu); font-weight: 700; }
@media (max-width: 640px) {
  .dup-block { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .dup-main { flex: 1 1 100%; order: 2; }
  .dup-icon { order: 1; }
  .dup-close { order: 3; flex: 1 1 100%; }
}

/* 添加随队人员：朱砂红虚线大按钮 */
.btn-add-staff {
  display: block;
  width: 100%;
  padding: 16px 10px;
  margin-top: 4px;
  border: 2px dashed var(--zhu-line);
  border-radius: var(--radius-md);
  background: var(--zhu-tint);
  color: var(--zhu);
  font-size: 14px;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .2s;
}
.btn-add-staff:hover { border-color: var(--zhu); background: #f2e0dd; }

/* v2.3.1 运动员页添加入口与随队人员页统一：朱砂红虚线大按钮 + 红灰删除小按钮 */
.add-row-bar { display: flex; gap: 10px; align-items: stretch; margin-top: 4px; }
.add-row-bar .btn-add-staff { flex: 1; margin-top: 0; }
.btn-del-selected {
  padding: 0 18px;
  border: 1.5px solid var(--zhu-line);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--zhu);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.btn-del-selected:hover:not([disabled]) { border-color: var(--zhu); background: var(--zhu-tint); }
.btn-del-selected[disabled] { opacity: .45; cursor: not-allowed; }

.actions { display: flex; justify-content: center; gap: 14px; margin-top: 28px; }

/* ---------------- 表格（去硬边框，行线式） ---------------- */
.table-wrap { overflow-x: auto; margin-bottom: 14px; border-radius: var(--radius-md); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card);
}
th, td {
  border: none;
  padding: 11px 10px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--paper-2);
}
th {
  background: var(--paper-2);
  color: var(--ink-500);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: normal;
  line-height: 1.45;
}
th.th-vertical {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  white-space: nowrap;
  padding: 11px 4px;
  min-width: 28px;
  max-width: 44px;
  letter-spacing: 2px;
}
.events-table td { white-space: nowrap; }
/* v2.8.8 报项信息页「对练标识说明」（仅赛事开放对练报名时显示，由 eventFlags.duilian 控制） */
.duilian-tip {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-left: 3px solid var(--zhu);
  border-radius: 6px;
  padding: 9px 13px;
  margin: -8px 0 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}
/* v2.8.12 随队人员信息页「填写要求」提示：与对练标识说明同款红框，位置在表格（表头）上方。
 * 特意写成独立规则、不去合并上面的 .duilian-tip 选择器，避免动到既有样式与回归断言。 */
.staff-tip {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-left: 3px solid var(--zhu);
  border-radius: 6px;
  padding: 9px 13px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}
/* v2.8.15 运动员信息页「填写说明」提示：从表格下方灰字移到表头（表格）上方，与上面两条同款红框。
 * 同样独立成规则，不合并不覆盖既有选择器。 */
.athlete-tip {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-left: 3px solid var(--zhu);
  border-radius: 6px;
  padding: 9px 13px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}
/* v2.9.4 报项信息页「个人项目每人限报」提示（仅赛事配置 maxPersonalEvents 时显示）。
 * 与上面三条同款红框；按既定模式独立成规则，不合并不覆盖既有选择器。 */
.limit-tip {
  color: var(--zhu);
  background: var(--zhu-tint);
  border-left: 3px solid var(--zhu);
  border-radius: 6px;
  padding: 9px 13px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}
/* v2.8.9 对练标识成组校验未通过：页内红条 + 标红对应单元格（一律不用浏览器弹窗） */
.duilian-error {
  background: #fdf0ef;
  border: 1px solid var(--zhu-line);
  border-left: 3px solid var(--zhu-deep);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 14px 0 0;
  color: var(--zhu-deep);
}
.duilian-error-main { font-size: 13px; font-weight: 600; line-height: 1.6; }
.duilian-error-detail { font-size: 12px; margin-top: 4px; line-height: 1.7; opacity: .88; }
td.td-error { background: #fdf0ef !important; box-shadow: inset 0 0 0 1px var(--zhu-line); }
th:first-child { border-radius: var(--radius-sm) 0 0 0; }
th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #faf8f5; }
.cell-input { width: 100%; border: none; background: transparent; text-align: center; padding: 5px; font-size: 13px; border-radius: 6px; font-family: inherit; color: var(--ink-700); }
.cell-input:focus { outline: 2px solid var(--zhu); background: #fff; }
/* v2.9.7 备注字数超限：只提醒不删除，红框标出让用户自行删减（与 td.td-error 同款警示色） */
.cell-input.cell-over { background: #fdf0ef; box-shadow: inset 0 0 0 1px var(--zhu-line); }
.cell-select { width: 100%; border: none; background: transparent; padding: 5px; font-size: 13px; font-family: inherit; color: var(--ink-700); text-align: center; text-align-last: center; -moz-text-align-last: center; }
.cell-select:focus { outline: 2px solid var(--zhu); }
/* v2.3 身份证人员的性别/出生日期由证件号自动识别，锁定不可编辑但保持可读 */
.cell-select:disabled, .cell-input:disabled { background: var(--paper-2); color: var(--ink-700); cursor: not-allowed; opacity: 1; -webkit-text-fill-color: var(--ink-700); }
/* v2.8.14 随队人员角色下拉：已被其它行占用的职务置灰（原生 disabled 灰化在部分浏览器几乎看不出来，
   所以 option 文本同时带「（已填写）」标记；置灰只是加成，两条一起才算"看得懂"） */
.cell-select option:disabled { color: var(--ink-300); background: var(--paper-2); }
/* v2.8.23 随队人员民族列压到 3 字宽（88px）：4 字以上的民族名会被裁。
 * 加省略号是为了让「被裁」看得出来 —— 否则「维吾尔族」硬切成「维吾尔」，
 * 看着像选错了（实际存的值始终是完整名称）。只在真的溢出时才出现省略号，
 * 「请选择 / 汉族 / 高山族」这类 3 字以内完全不受影响。 */
.cell-eth { text-overflow: ellipsis; }
/* v2.8.16 未选择该项报名内容时，其后的备注 / 对练标识锁定：浅灰底 + 点击穿透到单元格给页内提示。
 * 刻意不用 disabled —— disabled 元素不派发点击事件，捕捉不到用户「想填却被挡」的动作。 */
.cell-locked {
  background: var(--paper-2) !important;
  color: var(--ink-300) !important;
  -webkit-text-fill-color: var(--ink-300);
  pointer-events: none;
  cursor: not-allowed;
}
td.td-locked { cursor: not-allowed; }
/* v2.8.17 报项主项一键取消：选中后单元格右侧出现 ×（让用户回下拉里翻「请选择」不直观）。
 * 用 flex 并排而非叠加定位 —— 报项列偏窄，叠加会压住选项文字或原生下拉箭头。 */
.cell-pick { display: flex; align-items: center; }
.cell-pick > .cell-select { flex: 1 1 auto; min-width: 0; width: auto; }
/* v2.8.18 视觉加强：朱砂红 × + 红色圆圈，让「这是取消本项」一眼可辨。
 * 边框实测在 1x 屏上 1.5px 会被渲染成 1px（圈太细看不出来），故取 2px 保证圈看得见。
 * v2.8.19 圈收小到 20×20、× 改用 SVG 图形（更饱满、整体占位更省）——
 * transform/translateY 硬推偏移的方案不要用：那是照字体度量算的，iPhone 换字体就会推歪。
 * v2.8.20 与下拉箭头的间距 4px → 12px：间距太近，手机上手指点 × 容易落到下拉框上。
 * 只拉间距、不放大按钮 —— 下拉框整块可点（原生 select 行为），点偏了只是打开下拉，不会丢数据。 */
.cell-clear {
  flex: 0 0 auto; width: 20px; height: 20px; padding: 0; margin-left: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--zhu); border-radius: 50%; background: var(--zhu-tint);
  color: var(--zhu); cursor: pointer;
}
/* 20 - 2*2 边框 = 16 内容框，放 10px 图形 → 四边各余 3px，天然整数居中（无半像素抖动） */
.cell-clear svg { display: block; width: 10px; height: 10px; }
/* stroke 用 currentColor：反色时（鼠标 hover / 触屏按住）按钮 color 变白，× 自动跟着变白 */
.cell-clear svg line { stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; fill: none; }
/* v2.8.21 触屏没有真正的「悬停」：手指划过或点按后，:hover 会被命中且**松手后继续残留**，
 * 按钮就停在「实心红 + 白 ×」的亮色状态，看着像已经取消了，其实没有（用户反馈的「假高亮」）。
 * 故悬停反色只在有鼠标的设备上生效；触屏另给一条 :active —— 按住时才反色、松手立即恢复，
 * 手感上是「按下有反馈」，但不会残留，也就不会被误读成已取消。 */
@media (hover: hover) and (pointer: fine) {
  .cell-clear:hover { color: #fff; background: var(--zhu); border-color: var(--zhu-deep); }
}
@media (hover: none) {
  .cell-clear:active { color: #fff; background: var(--zhu); border-color: var(--zhu-deep); }
}

/* ---------------- v2.8.22 随队人员表：上传格缩略图 ----------------
 * 背景：上传后只剩一个「查看」链接，右侧大片空白浪费；而且点了查看既不能删也不能换。
 * 现在把已上传态改成「缩略图 + 点击看大图 · 删除重传」，图既能点开大图，也能一键重传。
 *
 * 高度预算是这次的关键（用户明确要求多人队伍时行高不能变高）：
 *   未上传态 = 「上传」16 + 说明两行 36.28 + 上下内边距 22 → 内容高 60.08px（行高 83.08px）
 *   已上传态 = 缩略图 40 + 间距 2 + 操作行 17                → 内容高 59.00px
 * 59 < 60.08，所以行高一点没变（实测 83.08 → 82.00px）。缩略图 40px 是这套预算的上限，
 * 再高就会把行高撑起来；「看大致效果、点开看大图确认」的定位就是按这个上限定的。
 *
 * 固定列宽只在桌面（>640px）启用：≤640px 表格会切「卡片布局」（table 变 display:block、全宽），
 * 那时 min-width:900px 会把卡片撑到 900px 宽、标签后面的内容被挤出屏幕外（实测踩到过）。 */
@media (min-width: 641px) {
  .card-table.card-table-fixed { table-layout: fixed; min-width: 900px; }
  /* v2.8.25 运动员信息页有 12 列（含 4 个上传列），固定列宽合计 756px。
     v2.8.26 最小宽度 1290 → 1200：操作行文案缩短 + 收间距后实测只需 85.00px
     （旧「点击看大图 · 删除重传」为 117.66px），加左右内边距 12px = 97px 即可单行放下，
     取 111px（(1200-756)/4）留 14px 余量抗字体差异。
     副效果：1366 屏容器宽 1260px > 1200，这一档不再出现横向滚动
     （v2.8.25 的 1290 在 1366 屏会滚约 30px，用户提过这个顾虑）。 */
  .card-table.card-table-fixed.card-table-ath { min-width: 1200px; }
  /* 四个上传列左右内边距收到 6px（其它列仍是 10px）：给操作行多挤出 8px。
     用户对这块的要求是「空间不够用可以适当紧凑一些」。 */
  .card-table.card-table-ath td:nth-child(n+9) { padding-left: 6px; padding-right: 6px; }
  /* v2.8.26 操作行再收紧（只针对运动员页；随队人员页列宽 296px 宽裕，保持 10px + 分隔号不变）：
     文案「点击看大图」→「看大图」省 22px，间距 6→4px、并隐掉中间分隔号「·」（约 5.5px + 两侧间距），
     合计省下约 35px —— 4 个上传列由此各多出近 9px，1366 屏也不必再横向滚动。
     两个操作本身颜色（灰 11px / 朱砂红 12px）差异明显，去掉分隔号不会看混。 */
  .card-table.card-table-ath .thumb-ops { gap: 4px; }
  .card-table.card-table-ath .thumb-sep { display: none; }
}

/* ---------------- v2.8.28 报项表：固定列宽 + 统一「4 汉字」格 ----------------
 * 背景（改前实测，1440 视口 / 线上真实报项目录）：
 *   表格 1790px、容器 1294px → 横向滚动 496px；表头行高 126.84px；
 *   下拉列被 15 字的选项名（太极剑(含32、42式太极剑)）撑到 247px，
 *   备注列反被挤到 33px —— 表头「集体拳术备注」竖着堆 6 行，这才是表头虚高的真凶。
 * 现在：前三列沿用改前宽度（72 / 33 / 91），第四列起一律「最多 4 个汉字」，
 *   列宽由 app.html 的 evCols 一处给出（事件列 138 / 标识列 106 / 备注列 76），
 *   表格 min-width 用同一份数据求和后经 --ev-minw 传进来，保证不会窄于列宽之和。
 * 只在 >640px 生效：≤640px 表格会切「卡片布局」（table 变 display:block、全宽），
 *   那时 min-width 会把卡片撑出屏幕外（v2.8.25 踩过同样的坑）。 */
@media (min-width: 641px) {
  .card-table.card-table-ev { table-layout: fixed; min-width: var(--ev-minw, 900px); }
}
/* 被裁要看得出来：线上个人器械 / 器械对练 / 集体器械 的选项名最长 15 字，
 * 4 字宽的格里必须留省略号 —— 否则「器械对练(含徒手与器械对练)」会被硬切成「器械对练」，
 * 看着像是选成了另一个项目（同 v2.8.23 民族列加省略号的道理）。
 * 完整名称不丢：单元格带 title，鼠标悬停可见；手机上切卡片布局，本就完整显示。 */
.card-table-ev .cell-select { text-overflow: ellipsis; }
/* 姓名 / 组别是纯文本格：固定列宽后超长内容会溢出到相邻格，必须裁掉并给省略号提示
 * （测试库姓名最长 4 字，但少数民族姓名可能更长，留这条兜底） */
.card-table-ev td:nth-child(1),
.card-table-ev td:nth-child(3) { overflow: hidden; text-overflow: ellipsis; }
.cell-file-thumb { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.thumb-link { display: block; line-height: 0; }
.thumb {
  height: 40px; width: auto; max-width: 100%; display: block;
  border: 1px solid var(--ink-100); border-radius: 4px;
  background: #fff; object-fit: contain;
}
.thumb-ops {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; line-height: 17px; white-space: nowrap;
}
.thumb-hint { font-size: 11px; color: var(--ink-300); text-decoration: none; }
.thumb-sep { font-size: 11px; color: var(--ink-100); }
.thumb-del {
  background: none; border: none; padding: 0;
  font: inherit; font-size: 12px; line-height: 17px;
  color: var(--zhu); cursor: pointer; white-space: nowrap;
}
/* 同 v2.8.21 的规矩：悬停样式只给鼠标设备，触屏不给任何残留态 */
@media (hover: hover) and (pointer: fine) {
  .thumb-del:hover { text-decoration: underline; }
  .thumb-link:hover .thumb { border-color: var(--zhu-line); }
}

/* v2.9.5 上传列动态化：列宽走类（随队 0~2 列 / 运动员 0~4 列，按后台勾选 v-for 渲染） */
.col-up { width: 96px; }
/* v2.9.5 多张模式的「＋ 继续添加」按钮（朱砂虚线小按钮，与 thumb-del 同色系） */
.thumb-add {
  display: inline-block; margin-top: 4px; padding: 3px 8px;
  border: 1px dashed var(--ink-100); border-radius: 6px;
  font-size: 11px; line-height: 17px; color: var(--zhu); white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .thumb-add:hover { border-color: var(--zhu-line); }
}

.checkbox { width: 17px; height: 17px; cursor: pointer; accent-color: var(--zhu); }

/* ---------------- 徽章 / 提示 ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.badge-success { background: var(--ok-bg); color: var(--ok); }
.badge-danger { background: var(--zhu-tint); color: var(--zhu); }

.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 18px; font-size: 13px; }
.alert-success { background: var(--ok-bg); color: var(--ok); border: 1px solid #cfe0cf; }
.alert-danger { background: var(--zhu-tint); color: var(--zhu); border: 1px solid var(--zhu-line); }

/* ---------------- 汇总 / 检查 ---------------- */
.summary-block { margin-bottom: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.summary-item {
  background: var(--paper-2);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-100);
}
.summary-item label { display: block; color: var(--ink-500); font-size: 12px; margin-bottom: 5px; letter-spacing: 1px; }
.summary-item span { font-size: 16px; font-weight: 600; color: var(--ink-900); }

.check-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 4px; border-bottom: 1px dashed var(--ink-100); }
.check-item:last-child { border-bottom: none; }

/* ---------------- 第 7 步信息汇总与提交（v2.9.1） ----------------
   设计目标：报项信息在电脑端不出现横向滚动条 —— 宽度不够时靠文字折行、整表变高，
   而不是横滑；手机端沿用 v2.5 的 table.card-table 卡片化，同样不横滑。 */

/* 汇总页只读紧凑表（随队人员 / 运动员 / 报项信息） */
.sum-table { table-layout: fixed; font-size: 12px; }
.sum-table th {
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.3;
  padding: 7px 4px;
  word-break: break-all;
}
.sum-table td {
  font-size: 12px;
  line-height: 1.4;
  padding: 7px 4px;
  word-break: break-word;
}
/* 斑马纹：报项信息列多，横着看容易串行，用底色隔开 */
.sum-table tbody tr:nth-child(even) td { background: var(--paper); }

/* v2.9.13 汇总页「运动员信息」表补身份证号码列（与导出的报名表同一口径）。
   这一块列是固定的（不像下面报项表的列随赛事开放项目增减），所以列宽一次定死；
   取值沿用第 3 步运动员录入表 v2.8.25 那批逐档实测值：
     姓名 88→100  汇总页没有独立的「证件类型」列，护照人员的证号前缀更长，姓名列不必省这点宽度
     证件号 170   18 位数字实测 167.22px 起不裁（含「护照 E12345678」也放得下）
     性别 74、出生日期 106、组别 102  同录入页实测值
   合计 552px。.sum-table 是 table-layout: fixed，这里写 px 只作比例：
   容器更宽时各列等比放大、窄屏等比收缩（≤640px 由 card-table 变卡片，宽度规则自动失效）。
   报项信息表本版未改动。 */
.sum-ath th.sum-c-name   { width: 100px; }
.sum-ath th.sum-c-idcard { width: 170px; }
.sum-ath th.sum-c-sex    { width: 74px; }
.sum-ath th.sum-c-birth  { width: 106px; }
.sum-ath th.sum-c-group  { width: 102px; }
/* v2.9.14 再补「民族」列（性别与出生日期之间），宽度仍取录入表实测值 94px（「哈萨克族」4 字够用），
   六列合计 646px。列顺序与前台运动员录入窗口对齐：姓名 / 证件号 / 性别 / 民族 / 出生日期 / 组别。 */
.sum-ath th.sum-c-ethnic { width: 94px; }

/* 报项信息：项目名与备注/标识放在同一格、上下两行。
   这样列数从 16 降到 10，桌面端不再需要横向滚动（代价是行会变高）。

   v2.9.2 列宽不再平均分，改按「真实最长取值」逐个给：.sum-table 是 table-layout: fixed，
   列宽是硬约束，内容超了只能折行。原来 6 个项目列均分，每列约 154px，而
   「器械对练(含徒手与器械对练)」这类全称需要约 164px —— 差的正是那一个字，
   于是被挤成两行；同时「性别」一列却占了 65px 只放一个字。
   这里把性别/组别收到刚好够用，省下的宽度全给项目名列。
   固定布局下多出来的宽度会按这些值等比分配，所以宽屏自动放宽、窄屏等比收缩。

   注意：宽度写在 th 的类上，而不是 <col> —— 报项大类可由赛事开关，列数会变，
   写死 <col> 的位置在「只开对练」「只开拳术」等组合下会串列。 */
/* v2.9.3 备注也纳入列宽预算：每列 = max(项目名全称不折行, 备注不折行)。
   10 个字是备注的字数上限（第 4 步输入框卡住），实测「备注：」+ 10 字 = 143px，
   加左右内边距 8px 就是 151px 起步，这里给 154px 留 3px 抗字体差异。
   徒手/器械对练的第二行是「标识：1」（39px）而不是备注，所以那两列仍由项目名决定宽度。

   10 个列宽相加 = 1116px，这个数就是表格的最小宽度（table-layout: fixed 下，
   列宽是硬约束，表格不会窄于列宽之和）：
     · 容器 ≥ 1116px → 表格撑满容器、按比例放大，左右没有留白
     · 容器 < 1116px → 表格锁在 1116px 不再压缩，交给 .sum-ev-scroll 让这一块左右滑动
   v2.9.2 的 968px 只按项目名给宽度，备注一填满就会折成两行（实测「个人器械」
   列内容宽 107px，而备注要 143px，差 36px）—— 这就是本次改动的起因。 */
.sum-ev th.ev-c-idx     { width: 28px; }
.sum-ev th.ev-c-name    { width: 68px; }
.sum-ev th.ev-c-sex     { width: 36px; }
.sum-ev th.ev-c-group   { width: 88px; }
.sum-ev th.ev-c-quanshu { width: 154px; }
.sum-ev th.ev-c-qixie   { width: 154px; }
.sum-ev th.ev-c-bare    { width: 100px; }
.sum-ev th.ev-c-duilian { width: 170px; }
.sum-ev th.ev-c-colq    { width: 154px; }
.sum-ev th.ev-c-colx    { width: 164px; }

/* v2.9.3 报项表局部横滑。v2.9.2 及以前桌面端没有任何横向滚动容器 ——
   容器窄于表格时表格会直接凸出卡片右边框（1024 视口实测凸出 50px，只是刚好没撑破整页）。
   这里给它一个自己的滚动容器：只有报项表这一块能左右滑，整页不动。
   只在 >640px 生效：≤640px 表格会变卡片（每格独占一行、备注完整显示），不需要横滑，
   而且 .summary-block 在手机端本来就有一条 overflow-x: auto，别叠成双层滚动容器。 */
@media (min-width: 641px) {
  .sum-ev-scroll { overflow-x: auto; }
}

.ev-cell { display: block; }
.ev-v { display: block; }
.ev-n { display: block; margin-top: 2px; font-size: 11px; line-height: 1.25; color: var(--ink-300); }
.ev-nil { color: var(--ink-300); }
.sum-empty { font-size: 12px; color: var(--ink-300); margin: 0; }

/* 统计信息：标签在上、数值在下，随宽度自动折行 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.stat-cell { padding: 0 12px 8px 0; border-bottom: 1px solid var(--ink-100); }
.stat-cell label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 1px;
  line-height: 1.5;
}
.stat-cell span { font-size: 16px; font-weight: 600; color: var(--ink-900); line-height: 1.5; word-break: break-word; }

/* 提交检查（v2.9.2）：每条独占一行 ——「规则名 | 实际值 | 结论」三列对齐。
   原来是多列网格，但规则文案长短差异很大（最短 7 字，最长 20 字以上），
   网格里同一行的各格会因邻居折行而互相错位，怎么调列宽都难免；
   改成每条一行后，规则名再长也只影响自己这行的高度，整体天然齐平。 */
.chk-list { display: block; }
.chk-row {
  display: grid;
  /* 规则名与实际值各占一半：实际值偶尔会很长（如「对练标识成组」会把每条不成组的
     明细都列出来，60 字以上），固定列宽或 nowrap 都会被撑破页面，等分后超长就折行。 */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ink-100);
}
.chk-row:last-child { border-bottom: none; }
.chk-row .rule { font-size: 12px; line-height: 1.5; color: var(--ink-500); word-break: break-word; }
.chk-row .val {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-900);
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.chk-row .res { min-width: 44px; font-size: 12px; font-weight: 600; text-align: right; white-space: nowrap; }
.chk-ok { color: var(--ok); }
.chk-no { color: var(--zhu); }
.chk-skip { color: var(--ink-300); font-weight: 400; }

/* ---------------- 杂项 ---------------- */
.link { color: var(--zhu); cursor: pointer; }
.link:hover { text-decoration: underline; }
.footer { text-align: center; padding: 24px; color: var(--ink-300); font-size: 14px; letter-spacing: 2px; margin-top: auto; }
/* v2.9.27 后台入口热区：inline-block 贴合这八个字本身（不留 padding，鼠标只在字上才是手型） */
.footer .seal-trigger { display: inline-block; cursor: pointer; user-select: none; -webkit-user-select: none; }
.icp-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; padding: 0 24px 20px; color: var(--ink-300); font-size: 12px; letter-spacing: 0.5px; }
.icp-footer a { color: var(--ink-300); text-decoration: none; }
.icp-footer a:hover { color: var(--zhu); text-decoration: underline; }
.icp-footer .gongan-link { display: inline-flex; align-items: center; }
.icp-footer .gongan-link img { width: 16px; height: 16px; margin-right: 4px; display: block; }
.admin-entry {
  margin-left: auto;
  color: var(--zhu);
  font-size: 13px;
  text-decoration: none;
  opacity: 1;
  transition: opacity .3s, color .15s;
}
.admin-entry.hidden { display: none; }
.admin-entry:hover { color: var(--zhu-deep); }

/* ============================================================
   首页 · 水墨风
   ============================================================ */
.home-bg {
  min-height: 100vh;
  background: var(--paper);
  padding: 0 0 60px;
  /* v2.9.24 页尾沉底：容器改纵向 flex，footer 用 margin-top:auto 推到底部 */
  display: flex;
  flex-direction: column;
}
/* flex 容器里 margin:auto 的子元素会收缩成内容宽，需显式补回满宽 */
body.home-bg > .home-brand,
body.home-bg > .home-hero,
body.home-bg > .competition-list { width: 100%; }
/* v2.9.24 公司品牌行（替代原 home-topbar） */
.home-brand {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 24px 28px 4px;
  max-width: 960px;
  margin: 0 auto;
}
.home-brand .brand-logo { height: 96px; width: auto; display: block; }
.home-brand .brand-slogan { height: 34px; width: auto; display: block; }
.home-brand .brand-art { height: 84px; width: auto; display: block; margin-left: auto; align-self: flex-start; }
.home-hero {
  max-width: 960px;
  margin: 30px auto 40px;
  padding: 0 28px;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.home-hero .hero-seal {
  width: 64px; height: 64px;
  background: var(--zhu);
  color: #fff;
  font-family: var(--font-display);
  font-size: 34px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 6px 18px rgba(176, 58, 53, .3);
  flex-shrink: 0;
}
.home-hero .hero-text h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
  letter-spacing: 6px;
  line-height: 1.3;
}
.home-hero .hero-text p {
  margin: 6px 0 0;
  color: var(--ink-500);
  font-size: 14px;
  letter-spacing: 2px;
}
.home-hero .hero-ink {
  flex: 1;
  min-width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--ink-100), transparent);
  margin-bottom: 14px;
}

/* 赛事列表：横排条目 */
.competition-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.competition-entry {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(232, 228, 222, .8);
  box-shadow: var(--shadow-card);
  padding: 26px 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.competition-entry::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--zhu);
  opacity: 0;
  transition: opacity .25s;
}
.competition-entry:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--zhu-line);
}
.competition-entry:hover::before { opacity: 1; }
.competition-entry .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--zhu-tint);
  color: var(--zhu);
  font-family: var(--font-display);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.competition-entry .info { flex: 1; min-width: 0; }
.competition-entry .name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 2px;
}
.competition-entry .desc { font-size: 13px; color: var(--ink-500); margin-top: 4px; }
.competition-entry .arrow {
  color: var(--ink-300);
  font-size: 22px;
  transition: all .25s;
  flex-shrink: 0;
}
.competition-entry:hover .arrow { color: var(--zhu); transform: translateX(4px); }

/* 空状态：无开放赛事时的占位卡片
   虚线边框给出「待填充」语义，与有赛事时的实线卡片形成区分。
   无图标无装饰，靠字号、字距与留白撑起视觉重量。 */
.competition-empty {
  background: var(--card);
  border: 1px dashed #dcd6ce;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(43, 39, 36, .04);
  padding: 52px 26px;
  text-align: center;
}
.competition-empty .ce-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: 6px;
  line-height: 1.4;
}
.competition-empty .ce-desc {
  font-size: 13.5px;
  color: var(--ink-500);
  margin-top: 18px;
  line-height: 2;
}
@media (max-width: 640px) {
  .competition-empty { padding: 40px 20px; }
  .competition-empty .ce-title { font-size: 18px; letter-spacing: 4px; }
  .competition-empty .ce-desc { font-size: 13px; margin-top: 14px; }
}

/* ============================================================
   登录 / 注册 / 赛区选择
   ============================================================ */
.login-box { max-width: 440px; margin: 40px auto; }

/* 注册页隐私政策勾选 */
.privacy-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-600); }
.privacy-check input[type="checkbox"] { width: auto; margin-top: 4px; flex: none; accent-color: var(--zhu); cursor: pointer; }
.privacy-check a { color: var(--zhu); text-decoration: none; border-bottom: 1px dashed var(--zhu-100, var(--zhu)); }
.privacy-check a:hover { color: var(--zhu-deep); }

/* 隐私政策页 */
.policy-box { max-width: 760px; margin: 40px auto; }
.policy-box h3 { font-size: 16px; margin: 26px 0 10px; padding-left: 10px; border-left: 3px solid var(--zhu); }
.policy-box p, .policy-box li { font-size: 14px; line-height: 1.9; color: var(--ink-700); }
.policy-box ul { padding-left: 22px; margin: 8px 0; }
.policy-box .policy-meta { font-size: 13px; color: var(--ink-500); border-bottom: 1px solid var(--ink-100); padding-bottom: 14px; margin-bottom: 6px; }

.region-list { display: grid; gap: 12px; margin-bottom: 18px; }
.region-item {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  transition: all .2s;
  color: var(--ink-900);
}
.region-item:hover {
  border-color: var(--zhu);
  background: var(--zhu-tint);
  transform: translateX(3px);
}
.region-item .date { color: var(--ink-300); font-size: 13px; letter-spacing: 1px; }

/* v2.8.6 赛事标题下方的比赛日期（统一中文格式，与赛区行里的报名截止时间区分开） */
/* v2.8.7 与赛事名称左对齐（原居中显得游离），行高与间距按「标题 + 副标题」的节奏收紧 */
.comp-date {
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--zhu);
  letter-spacing: .5px;
  margin: -14px 0 22px;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .form-label { width: 100%; text-align: left; padding-bottom: 4px; }
  .form-input { width: 100%; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
  .header { height: auto; flex-wrap: wrap; padding: 10px 16px; }
  .header .meta { gap: 8px; }
  .header .team-edit-link { font-size: 10px; }
  .container { padding: 16px 14px 40px; }
  .card { padding: 20px 16px; }
  .home-brand { gap: 16px; padding: 18px 20px 2px; }
  .home-brand .brand-logo { height: 72px; }
  .home-brand .brand-slogan { flex: 1; min-width: 0; height: auto; }
  .home-brand .brand-art { display: none; }
  .home-hero { padding: 0 20px; }
  .home-hero .hero-text h1 { font-size: 26px; letter-spacing: 4px; }
  .competition-list { padding: 0 20px; }
  .competition-entry { padding: 20px; gap: 16px; }
  .competition-entry .arrow { display: none; }
}

/* ---------------- 手机端表格卡片化（≤640px，v2.5） ---------------- */
/* 同一份表格代码：电脑端是表格，手机端每行自动变形为卡片（标签在左、控件在右） */
@media (max-width: 640px) {
  table.card-table, table.card-table tbody, table.card-table tr, table.card-table td { display: block; width: 100%; }
  table.card-table thead { display: none; }
  table.card-table { background: transparent; }
  table.card-table tr {
    background: var(--card);
    border: 1px solid var(--paper-2);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    padding: 4px 14px;
  }
  table.card-table td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--paper-2);
    text-align: left; white-space: normal;
  }
  table.card-table tr td:last-child { border-bottom: none; }
  table.card-table td::before {
    content: attr(data-label);
    flex: 0 0 auto; max-width: 42%;
    font-size: 12px; color: var(--ink-500); letter-spacing: 1px; line-height: 1.5;
  }
  table.card-table td > * { flex: 1 1 auto; min-width: 0; }
  table.card-table td > input.checkbox { flex: 0 0 auto; }
  table.card-table .cell-input, table.card-table .cell-select { text-align: left; text-align-last: left; -moz-text-align-last: left; }
  /* 首个单元格作为卡片头（底色区分） */
  table.card-table tr td:first-child {
    background: var(--paper-2);
    margin: -4px -14px 4px; padding: 10px 14px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: 1px solid var(--paper-2);
  }
  table.card-table .events-table td, table.card-table.events-table td { white-space: normal; }
  /* 第 7 步只读汇总小表：允许横向滑动兜底 */
  .summary-block { overflow-x: auto; }
  /* 提交检查长文本折行 */
  .check-item { flex-wrap: wrap; gap: 6px; }
  /* v2.9.1 报项信息卡片化：# 序号列在卡片形态下没有意义（卡片头就是姓名），隐藏它；
     序号列被隐藏后首格不再是 :first-child，这里把「姓名」格单独补成卡片头 */
  table.card-table td.ev-idx { display: none; }
  table.card-table td.ev-name {
    background: var(--paper-2);
    margin: -4px -14px 4px;
    padding: 10px 14px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: 1px solid var(--paper-2);
  }
  /* v2.9.1 汇总页统计网格在手机上收成 2 列，避免挤压 */
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* v2.9.2 提交检查：手机上三列会挤，改成规则名占满第一行、实际值与结论在第二行 */
  .chk-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 3px; column-gap: 12px; padding: 8px 0; }
  .chk-row .rule { grid-column: 1 / -1; }
  .chk-row .val { text-align: left; }
}

/* 手机端报名表预览（A4 横版按宽度再缩小一档） */
@media (max-width: 640px) {
  .a4-landscape { transform: scale(0.3); transform-origin: top center; }
}

/* ---------------- 报名表预览 / A4 横版导出 ---------------- */
.preview-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43, 39, 36, 0.75);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  overflow: auto;
}

.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: var(--card);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
}

.a4-landscape {
  width: 297mm;
  min-height: 210mm;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 12mm;
  /* v2.9.11 西文字体提前到 SimSun 之前 —— html2canvas 用 canvas 度量 SimSun 的拉丁字符时
     字距算错（用户实测：邮箱 ddafad@qq.com 的「@」挤在前字上、「.」后多出空隙）。
     Times New Roman 优先后西文走西文字体渲染正常，中文自动回退宋体 —— 也是中文公文标准排法。 */
  font-family: "Times New Roman", "SimSun", "Noto Serif SC", "Microsoft YaHei", serif;
  color: #000;
  font-size: 10pt;
  line-height: 1.45;
  box-sizing: border-box;
}

.form-sheet-header {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 8pt;
  margin-bottom: 10pt;
}

.form-sheet-header h1 {
  font-size: 20pt;
  margin: 0 0 6pt 0;
  letter-spacing: 2pt;
}

.form-sheet-meta {
  display: flex;
  justify-content: center;
  gap: 24pt;
  font-size: 10pt;
}

.form-sheet-section {
  margin-bottom: 10pt;
}

.form-sheet-title {
  font-size: 11pt;
  font-weight: bold;
  margin-bottom: 4pt;
}

.form-sheet-table {
  width: 100%;
  /* v2.9.9 table-layout:fixed —— 自动布局会被长内容（邮箱/报项文字）撑过容器宽度，
     导出 PDF 时表格右缘超出画布被裁掉（用户实测：三张表右边框全丢）。
     固定布局下百分比列宽是硬约束，表格永远等于容器宽。 */
  table-layout: fixed;
  border-collapse: collapse;
  border: 1.5px solid #000;
}

.form-sheet-table th,
.form-sheet-table td {
  border: 0.75px solid #444;
  padding: 5pt 6pt;
  text-align: left;
  vertical-align: middle;
  font-size: 10pt;
  /* v2.9.10 撤掉了 v2.9.9 在这里加的强制任意断行属性 —— 它会把邮箱在「.」后折断，
     html2canvas 把断开的两段错位渲染（用户实测：ddafad@qq.com 显示成 ddafad@qq. com）。
     中文备注/报项天然可在任意字符间断行，本就不需要它；
     身份证号/邮箱列宽足够，也不会溢出。（注意：本块注释不得出现那个属性名，锚点靠它自检） */
}

.form-sheet-table th {
  background: #ececec;
  font-weight: bold;
  text-align: center;
}

/* 短内容列居中（序号/姓名/性别/日期/组别等），长文本列（备注/报项）保持左对齐 */
.form-sheet-table td.c {
  text-align: center;
}

/* v2.9.9 html2canvas 截图专用态：去掉小屏缩放 transform（截图库对 transform 支持不稳，
   会造成画面错位/裁切）和投影 */
.a4-landscape.pdf-mode {
  transform: none !important;
  box-shadow: none !important;
  /* 容器平时按 A4 整页撑高（min-height:210mm）只为屏幕预览好看；
     截图时若不撤掉，虚高的底部空白会被分页算法切出一个近乎空白的第 2 页（用户实测踩到） */
  min-height: 0 !important;
  /* v2.9.19 关键：撤掉 min-height 后，矮视口下这条规则决定内容会不会丢。
     预览弹窗是纵向 flex 容器，flex 子项默认可压缩（flex-shrink:1），
     视口高度不够时元素会被压扁到只剩可见区高度，表格下半截溢出元素盒，
     html2canvas 按元素盒裁剪 → 导出的 PDF 只剩前几行（用户实测 11 名运动员只出 4 行）。 */
  flex-shrink: 0 !important;
}

/* v2.9.19 截图时放开弹窗的滚动裁剪：弹窗平时 overflow:auto，
   html2canvas 在克隆文档里会按容器边界裁子元素，矮视口下把超出部分裁没 */
.preview-overlay.pdf-mode {
  overflow: visible !important;
}

.form-sheet-footer {
  margin-top: 12pt;
  text-align: center;
  font-size: 8.5pt;
  color: #555;
}

/* 省市区县三级选择器 */
.area-picker { position: relative; width: 100%; }
.area-picker-input {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--ink-100); border-radius: 6px;
  background: var(--paper); padding: 8px 12px; min-height: 40px;
  cursor: pointer; user-select: none;
}
.area-picker-input:hover { border-color: var(--zhu); }
.area-picker.open .area-picker-input { border-color: var(--zhu); }
.area-picker-text { color: var(--ink-700); }
.area-picker-placeholder { color: var(--ink-300); }
.area-picker-arrow { color: var(--ink-400); font-size: 12px; transition: transform .2s; }
.area-picker.open .area-picker-arrow { transform: rotate(180deg); }
.area-picker-dropdown {
  display: none; position: absolute; left: 0; top: calc(100% + 4px); z-index: 100;
  width: 100%; min-width: 560px; max-width: 720px;
  background: #fff; border: 1px solid var(--ink-100); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px 0;
}
.area-picker.open .area-picker-dropdown { display: flex; }
.area-picker-col {
  flex: 1; min-width: 160px; max-height: 280px; overflow-y: auto;
  border-right: 1px solid #eee;
}
.area-picker-col:last-child { border-right: none; }
.area-picker-item {
  padding: 8px 14px; font-size: 14px; color: var(--ink-700);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.area-picker-item:hover { background: var(--paper-2); }
.area-picker-item.active { background: var(--zhu-tint); color: var(--zhu-deep); font-weight: 500; }
.area-picker-empty {
  padding: 20px 14px; font-size: 13px; color: var(--ink-300); text-align: center;
}
@media (max-width: 640px) {
  .area-picker-dropdown { min-width: 100%; flex-direction: column; max-height: 360px; }
  .area-picker-col { border-right: none; border-bottom: 1px solid #eee; max-height: 120px; }
}

@media screen and (max-width: 1200px) {
  .a4-landscape {
    transform: scale(0.72);
    transform-origin: top center;
  }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  body * { visibility: hidden; }
  .preview-overlay,
  .preview-overlay * { visibility: visible; }
  .preview-toolbar { display: none; }
  .a4-landscape {
    position: absolute;
    left: 0; top: 0;
    width: 297mm;
    min-height: 210mm;
    box-shadow: none;
    transform: none;
    padding: 12mm;
  }
}

/* ---------------- 头部菜单下拉 ---------------- */
.header-menu { position: relative; display: inline-block; }
.header-menu-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.header-menu-btn:hover {
  border-color: var(--zhu-line);
  background: var(--zhu-tint);
  color: var(--zhu-deep);
}
.header-menu-btn .caret {
  font-size: 10px;
  transition: transform .2s;
}
.header-menu.open .header-menu-btn .caret { transform: rotate(180deg); }
.header-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--ink-100);
  padding: 6px;
  display: none;
  z-index: 200;
}
.header-menu.open .header-menu-dropdown { display: block; }
.header-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--ink-900);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.header-menu-item:hover {
  background: var(--zhu-tint);
  color: var(--zhu-deep);
}
.header-menu-item .icon {
  width: 18px; text-align: center;
  color: var(--zhu);
  font-size: 14px;
}
/* v2.8 菜单项禁用态：报名已截止或已提交时的「修改队伍名称」 */
.header-menu-item.disabled,
.header-menu-item.disabled .icon { color: var(--ink-300); }
.header-menu-item.disabled { cursor: not-allowed; }
.header-menu-item.disabled:hover { background: transparent; color: var(--ink-300); }

/* ---------------- 修改密码弹窗 ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 39, 36, 0.55);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 460px;
  padding: 28px;
}
.modal-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 20px;
  letter-spacing: 1px;
  padding-left: 12px;
  border-left: 3px solid var(--zhu);
}
.modal-row { margin-bottom: 14px; }
.modal-row label {
  display: block;
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.modal-row input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fff;
  color: var(--ink-700);
  font-size: 14px;
  font-family: inherit;
}
.modal-row input:focus {
  border-color: var(--zhu);
  box-shadow: 0 0 0 3px var(--zhu-tint);
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px;
}

/* 修改密码弹窗 · 页内错误提示 */
.pwd-error {
  background: #fdf0ef;
  border: 1px solid var(--zhu-line);
  color: var(--zhu-deep);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.5;
}

/* 修改密码弹窗 · 成功视图 */
.pwd-success {
  text-align: center;
  padding: 16px 0 8px;
}
.pwd-success-icon {
  width: 68px; height: 68px;
  margin: 4px auto 18px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 34px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(94, 140, 97, .25);
}
.pwd-success-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 26px;
  letter-spacing: 1px;
}
.pwd-success .btn { min-width: 160px; padding: 12px 26px; font-size: 15px; }

/* 登录页 · 页内错误强提示 */
.login-error {
  display: none;
  align-items: center;
  gap: 10px;
  background: #fdf0ef;
  border: 1.5px solid var(--zhu);
  color: var(--zhu-deep);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .5px;
  margin: 4px 0 16px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(176, 58, 53, .12);
}
.login-error-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--zhu);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-error.shake { animation: loginShake .45s ease; }
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  15%, 55% { transform: translateX(-7px); }
  35%, 75% { transform: translateX(7px); }
}

/* ===== 全局页内提示 toast（替代浏览器 alert） ===== */
#toast-box {
  position: fixed;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
  max-width: 92vw;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1.5px solid var(--ink-100, #e8e4de);
  border-left: 5px solid var(--ink-500, #79716a);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 8px 26px rgba(43, 39, 36, .16);
  padding: 13px 20px;
  font-size: 15px;
  color: var(--ink-900, #2b2724);
  cursor: pointer;
  max-width: 480px;
  animation: toastIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
.toast-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink-500, #79716a);
  color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.toast-text { line-height: 1.5; font-weight: 500; white-space: pre-line; }
.toast-error { border-color: var(--zhu-line, #e3c7c3); border-left-color: var(--zhu, #b03a35); }
.toast-error .toast-icon { background: var(--zhu, #b03a35); }
.toast-error .toast-text { color: var(--zhu-deep, #8e2c28); font-weight: 600; }
.toast-success { border-color: #cfe0cf; border-left-color: var(--ok, #5e8c61); }
.toast-success .toast-icon { background: var(--ok, #5e8c61); }
.toast-out { opacity: 0; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
