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

: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-success { background: var(--ok); color: #fff; }
.btn-success:hover { filter: brightness(.92); }
.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; }

/* 添加随队人员：朱砂红虚线大按钮 */
.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.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; }
.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); }
}
.cell-empty { color: var(--ink-300); font-style: italic; }

/* ---------------- 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; }
}
.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); }
}

.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-info { background: var(--paper-2); color: var(--ink-700); border: 1px solid var(--ink-100); }
.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; }

/* ---------------- 杂项 ---------------- */
.small { font-size: 12px; color: var(--ink-300); }
.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; }
.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); }

.tabs { display: flex; border-bottom: 1px solid var(--ink-100); margin-bottom: 18px; }
.tab { padding: 11px 18px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--ink-500); font-size: 14px; }
.tab.active { border-bottom-color: var(--zhu); color: var(--zhu); font-weight: 600; }

/* ============================================================
   首页 · 水墨风
   ============================================================ */
.home-bg {
  min-height: 100vh;
  background: var(--paper);
  padding: 0 0 60px;
}
.home-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  max-width: 960px;
  margin: 0 auto;
}
.home-topbar .site-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--ink-500);
}
.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-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.competition-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232, 228, 222, .8);
}
.competition-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.competition-card .icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--zhu-tint); color: var(--zhu);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; font-size: 26px; font-family: var(--font-display);
}
.competition-card .name { font-size: 16px; font-weight: 600; color: var(--ink-900); line-height: 1.5; font-family: var(--font-display); letter-spacing: 1px; }

.home-title {
  font-family: var(--font-display);
  text-align: center;
  color: var(--ink-900);
  font-size: 30px;
  letter-spacing: 8px;
  margin: 60px 0 40px;
}

/* ============================================================
   登录 / 注册 / 赛区选择
   ============================================================ */
.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-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; }
}

/* 手机端报名表预览（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;
  font-family: "SimSun", "Noto Serif SC", "Microsoft YaHei", sans-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%;
  border-collapse: collapse;
}

.form-sheet-table th,
.form-sheet-table td {
  border: 1px solid #333;
  padding: 4pt 5pt;
  text-align: left;
  vertical-align: top;
  font-size: 9.5pt;
}

.form-sheet-table th {
  background: #f2f2f2;
  font-weight: bold;
}

.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); }
}
