/* 校园魔方赛事系统 · 界面样式 */
:root {
  --blue-50: #eef4ff;
  --blue-100: #dbe7ff;
  --blue-200: #bfd4ff;
  --blue-400: #60a5fa;
  --blue-500: #2563eb;
  --blue-600: #1d4ed8;
  --blue-700: #1e3a8a;
  --navy: #0b1f4d;

  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e5eaf2;
  --line-2: #eef2f8;
  --bg: #f4f7fc;
  --card: #ffffff;

  --green: #059669;
  --green-bg: #ecfdf5;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --violet: #7c3aed;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35);
  --shadow-lg: 0 24px 60px -30px rgba(15, 23, 42, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.container {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.hide {
  display: none !important;
}

/* ---------------- 顶栏 ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 4px;
  background: #0f172a;
  box-shadow: 0 6px 14px -6px rgba(15, 23, 42, 0.6);
}

.brand-mark i {
  border-radius: 2.5px;
  display: block;
}

.brand-mark i:nth-child(1) { background: #f8fafc; }
.brand-mark i:nth-child(2) { background: #ef4444; }
.brand-mark i:nth-child(3) { background: #f8fafc; }
.brand-mark i:nth-child(4) { background: #f59e0b; }
.brand-mark i:nth-child(5) { background: #f8fafc; }
.brand-mark i:nth-child(6) { background: #22c55e; }
.brand-mark i:nth-child(7) { background: #f8fafc; }
.brand-mark i:nth-child(8) { background: #3b82f6; }
.brand-mark i:nth-child(9) { background: #f8fafc; }

.brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--blue-50);
  color: var(--blue-700);
  text-decoration: none;
}

.nav a.active {
  background: var(--blue-50);
  color: var(--blue-700);
}

.nav a.admin-link {
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 500;
}

/* ---------------- 首页 ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -20%, rgba(96, 165, 250, 0.55), transparent 60%),
    radial-gradient(700px 380px at 5% 120%, rgba(37, 99, 235, 0.45), transparent 60%),
    linear-gradient(135deg, #0b1f4d 0%, #16337a 45%, #1d4ed8 100%);
  color: #fff;
  padding: 62px 0 54px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(60% 80% at 70% 40%, #000 20%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 30px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #bcd2ff;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-sub {
  color: #c9dbff;
  font-size: 16px;
  max-width: 560px;
  margin-bottom: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e8f0ff;
  font-size: 13.5px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.chip b {
  color: #fff;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 26px;
  color: #c9dbff;
  font-size: 14px;
}

.hero-countdown strong {
  font-size: 26px;
  color: #fff;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.cube-illustration {
  justify-self: end;
  width: min(280px, 100%);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 30px 50px rgba(2, 12, 40, 0.55));
}

.cube-face {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  background: #0a1024;
  border-radius: 16px;
  transform: rotate(-8deg) skewY(4deg);
}

.cube-face span {
  border-radius: 8px;
  background: #e2e8f0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.cube-face span.r { background: #ef4444; }
.cube-face span.o { background: #f59e0b; }
.cube-face span.g { background: #22c55e; }
.cube-face span.b { background: #3b82f6; }
.cube-face span.y { background: #fde047; }
.cube-face span.w { background: #f8fafc; }

/* ---------------- 通用区块 ---------------- */

.section {
  padding: 46px 0 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
}

.card-head h3 {
  font-size: 16px;
}

.card-body {
  padding: 20px 22px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--blue-700);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--blue-600);
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--blue-700);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 13px;
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  border-radius: 9px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--line-2);
  color: var(--ink);
}

.btn-light {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 8px 20px -10px rgba(2, 12, 40, 0.6);
}

.btn-light:hover {
  background: #eef4ff;
  color: var(--blue-700);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-danger {
  background: var(--red);
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-danger-ghost {
  background: transparent;
  border-color: #fecaca;
  color: var(--red);
}

.btn-danger-ghost:hover {
  background: var(--red-bg);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

.btn-icon:hover {
  background: var(--line-2);
  color: var(--ink);
}

/* ---------------- 徽标 / 标签 ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  background: var(--line-2);
  color: var(--muted);
  white-space: nowrap;
}

.badge.blue { background: var(--blue-50); color: var(--blue-700); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.violet { background: #f5f3ff; color: var(--violet); }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------------- 表格 ---------------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

table.data th {
  text-align: left;
  font-weight: 650;
  font-size: 12.5px;
  color: var(--muted);
  background: #f8fafd;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

table.data tbody tr:hover {
  background: #fafcff;
}

table.data tbody tr:last-child td {
  border-bottom: none;
}

table.data td.c,
table.data th.c {
  text-align: center;
}

table.data td.r,
table.data th.r {
  text-align: right;
}

.rank-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
  background: var(--line-2);
  color: var(--muted);
}

.rank-cell.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.rank-cell.r2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); color: #fff; }
.rank-cell.r3 { background: linear-gradient(135deg, #f0a884, #c2754e); color: #fff; }

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.person-name {
  font-weight: 650;
  line-height: 1.2;
}

.person-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.result-strong {
  font-weight: 750;
  font-size: 15px;
}

/* ---------------- 表单 ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.field > label {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--ink-2);
}

.field .req {
  color: var(--red);
  margin-left: 3px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

textarea {
  height: auto;
  min-height: 86px;
  padding: 10px 13px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.hint + .hint {
  margin-top: 6px;
}

/* 表头里的文字按钮（如「全部勾选」） */
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--blue-600);
  cursor: pointer;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.form-grid + .hint {
  margin-top: 12px;
}

.error-text {
  font-size: 13px;
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue-600);
}

/* ---------------- 项目选择卡 ---------------- */

.pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.pick:hover {
  border-color: var(--blue-200);
  background: #fbfdff;
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick .pick-name {
  font-weight: 650;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.pick .pick-meta {
  font-size: 12px;
  color: var(--muted);
}

.pick .pick-count {
  font-size: 12px;
  color: var(--muted-2);
}

.pick.on {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
}

.pick.on .pick-name::after {
  content: "✓";
  margin-left: auto;
  color: var(--blue-600);
  font-weight: 800;
}

.pick.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------- 步骤 ---------------- */

.steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.step-num {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--line-2);
  color: var(--muted);
  font-size: 12.5px;
}

.step.on {
  color: var(--ink);
}

.step.on .step-num {
  background: var(--blue-600);
  color: #fff;
}

.step.done .step-num {
  background: var(--green-bg);
  color: var(--green);
}

.step-line {
  width: 34px;
  height: 1px;
  background: var(--line);
}

/* ---------------- 提示 ---------------- */

.alert {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: var(--line-2);
  color: var(--ink-2);
}

.alert.info { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-700); }
.alert.success { background: var(--green-bg); border-color: #bbf7d0; color: #065f46; }
.alert.warn { background: var(--amber-bg); border-color: #fde68a; color: #92400e; }
.alert.danger { background: var(--red-bg); border-color: #fecaca; color: #991b1b; }

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty .empty-icon {
  font-size: 30px;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  margin-top: 60px;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast-item {
  padding: 11px 18px;
  border-radius: 11px;
  background: #0f172a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.22s ease;
  max-width: min(520px, calc(100vw - 32px));
}

.toast-item.ok { background: #065f46; }
.toast-item.err { background: #991b1b; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------------- 弹窗 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  font-size: 17px;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  padding: 15px 22px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------------- 标签页 ---------------- */

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  background: var(--line-2);
  color: var(--ink-2);
}

.tab.on {
  background: var(--blue-600);
  color: #fff;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar .spacer {
  flex: 1;
}

/* ---------------- 管理后台 ---------------- */

body.admin {
  background: #f2f5fa;
}

.admin-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-side {
  background: #0b1f4d;
  color: #c8d5f2;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 750;
  font-size: 15.5px;
  padding: 2px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-brand .brand-mark {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

.admin-brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #8fa6d8;
  letter-spacing: 0.03em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #b9c9ea;
  font-size: 14px;
  font-weight: 600;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
}

.admin-nav a.on {
  background: var(--blue-600);
  color: #fff;
}

.admin-nav .nav-icon {
  width: 18px;
  text-align: center;
  opacity: 0.9;
  font-size: 15px;
}

.admin-side-foot {
  margin-top: auto;
  font-size: 12px;
  color: #7990c0;
  padding: 0 8px;
  line-height: 1.7;
}

.admin-side-foot a {
  color: #a9bde6;
}

.admin-main {
  min-width: 0;
  padding: 26px 30px 50px;
}

.admin-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-top h1 {
  font-size: 23px;
  letter-spacing: -0.02em;
}

.admin-top .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.admin-top .top-actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.kpi .kpi-num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.kpi .kpi-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-grid.wide-left {
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
}

.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-card .card-head {
  padding: 15px 18px;
}

.table-card .card-head h3 {
  font-size: 15px;
}

.table-card .table-wrap {
  max-height: 620px;
  overflow: auto;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.mini-input {
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 13.5px;
}

.attempt-input {
  width: 92px;
  height: 36px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 0 6px;
  border-radius: 8px;
}

.attempt-input.filled {
  background: #f8fbff;
}

.attempt-input.dnf {
  color: var(--red);
  font-weight: 700;
}

.attempt-input:focus {
  background: #fff;
}

.entry-row.incomplete td {
  background: #fffdf6;
}

.entry-row.done td {
  background: #fbfefc;
}

.entry-avg {
  font-family: var(--mono);
  font-weight: 750;
  font-size: 14.5px;
}

.entry-avg.dnf {
  color: var(--red);
}

.progress {
  height: 7px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}

.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-400));
  border-radius: 99px;
  transition: width 0.3s;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.side-list-item {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.side-list-item:last-child {
  border-bottom: none;
}

/* ---------------- 大屏 ---------------- */

body.live {
  background: #061229;
  color: #fff;
  overflow: hidden;
}

.live-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(37, 99, 235, 0.45), transparent 60%),
    radial-gradient(800px 500px at 0% 110%, rgba(14, 116, 144, 0.35), transparent 60%),
    linear-gradient(160deg, #061229, #0a1d3f 55%, #0b2350);
}

.live-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 36px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.live-title {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.live-title small {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #8fb0e8;
  margin-top: 2px;
}

.live-event {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-event .ev-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.live-time {
  font-family: var(--mono);
  font-size: 15px;
  color: #9db8e8;
}

.live-clock {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #dbe7ff;
}

.live-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(320px, 1fr);
  gap: 0;
  min-height: 0;
}

.live-body.idle {
  grid-template-columns: minmax(0, 1fr);
}

.live-body.idle .live-side,
.live-body.idle .live-main h2 {
  display: none;
}

.live-body.idle .live-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-body.idle .live-empty {
  padding: 0 20px;
  max-width: 640px;
}

.live-body.idle .live-empty > div:first-child {
  font-size: 30px !important;
  font-weight: 800;
  color: #dbe7ff;
  margin-bottom: 12px !important;
}

.live-body.idle .live-empty > div + div {
  font-size: 16px;
  line-height: 1.8;
}

.live-main {
  padding: 28px 36px;
  min-width: 0;
}

.live-main h2 {
  font-size: 15px;
  letter-spacing: 0.14em;
  color: #7ea2dd;
  font-weight: 650;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.live-table {
  width: 100%;
  border-collapse: collapse;
}

.live-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #6f8fc7;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.live-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 19px;
}

.live-table .l-rank {
  width: 64px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 22px;
  color: #8fb0e8;
}

.live-table tr.top1 .l-rank { color: #fbbf24; }
.live-table tr.top1 td { background: rgba(251, 191, 36, 0.07); }

.live-table .l-name {
  font-weight: 700;
  font-size: 21px;
}

.live-table .l-sub {
  display: block;
  font-size: 12.5px;
  color: #7e9bcc;
  font-weight: 500;
  margin-top: 1px;
}

.live-table .l-time {
  font-family: var(--mono);
  font-weight: 750;
  font-size: 22px;
  text-align: right;
  letter-spacing: -0.01em;
}

.live-table .l-best {
  font-family: var(--mono);
  color: #7e9bcc;
  text-align: right;
  font-size: 15px;
  width: 96px;
}

.live-side {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-height: 0;
  overflow: hidden;
}

.live-side h3 {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #7ea2dd;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.live-feed {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.feed-name {
  font-weight: 650;
  font-size: 14.5px;
}

.feed-attempt {
  font-size: 11.5px;
  color: #7e9bcc;
}

.feed-time {
  margin-left: auto;
  font-family: var(--mono);
  font-weight: 750;
  font-size: 17px;
}

.live-stat {
  display: flex;
  gap: 26px;
}

.live-stat .num {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--mono);
}

.live-stat .lbl {
  font-size: 12px;
  color: #7e9bcc;
}

.live-foot {
  padding: 12px 36px 16px;
  display: flex;
  gap: 18px;
  align-items: center;
  color: #6f8fc7;
  font-size: 12.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.live-foot .spacer {
  flex: 1;
}

.live-empty {
  padding: 60px 20px;
  text-align: center;
  color: #7e9bcc;
}

.pulse {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 1.8s infinite;
  margin-right: 8px;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------------- 加载 ---------------- */

.loading {
  display: grid;
  place-items: center;
  padding: 80px 20px;
  color: var(--muted);
  gap: 14px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--blue-500);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .cube-illustration {
    display: none;
  }
  .admin-grid,
  .admin-grid.wide-left {
    grid-template-columns: 1fr;
  }
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .live-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .live-side {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    overflow-x: auto;
  }
  .admin-brand {
    border-bottom: none;
    padding: 0;
    flex: none;
  }
  .admin-brand small {
    display: none;
  }
  .admin-nav {
    flex-direction: row;
    gap: 4px;
  }
  .admin-nav a {
    padding: 7px 11px;
    white-space: nowrap;
    font-size: 13px;
  }
  .admin-side-foot {
    display: none;
  }
  .admin-main {
    padding: 18px 16px 40px;
  }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
  }
  .header-inner {
    height: 58px;
    gap: 10px;
  }
  .brand {
    font-size: 15.5px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .brand-sub {
    display: none;
  }
  .nav {
    gap: 0;
  }
  .nav a {
    padding: 7px 9px;
    font-size: 13.5px;
  }
  .nav a.admin-link {
    display: none;
  }
  .steps {
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 18px;
  }
  .step {
    gap: 6px;
    font-size: 12.5px;
    white-space: nowrap;
  }
  .step-num {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .step-line {
    display: none;
  }
  .hero {
    padding: 40px 0 36px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero-sub {
    font-size: 14.5px;
  }
  .form-grid,
  .grid.cols-2,
  .grid.cols-3 {
    grid-template-columns: 1fr;
  }
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .pick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section {
    padding: 32px 0 6px;
  }
  .section-head h2 {
    font-size: 19px;
  }
  .card-pad {
    padding: 16px;
  }
  .card-head,
  .card-body {
    padding: 14px 16px;
  }
  .kpi-row {
    gap: 10px;
  }
  .kpi {
    padding: 13px 14px;
  }
  .kpi .kpi-num {
    font-size: 22px;
  }
  .live-top {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .live-main,
  .live-side {
    padding: 18px 16px;
  }
  .live-table td {
    font-size: 16px;
    padding: 9px 6px;
  }
  .live-table .l-name {
    font-size: 17px;
  }
  .live-table .l-time {
    font-size: 17px;
  }
  .attempt-input {
    width: 76px;
  }
  .modal {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    flex: 1;
  }
  .brand > span:last-child {
    display: none;
  }
  .brand {
    gap: 0;
  }
  .nav a {
    padding: 7px 8px;
    font-size: 13px;
  }
}

/* ---------------- 站点首页 / 频道导航 ---------------- */

.site-hero {
  padding: 74px 0 62px;
}

.site-hero h1 {
  font-size: clamp(32px, 4.6vw, 50px);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  color: #e8f0ff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.entry-band {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 26px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(700px 300px at 90% -30%, rgba(96, 165, 250, 0.5), transparent 60%),
    linear-gradient(120deg, #10224d 0%, #1b3f92 60%, #2563eb 100%);
  box-shadow: 0 18px 40px -22px rgba(15, 35, 95, 0.75);
}

.entry-band .eb-main {
  flex: 1;
  min-width: 240px;
}

.entry-band .eb-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a9c4f8;
  margin-bottom: 6px;
}

.entry-band h2 {
  font-size: 23px;
  margin: 0 0 8px;
  color: #fff;
}

.entry-band .eb-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #c9d9f7;
}

.entry-band .eb-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.eb-note {
  font-size: 12.5px;
  color: #c9d9f7;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

.feature h3 {
  font-size: 16px;
}

.home-foot-card {
  padding: 34px 24px;
}

/* 比赛频道导航 */
.comp-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.comp-nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  flex-wrap: wrap;
  padding: 6px 0;
}

.comp-nav-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}

.comp-nav-name:hover {
  color: var(--blue-600);
  text-decoration: none;
}

.comp-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.comp-nav-links a {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #475569;
}

.comp-nav-links a:hover {
  background: var(--line-2);
  color: var(--blue-600);
  text-decoration: none;
}

.comp-nav-links a.on {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 650;
}

/* 比赛切换 */
.comp-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0 0;
}

@media (max-width: 720px) {
  .comp-nav-inner {
    gap: 6px;
    padding: 8px 0;
  }
  .comp-nav-name {
    width: 100%;
    font-size: 13.5px;
  }
  .comp-nav-links {
    width: 100%;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .comp-nav-links::-webkit-scrollbar {
    height: 0;
  }
  .comp-nav-links a {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  /* 手机页头已经有「大屏」入口，这里的重复项收起来 */
  .comp-nav-links a[target="_blank"] {
    display: none;
  }
}

/* ---------------- 校纪录 ---------------- */

.rec-table td {
  vertical-align: top;
  padding-top: 12px;
  padding-bottom: 12px;
}

.rec-event {
  font-weight: 700;
  font-size: 15px;
}

.rec-event-en {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.rec-value {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rec-holder {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.rec-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.rec-note {
  white-space: pre-wrap;
  line-height: 1.95;
  font-size: 13px;
  color: var(--ink-2);
}

/* 首页上的校纪录卡片 */
.rec-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 16px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}

.rec-card:hover {
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.rec-card-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.rec-card-name span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.rec-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.rec-line-label {
  color: var(--muted);
  font-size: 12px;
  width: 26px;
  flex: none;
}

.rec-line b {
  font-family: var(--mono);
  font-size: 16px;
}

.rec-line-holder {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 后台编辑表格 */
.rec-block {
  padding: 16px 18px;
}

.rec-block-head {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.rec-block-head input[data-k='name'] {
  width: 160px;
  height: 32px;
  font-weight: 600;
}

.rec-block-head input[data-k='name_en'] {
  width: 150px;
  height: 32px;
  font-size: 12px;
  color: var(--muted);
}

.rec-kind {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.rec-kind-label {
  width: 64px;
  flex: none;
  padding-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
}

.rec-entries {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-entry-row {
  display: grid;
  grid-template-columns: 110px minmax(120px, 1fr) minmax(160px, 1.4fr) 130px 34px;
  gap: 6px;
  align-items: center;
}

.rec-entry-row input {
  width: 100%;
  height: 30px;
  font-size: 12.5px;
}

@media (max-width: 720px) {
  .rec-entry-row {
    grid-template-columns: 1fr 1fr;
  }
  .rec-entry-row button {
    grid-column: span 2;
    justify-self: start;
  }
}

/* 打印中心 */
.print-table td {
  vertical-align: top;
}

.round-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 3px 0;
}

.round-line + .round-line {
  border-top: 1px dashed var(--line);
}

.round-line .round-name {
  font-weight: 650;
  min-width: 52px;
}

/* ---------------- 项目卡片 ---------------- */

.event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.event-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 16px;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
}

.event-card:hover {
  text-decoration: none;
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.event-meta {
  display: flex;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------------- 赛程时间线 ---------------- */

.tl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}

.tl-item:last-child {
  border-bottom: none;
}

.tl-time {
  width: 52px;
  flex: none;
  color: var(--muted);
  font-size: 13px;
}

.tl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
  flex: none;
  box-shadow: 0 0 0 3px var(--blue-50);
}

.tl-body {
  flex: 1;
  min-width: 0;
}

.tl-title {
  font-weight: 650;
  font-size: 14.5px;
}

/* ---------------- 录入细节 ---------------- */

.attempt-input.error {
  border-color: var(--red);
  background: var(--red-bg);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.btn svg,
.admin-nav svg {
  flex: none;
  display: block;
}

.admin-nav a svg {
  opacity: 0.85;
}

@media (max-width: 1040px) {
  .event-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .event-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .event-card {
    padding: 11px 12px;
    gap: 3px;
  }
  .event-card .badge {
    display: none;
  }
  .event-name {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .pick-grid,
  .event-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------- 宽表格横向滚动 ---------------- */

table.data.wide {
  min-width: 720px;
}

@media (max-width: 720px) {
  .hide-sm {
    display: none !important;
  }
  .only-sm {
    display: block !important;
  }
  /* 手机上成绩表横向滚动，平均成绩固定在右边随时能看到 */
  .cc table.res-table {
    min-width: 620px;
  }
  .cc table.res-table .avg-col {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 1;
    box-shadow: -8px 0 10px -8px rgba(15, 23, 42, 0.28);
  }
  .cc table.res-table thead .avg-col {
    background: var(--cc-head);
  }
}

.only-sm {
  display: none;
}

/* ================= 成绩 / 录入：粗饼风格数据表 ================= */

.cc {
  --cc-line: #dfe6ee;
  --cc-head: #f3f6f9;
  --cc-link: #1a5fb4;
}

.cc .card,
.cc .table-card {
  border-radius: 8px;
  box-shadow: none;
}

.cc .tabs {
  gap: 22px;
}

/* 项目多的时候一行放不下，改成横向滚动，避免最后一行只剩一个 */
.cc .ev-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.cc .ev-tabs::-webkit-scrollbar {
  height: 0;
}

.cc .ev-tabs .tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cc .tab {
  padding: 11px 1px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: #46617f;
  font-weight: 500;
  font-size: 14.5px;
}

.cc .tab:hover {
  background: none;
  color: var(--cc-link);
}

.cc .tab.on {
  background: none;
  color: var(--cc-link);
  border-bottom-color: var(--cc-link);
  font-weight: 650;
}

.cc table.data {
  border-collapse: collapse;
  font-size: 14px;
}

.cc table.data th {
  background: var(--cc-head);
  color: #3f4c5c;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  padding: 9px 10px;
  border: 1px solid var(--cc-line);
  position: static;
  text-align: center;
}

.cc table.data th:first-child,
.cc table.data th:nth-child(2) {
  text-align: center;
}

.cc table.data th:nth-child(2) {
  text-align: left;
}

.cc table.data th.r {
  text-align: right;
}

.cc table.data td {
  border: 1px solid #e8edf3;
  padding: 8px 10px;
  background: #fff;
}

.cc table.data tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.cc table.data tbody tr:hover td {
  background: #f4f9ff;
}

.cc table.data tbody tr:last-child td {
  border-bottom: 1px solid #e8edf3;
}

.cc .rank-cell {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: #44546a;
  font-weight: 600;
  font-size: 14px;
}

.cc .rank-cell.r1 {
  background: none;
  color: #b45309;
  font-weight: 800;
}

.cc .rank-cell.r2 {
  background: none;
  color: #6b7a8f;
}

.cc .rank-cell.r3 {
  background: none;
  color: #9a3412;
}

.cc .person {
  gap: 0;
  min-width: 0;
}

.cc .person .avatar {
  display: none;
}

.cc .person-name {
  font-weight: 600;
}

.cc .person-name,
.cc .person-sub {
  white-space: nowrap;
}

.cc .person-sub {
  color: #93a1b3;
  font-size: 12px;
}

.cc .result-strong {
  font-size: 14.5px;
  font-weight: 700;
}

.cc .cc-time {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.cc .cc-time.dnf {
  color: #c0392b;
  font-weight: 650;
}

.cc .cc-avg {
  font-weight: 700;
}

/* 录入表 */
.cc.entry table.data th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.cc .attempt-input {
  height: 32px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}

.cc .attempt-input:focus {
  border-color: var(--cc-link);
  box-shadow: 0 0 0 2px rgba(26, 95, 180, 0.12);
}

.cc .attempt-input.dnf {
  color: #c0392b;
  font-weight: 650;
}

.cc .entry-row.incomplete td {
  background: #fffdf6;
}

.cc .entry-row.done td {
  background: #fff;
}

.cc .entry-row:nth-child(even) td {
  background: #fafbfc;
}

.cc .entry-row.incomplete:nth-child(even) td {
  background: #fffcf2;
}

.cc .entry-avg {
  font-size: 14px;
}

.cc .admin-top h1 {
  font-size: 22px;
}

.cc .card-head {
  padding: 14px 16px;
}

.cc .card-head h3 {
  font-size: 15px;
  font-weight: 650;
}

.cc table.data td a {
  color: var(--cc-link);
}

.cc table.data .date-row td {
  background: #eef2f7 !important;
  font-weight: 650;
  color: #334155;
  font-size: 13px;
  padding: 7px 12px;
}

/* ================= 后台：比赛工作台 ================= */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(37, 99, 235, 0.45), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(14, 116, 144, 0.35), transparent 60%),
    linear-gradient(150deg, #08152f, #0b2350 60%, #12306b);
}

.admin-shell {
  min-height: 100vh;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: #0b1f4d;
  color: #fff;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 750;
  font-size: 15px;
  white-space: nowrap;
}

.admin-brand:hover {
  text-decoration: none;
}

.admin-brand .brand-mark {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

.admin-nav-h {
  display: flex;
  gap: 4px;
}

.admin-nav-h a {
  padding: 7px 12px;
  border-radius: 8px;
  color: #b9c9ea;
  font-size: 14px;
  font-weight: 600;
}

.admin-nav-h a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.admin-nav-h a.on {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.admin-me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: #a9bde6;
}

.admin-me a {
  color: #dbe7ff;
}

.admin-shell .admin-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 60px;
}

.ws-head {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.ws-head h1 {
  font-size: 25px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.ws-back {
  font-size: 12.5px;
  color: var(--muted);
}

.ws-back:hover {
  color: var(--blue-600);
}

/* 工作台内页的标题比比赛名小一档，避免两行大字打架 */
#ws-body .admin-top {
  margin-bottom: 16px;
}

#ws-body .admin-top h1 {
  font-size: 18px;
  font-weight: 700;
}

#ws-body .admin-top .sub {
  font-size: 12.5px;
}

.ws-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ws-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin: 18px 0 20px;
  flex-wrap: wrap;
}

.ws-tabs a {
  padding: 10px 14px;
  color: #475569;
  font-size: 14.5px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.ws-tabs a:hover {
  color: var(--blue-700);
  text-decoration: none;
}

.ws-tabs a.on {
  color: var(--blue-700);
  border-bottom-color: var(--blue-600);
}

.ws-subtabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.ws-subtabs a {
  padding: 8px 2px;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.ws-subtabs a.on {
  color: var(--blue-700);
  border-bottom-color: var(--blue-600);
}

.ws-subtabs a:hover {
  text-decoration: none;
  color: var(--blue-700);
}

.comp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comp-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.comp-card h3 {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.comp-meta {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 3px;
}

.comp-stat {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.comp-stat b {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.comp-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 草稿状态的比赛 */
.comp-card.is-draft {
  background: #fffdf6;
  border-style: dashed;
}

.badge.gray {
  background: #eef2f7;
  color: #64748b;
}

/* 比赛概览的只读信息表 */
.info-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

.info-list > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  min-width: 0;
  word-break: break-word;
}

/* 发布方式单选 */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.radio-item:hover {
  border-color: var(--blue-200);
}

.radio-item.on {
  border-color: var(--blue-500);
  background: var(--blue-50);
}

.radio-item input {
  margin-top: 3px;
}

/* 表单底部按钮 */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 20px 0 40px;
}

@media (max-width: 720px) {
  .admin-header {
    padding: 0 14px;
    gap: 12px;
  }
  .admin-brand span {
    display: none;
  }
  .admin-shell .admin-main {
    padding: 18px 14px 40px;
  }
  .ws-head h1 {
    font-size: 21px;
  }
  .comp-card {
    gap: 10px;
  }
  .comp-actions {
    margin-left: 0;
  }
}
