:root {
  --hfc-ink-green: #142b27;
  --hfc-ink-green-strong: #0e211d;
  --hfc-vermilion: #a33a31;
  --hfc-vermilion-strong: #842c26;
  --hfc-vermilion-soft: #f4e4e1;
  --hfc-medal-gold: #d0a957;
  --hfc-medal-gold-strong: #9b742d;
  --hfc-medal-gold-soft: #f4ebd6;
  --hfc-paper: #f3f1ea;
  --panel: #ffffff;
  --panel-soft: #ebe9e1;
  --ink: #17201d;
  --muted: #66716c;
  --line: #dddcd5;
  --line-strong: #c9c7be;
  --action: var(--hfc-vermilion);
  --action-hover: var(--hfc-vermilion-strong);
  --action-soft: var(--hfc-vermilion-soft);
  --honor: var(--hfc-medal-gold);
  --honor-strong: var(--hfc-medal-gold-strong);
  --honor-soft: var(--hfc-medal-gold-soft);
  --success: #34745b;
  --success-soft: #e2eee8;
  --warning: #a56f28;
  --warning-soft: #f6ead8;
  --danger: #a33a31;
  --danger-soft: #f4e4e1;
  --info: #496477;
  --info-soft: #e7edf0;
  --bg: var(--hfc-paper);
  --nav: var(--hfc-ink-green);
  --nav-strong: var(--hfc-ink-green-strong);
  --shadow: 0 18px 46px rgba(20, 43, 39, 0.09);
  --shadow-soft: 0 8px 22px rgba(20, 43, 39, 0.065);
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 17px;
  --title-sm: 22px;
  --title-md: 32px;
  --title-lg: 44px;
  --display-lg: 56px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 241, 234, 0.94) 220px),
    linear-gradient(90deg, rgba(20, 43, 39, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 43, 39, 0.045) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 42px 42px, 42px 42px, auto;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

:where(h1, h2, h3, h4, h5, h6, strong, b, button, input, select, textarea, option) {
  font-weight: 400;
}

button,
a,
input,
select,
textarea {
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(163, 58, 49, 0.22);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.public-mode .app-shell {
  display: block;
}

/* Admin chrome is intentionally self-contained so public routes keep their own layout. */
.admin-mode {
  --admin-text-caption: 12px;
  --admin-text-body: 14px;
  --admin-text-entry: 16px;
  --admin-text-page: 20px;
  --admin-color-heading: var(--ink);
  --admin-color-section: color-mix(in srgb, var(--ink) 70%, white);
  --admin-color-supporting: color-mix(in srgb, var(--ink) 70%, white);
  --admin-drawer-chrome-offset: 76px;
}

.admin-mode .app-shell { display: block; }
.admin-mode .sidebar { display: none; }
.admin-mode .sidebar.open {
  display: block;
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: min(82vw, 300px);
  padding: max(var(--admin-drawer-chrome-offset), calc(var(--admin-drawer-chrome-offset) + env(safe-area-inset-top))) 14px max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.drawer-backdrop { display: none; }
.admin-mode .drawer-backdrop.open {
  display: block;
  position: fixed;
  z-index: 39;
  inset: 0;
  border: 0;
  background: rgba(10, 24, 20, 0.5);
  backdrop-filter: blur(3px);
}
.admin-mode .mobile-menu { display: inline-flex; }
.admin-mode .topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.admin-mode .sidebar.open ~ .main .topbar {
  z-index: 41;
}
.admin-mode .view {
  width: min(66.6667vw, 1200px);
  max-width: none;
  margin: 0 auto;
  padding: 24px 0 40px;
}
.admin-mode .subpage-title {
  font-size: var(--admin-text-page);
  color: var(--admin-color-heading);
}
.admin-mode .subpage-eyebrow,
.admin-mode .admin-dash-section-title {
  font-size: var(--admin-text-caption);
  color: var(--admin-color-section);
}
.admin-mode .subpage-desc {
  font-size: var(--admin-text-body);
  color: var(--admin-color-supporting);
}

.admin-mode .admin-responsive-table {
  width: 100%;
  max-width: 100%;
}

.admin-mode .admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-mode .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-mode .admin-form-section {
  display: grid;
  gap: 14px;
}

@media (max-width: 1080px) {
  .admin-mode .view { width: min(calc(100vw - 40px), 600px); margin: 0 auto; }
}

@media (max-width: 680px) {
  .admin-mode { --admin-drawer-chrome-offset: 64px; }
  .admin-mode .topbar {
    padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  }
  .admin-mode .view {
    width: min(100vw, 600px);
    margin: 0 auto;
    padding: 12px max(12px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .admin-mode .subpage-back-row { margin-inline: -12px; }
  .admin-mode .form-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-mode .table-wrap .admin-responsive-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .admin-mode .table-wrap .admin-responsive-table thead { display: none; }
  .admin-mode .table-wrap .admin-responsive-table tbody { display: block; min-width: 0; }
  .admin-mode .table-wrap .admin-responsive-table tbody tr {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 0;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
  }
  .admin-mode .table-wrap .admin-responsive-table td {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(76px, 32%) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .admin-mode .table-wrap .admin-responsive-table td::before {
    content: attr(data-label);
    color: var(--admin-color-supporting);
    font-size: var(--admin-text-caption);
    font-weight: 400;
  }
  .admin-mode .table-wrap .admin-responsive-table td[colspan] { grid-template-columns: minmax(0, 1fr); }
  .admin-mode .table-wrap .admin-responsive-table td[colspan]::before { content: none; display: none; }
  .admin-mode .table-wrap .admin-responsive-table td:last-child { border-bottom: 0; }
  .admin-mode .admin-actions :is(button, a) { min-height: 44px; }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 180px),
    var(--nav);
  color: #d8e2de;
  overflow: auto;
}

.public-mode .sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: auto;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 12px 28px;
  border-right: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(90deg, rgba(163, 58, 49, 0.08), transparent 34%),
    color-mix(in srgb, var(--nav) 92%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(17, 26, 23, 0.18);
}

.public-mode .brand {
  min-width: 210px;
  padding: 0;
  margin: 0;
  border-bottom: 0;
}

.public-mode .brand-mark {
  width: 42px;
  height: 42px;
}

.public-mode .nav-section-title,
.public-mode .sidebar .nav-group:nth-of-type(2),
.public-mode .topbar {
  display: none;
}

.public-mode .sidebar .nav-group:first-of-type {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.public-mode .nav-group a {
  padding: 9px 12px;
  white-space: nowrap;
}

.public-mode .nav-group a::before {
  display: none;
}

.public-mode .main {
  min-height: calc(100vh - 67px);
}

.public-mode .view {
  max-width: none;
}

.brand {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  background: linear-gradient(135deg, var(--nav-strong), var(--action) 58%, var(--honor));
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(20, 43, 39, 0.28);
  font-weight: 400;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: var(--text-lg);
}

.brand small {
  color: #8ea09a;
  display: block;
  margin-top: 2px;
}

.nav-section-title {
  padding: 18px 10px 8px;
  color: #81948e;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group a {
  position: relative;
  padding: 10px 12px 10px 14px;
  border-radius: 8px;
  color: #c7d4d0;
  font-weight: 400;
}

.nav-group a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav-group a:hover,
.nav-group a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-group a.active::before {
  background: var(--action);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 245, 0.88);
  backdrop-filter: blur(18px);
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  min-height: 42px;
  max-width: 560px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.search-box span {
  color: var(--muted);
  font-size: 20px;
}

.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.status-pill {
  background: var(--warning-soft);
  color: var(--warning);
}

.tag.green {
  background: var(--success-soft);
  color: var(--success);
}

.tag.gold {
  background: var(--honor-soft);
  color: var(--honor-strong);
}

.tag.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.tag.blue {
  background: var(--info-soft);
  color: var(--info);
}

.primary-button,
.ghost-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.primary-button {
  padding: 0 15px;
  border: 1px solid var(--action-hover);
  background: linear-gradient(180deg, var(--action), var(--action-hover));
  color: white;
  font-weight: 400;
  box-shadow: 0 10px 22px rgba(163, 58, 49, 0.2);
}

.ghost-button {
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.primary-button:active,
.ghost-button:active,
.icon-button:active {
  transform: translateY(0);
}

.ghost-button:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  background: #f9fbfa;
}

.icon-button {
  width: 40px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.mobile-menu {
  display: none;
}

.view {
  padding: 28px;
  max-width: 1480px;
}

.site-hero {
  position: relative;
  min-height: 470px;
  display: grid;
  align-content: center;
  justify-items: center;
  margin: -28px -28px 24px;
  padding: 54px 28px 100px;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(14, 33, 29, 0.26), rgba(14, 33, 29, 0.88)),
    linear-gradient(90deg, rgba(20, 43, 39, 0.42), rgba(163, 58, 49, 0.17)),
    url("./assets/hfc-hero-arena.png");
  background-size: cover;
  background-position: center;
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: linear-gradient(180deg, transparent, rgba(243, 241, 234, 0.98));
  pointer-events: none;
}

.site-hero-content {
  position: relative;
  top: -40px;
  z-index: 1;
  width: min(760px, 100%);
  max-width: 760px;
  text-align: center;
}

.site-hero .eyebrow {
  color: var(--honor);
}

.site-hero h1 {
  max-width: 760px;
  margin: 8px auto 0;
  font-size: var(--display-lg);
  line-height: 1.04;
}

.site-hero p {
  max-width: 660px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-lg);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.site-hero .primary-button {
  border-color: var(--action-hover);
  background: linear-gradient(180deg, var(--action), var(--action-hover));
  box-shadow: 0 10px 24px rgba(163, 58, 49, 0.24);
}

.hero-search-dock {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  width: min(720px, calc(100% - 56px));
  max-width: 720px;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
}

.hero-search label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.72);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.22);
}

.hero-search-box input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: rgba(255,255,255,0.1);
  outline: 0;
}

.hero-search-box input::placeholder {
  color: rgba(255,255,255,0.58);
}

.hero-search-box input:focus {
  box-shadow: 0 0 0 3px rgba(163, 58, 49, 0.3);
}

.hero-search-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.hero-search-result,
.hero-search-hint {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(16, 24, 21, 0.58);
  backdrop-filter: blur(14px);
}

.hero-search-result:hover {
  border-color: rgba(208, 169, 87, 0.5);
  background: rgba(16, 24, 21, 0.76);
}

.hero-search-result span {
  grid-row: span 2;
  display: inline-flex;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--nav-strong);
  background: var(--honor);
  font-size: var(--text-xs);
  font-weight: 400;
}

.hero-search-result strong {
  line-height: 1.2;
}

.hero-search-result small {
  color: rgba(255,255,255,0.66);
}

.hero-search-hint {
  display: block;
  color: rgba(255,255,255,0.68);
}

.hero-ghost {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-ghost:hover {
  background: rgba(255,255,255,0.16);
  color: #ffffff;
}

.hero-stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 880px;
  margin-top: 34px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.hero-stat-strip span {
  display: grid;
  gap: 3px;
  padding: 15px 16px;
  color: rgba(255,255,255,0.72);
  background: rgba(255,255,255,0.04);
}

.hero-stat-strip strong {
  color: #ffffff;
  font-size: 26px;
}

.home-ranking-stage {
  display: grid;
  gap: 18px;
  margin: 0 0 18px;
  padding: 26px;
  border: 1px solid rgba(20, 43, 39, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,250,248,0.94)),
    linear-gradient(90deg, rgba(20, 43, 39, 0.08), transparent 44%);
  box-shadow: var(--shadow);
}

.home-ranking-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.home-ranking-head h2 {
  font-size: var(--title-sm);
}

.home-ranking-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
}

.home-ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ranking-feature-card {
  display: grid;
  gap: 10px;
  min-height: 178px;
  padding: 18px;
  border: 1px solid rgba(20, 43, 39, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(160deg, var(--panel), #f8f6f0);
  box-shadow: var(--shadow-soft);
}

.ranking-feature-card span {
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ranking-feature-card strong {
  font-size: var(--title-sm);
}

.ranking-feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ranking-feature-card a {
  align-self: end;
  color: var(--action);
  font-weight: 400;
}

.ranking-feature-card.accent {
  background:
    linear-gradient(160deg, var(--honor-soft), var(--panel));
  border-color: rgba(208, 169, 87, 0.28);
}

.ranking-feature-card.dark {
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--nav-strong), var(--nav));
  border-color: rgba(255,255,255,0.14);
}

.ranking-feature-card.dark span,
.ranking-feature-card.dark a {
  color: var(--honor);
}

.ranking-feature-card.dark p {
  color: rgba(255,255,255,0.72);
}

.home-ranking-board {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.home-ranking-board > div,
.home-ranking-board > aside {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-compact-list,
.city-leader-list {
  display: grid;
  gap: 10px;
}

.ranking-compact-list a,
.city-leader-list a,
.city-leader-list div {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.ranking-compact-list a:hover,
.city-leader-list a:hover {
  border-color: rgba(163, 58, 49, 0.28);
  background: var(--action-soft);
}

.ranking-compact-list strong,
.city-leader-list strong {
  font-size: var(--text-lg);
}

.ranking-compact-list small,
.city-leader-list small {
  grid-column: 3;
  color: var(--muted);
}

.ranking-compact-list b {
  grid-column: 4;
  grid-row: span 2;
  color: var(--ink);
  font-size: var(--title-sm);
}

.ranking-compact-list .rank-no,
.ranking-compact-list .mini-athlete-avatar,
.city-leader-list a > span:first-child,
.city-leader-list .mini-athlete-avatar {
  grid-row: span 2;
}

.city-leader-list a > span:first-child {
  min-width: 46px;
  color: var(--action);
  font-weight: 400;
}

.mini-athlete-avatar {
  width: 42px;
  aspect-ratio: 1;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background:
    repeating-linear-gradient(135deg, var(--nav-strong), var(--nav-strong) 5px, var(--action) 5px, var(--action) 10px);
  box-shadow: inset 0 0 0 2px var(--honor);
  overflow: hidden;
}

.mini-athlete-avatar img,
.mini-athlete-avatar i {
  width: 36px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  object-fit: cover;
  font-style: normal;
  font-size: var(--text-lg);
  font-weight: 400;
}

.ranking-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(20, 43, 39, 0.18);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(120deg, var(--nav-strong), var(--nav)),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  box-shadow: var(--shadow);
}

.ranking-hero h1 {
  margin-top: 6px;
  font-size: var(--title-lg);
}

.ranking-hero .subtle {
  max-width: 760px;
  margin: 8px 0 0;
  color: rgba(255,255,255,0.72);
}

.ranking-hero-meta {
  min-width: 220px;
  display: grid;
  gap: 8px;
  text-align: right;
}

.ranking-hero-meta span {
  color: rgba(255,255,255,0.74);
}

.ranking-hero-meta strong {
  display: block;
  color: #ffffff;
  font-size: var(--title-md);
  line-height: 1;
}

.public-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid rgba(20, 43, 39, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.97), rgba(243,241,234,0.92)),
    linear-gradient(90deg, rgba(163, 58, 49, 0.07), transparent 42%);
  box-shadow: var(--shadow-soft);
}

.public-page-head h1 {
  margin-top: 6px;
  font-size: var(--title-lg);
}

.public-page-head p {
  max-width: 780px;
  margin: 8px 0 0;
}

.public-count {
  min-width: 128px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(20, 43, 39, 0.16);
  background: #ffffff;
  color: var(--action);
  font-weight: 400;
  box-shadow: var(--shadow-soft);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin: 34px -28px -28px;
  padding: 30px 28px;
  color: #d8e2de;
  background: var(--nav);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer strong {
  display: block;
  color: #ffffff;
  font-size: var(--text-lg);
}

.site-footer p {
  max-width: 520px;
  margin: 8px 0 0;
  color: #91a29c;
}

.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer a {
  color: #d8e2de;
  font-weight: 400;
}

.site-footer a:hover {
  color: #ffffff;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 4px;
}

.admin-mode .page-head {
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--panel), var(--panel-soft));
  box-shadow: var(--shadow-soft);
}

.admin-mode .page-head h1 {
  font-size: var(--title-md);
}

.page-head p {
  max-width: 780px;
  margin: 8px 0 0;
}

.page-head-actions {
  margin-top: 0;
}

.eyebrow {
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: var(--title-md);
  margin-top: 5px;
  line-height: 1.18;
}

h2 {
  font-size: var(--title-sm);
  line-height: 1.25;
}

h3 {
  font-size: var(--text-lg);
}

.subtle {
  color: var(--muted);
  line-height: 1.65;
}

.positive {
  color: var(--success);
}

.negative {
  color: var(--danger);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .site-hero-content,
  .hero-stat-strip,
  .ranking-hero,
  .public-page-head,
  .panel,
  .task {
    animation: soft-enter 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-stat-strip,
  .panel:nth-of-type(2),
  .task:nth-child(2) {
    animation-delay: 0.06s;
  }

  .task:nth-child(3),
  .panel:nth-of-type(3) {
    animation-delay: 0.1s;
  }
}

@keyframes soft-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-pad {
  padding: 20px;
}

.metric {
  display: grid;
  gap: 8px;
  position: relative;
}

.metric::after {
  content: "";
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--action), var(--honor));
}

.metric strong {
  font-size: var(--title-md);
  line-height: 1;
}

.metric span {
  color: var(--muted);
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

select,
.field input,
.field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px 10px;
  color: var(--ink);
}

select:hover,
.field input:hover,
.field textarea:hover {
  border-color: var(--line-strong);
}

select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--action);
  background: var(--panel);
  box-shadow: 0 0 0 4px rgba(163, 58, 49, 0.22);
  outline: 0;
}

.highlight-row {
  animation: highlightFade 2s ease forwards;
}
@keyframes highlightFade {
  0%   { background: #d4f5e2; }
  70%  { background: #d4f5e2; }
  100% { background: transparent; }
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.table-wrap table {
  min-width: max-content;
}
@media (max-width: 768px) {
  .table-wrap table {
    font-size: 13px;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 8px 10px;
    white-space: nowrap;
  }
}

.athlete-card-section,
.ranking-table-section {
  padding: 20px;
}

.ranking-table-section {
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.athlete-directory-panel {
  display: grid;
  gap: 18px;
}

.athlete-directory-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.athlete-directory-search input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.athlete-directory-search input:focus {
  box-shadow: 0 0 0 3px rgba(163, 58, 49, 0.22);
}

.athlete-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(136px, 1fr));
  gap: 12px;
}

.athlete-card {
  min-width: 0;
  min-height: 226px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 22px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbfcfb);
  box-shadow: 0 8px 20px rgba(17, 26, 23, 0.04);
  text-align: center;
}

.athlete-card:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 58, 49, 0.28);
  box-shadow: 0 16px 34px rgba(17, 26, 23, 0.1);
}

.athlete-card-photo {
  position: relative;
  width: 94px;
  aspect-ratio: 1;
  margin-bottom: 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, var(--nav-strong), var(--nav-strong) 5px, var(--action) 5px, var(--action) 10px);
  box-shadow: inset 0 0 0 3px var(--honor), 0 10px 24px rgba(20, 43, 39, 0.14);
}

.athlete-card-photo img,
.athlete-card-photo > span {
  width: 84px;
  aspect-ratio: 1;
  border-radius: 999px;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  font-size: var(--title-lg);
  font-weight: 400;
}

.athlete-card-photo b {
  position: absolute;
  left: 50%;
  bottom: -9px;
  min-width: 72px;
  min-height: 21px;
  display: inline-grid;
  place-items: center;
  transform: translateX(-50%);
  border: 1px solid var(--honor);
  border-radius: 999px;
  color: var(--honor-strong);
  background: #ffffff;
  font-size: var(--text-sm);
  line-height: 1;
}

.athlete-card > strong {
  max-width: 100%;
  margin-top: 6px;
  color: #050b12;
  font-size: var(--text-lg);
  line-height: 1.2;
}

.athlete-card > small {
  max-width: 100%;
  min-height: 40px;
  color: var(--muted);
  line-height: 1.45;
}

.athlete-card-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.athlete-card-meta span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

.athlete-card-points {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
  font-weight: 400;
}

.athlete-card-points span {
  color: var(--muted);
  font-size: var(--text-xs);
}

.athlete-card-points b {
  font-size: var(--title-sm);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: var(--text-xs);
  background: var(--panel-soft);
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

th:first-child,
td:first-child {
  padding-left: 18px;
}

th:last-child,
td:last-child {
  padding-right: 18px;
}

tr:hover td {
  background: var(--action-soft);
}

.table-athlete-cell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-width: 190px;
}

.rank-no {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #edf2ef;
  font-weight: 400;
  color: #33413c;
}

.rank-no.top {
  background: linear-gradient(180deg, #fffaf0, var(--honor-soft));
  color: var(--honor-strong);
  box-shadow: inset 0 0 0 1px rgba(208, 169, 87, 0.34);
}

.athlete-link,
.club-link,
.event-link {
  color: var(--action);
  font-weight: 400;
}

.athlete-link:hover,
.club-link:hover,
.event-link:hover {
  color: var(--action-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-detail-page {
  display: grid;
  gap: 16px;
  min-width: 0;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.event-detail-hero,
.event-status-panel,
.event-description-panel,
.event-organizer-panel,
.event-not-found {
  border: 1px solid rgba(20, 43, 39, 0.14);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.event-detail-hero {
  padding: 28px;
  color: #f5f7f5;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    linear-gradient(120deg, var(--nav), #295849);
}

.event-detail-topline,
.event-detail-hero-title,
.event-organizer-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.event-detail-topline {
  align-items: center;
}

.event-detail-topline .eyebrow,
.event-detail-topline a {
  color: rgba(255,255,255,0.8);
}

.event-detail-topline a:hover {
  color: #ffffff;
}

.event-detail-hero-title {
  align-items: end;
  margin-top: 34px;
}

.event-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-detail-hero h1 {
  margin: 10px 0 0;
  color: #ffffff;
  font-size: clamp(30px, 5vw, 52px);
  overflow-wrap: anywhere;
}

.event-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.event-hero-meta div {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.event-hero-meta dt,
.event-status-panel dt {
  color: var(--muted);
  font-size: var(--text-sm);
}

.event-hero-meta dt {
  color: rgba(255,255,255,0.66);
}

.event-hero-meta dd,
.event-status-panel dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.event-status-panel,
.event-description-panel,
.event-organizer-panel {
  min-width: 0;
  padding: 24px;
  background: #ffffff;
}

.event-status-panel > span,
.event-description-panel > span,
.event-organizer-copy > span {
  color: var(--action);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.09em;
}

.event-status-panel h2,
.event-description-panel h2,
.event-organizer-panel h2 {
  margin: 7px 0 14px;
}

.event-status-panel dl {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.event-status-panel dl div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.event-description-panel p,
.event-organizer-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.event-organizer-panel {
  align-items: center;
}

.organizer-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.org-role-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(20,43,39,0.08);
  color: #4a6360;
  flex-shrink: 0;
}

.form-section-title {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #4a6360;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(20,43,39,0.10);
  padding-bottom: 6px;
  margin: 0;
}

.organizer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.organizer-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 400;
  color: #4a6360;
  border-bottom: 1px solid rgba(20,43,39,0.12);
}

.organizer-table td {
  padding: 5px 6px;
}

.organizer-table input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid rgba(20,43,39,0.18);
  border-radius: 6px;
  font-size: 13px;
}

.btn-sm {
  padding: 4px 10px !important;
  font-size: 12px !important;
}

/* 授权管理板块 */
.auth-id-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-id-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 43, 39, 0.07);
  border: 1px solid rgba(20, 43, 39, 0.15);
  border-radius: 20px;
  padding: 3px 10px 3px 12px;
  font-size: 13px;
  font-family: monospace;
}

.auth-id-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s;
}
.auth-id-remove:hover { color: #c0392b; }

.auth-id-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.event-organizer-copy {
  min-width: 0;
}

.event-organizer-copy .primary-button {
  display: inline-flex;
  margin-top: 18px;
}

.event-qr-link {
  display: grid;
  flex: 0 0 172px;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--action);
  font-size: var(--text-sm);
  font-weight: 400;
  text-align: center;
}

.event-qr-image {
  width: 150px;
  height: 150px;
  max-width: 100%;
  object-fit: contain;
}

.event-qr-empty {
  min-width: 160px;
  text-align: right;
}

.split {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 16px;
}

.split > .panel,
.admin-layout > .panel,
.grid > .panel,
.grid > .task {
  min-width: 0;
}

.profile-head {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
}

.profile-head h1 {
  margin-top: 0;
}

.avatar {
  width: 92px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), var(--shadow-soft);
  font-size: var(--title-md);
  font-weight: 400;
}

.image-avatar {
  object-fit: cover;
  background: var(--panel-soft);
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.info-row span:first-child {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 98px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: 0 6px 16px rgba(17, 26, 23, 0.04);
}

.timeline-item.compact {
  grid-template-columns: 1fr;
  gap: 8px;
}

.timeline-item.compact > .tag {
  justify-self: start;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

.kanban {
  display: grid;
  gap: 10px;
}

.task {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  box-shadow: 0 8px 18px rgba(17, 26, 23, 0.04);
}

.task strong {
  font-size: var(--text-base);
}

.home-event-card {
  display:grid;
  grid-template-columns:38% minmax(0,1fr);
  overflow:hidden;
  min-height:148px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  box-shadow:var(--shadow-soft);
}

.home-event-card:hover {
  border-color:rgba(163,58,49,.32);
  transform:translateY(-1px);
}

.home-event-card-cover {
  min-height:100%;
  background:
    linear-gradient(135deg, rgba(20,43,39,.26), rgba(163,58,49,.34)),
    var(--panel-soft);
  background-position:center;
  background-size:cover;
}

.home-event-card-body {
  display:grid;
  align-content:center;
  justify-items:start;
  gap:8px;
  min-width:0;
  padding:18px;
}

.home-event-card-body strong {
  color:var(--ink);
  font-size:var(--text-lg);
  line-height:1.35;
}

.home-event-card-body small {
  color:var(--muted);
  line-height:1.55;
}

.home-event-card-body em { font-style:normal; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

.notice {
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(73, 100, 119, 0.24);
  background: var(--info-soft);
  color: var(--info);
  line-height: 1.6;
}

/* Toast notifications */
#toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 9999; pointer-events: none;
}
.toast {
  padding: 11px 20px; border-radius: 10px;
  font-size: .88rem; font-weight: 400; line-height: 1.4;
  max-width: min(420px, 90vw); text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  pointer-events: auto;
  animation: toast-in .22s ease forwards;
}
.toast.toast-success { background: #1a7f4e; color: #fff; }
.toast.toast-error   { background: #c0392b; color: #fff; }
.toast.toast-info    { background: #1a5f9e; color: #fff; }
.toast.toast-out     { animation: toast-out .25s ease forwards; }
@keyframes toast-in  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(8px); } }

/* Inline form message */
.form-message {
  display: none; padding: 11px 14px; border-radius: 8px;
  font-size: .86rem; line-height: 1.5; margin-bottom: 4px;
}
.form-message.visible { display: block; }
.form-message.error   { background: #fdecea; color: #c0392b; border: 1px solid #f5b8b2; }
.form-message.success { background: #e6f7ef; color: #1a7f4e; border: 1px solid #a3dfc0; }

.club-cover {
  position: relative;
  min-height: 156px;
  margin: -18px -18px 16px;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 26, 23, 0.18), rgba(17, 26, 23, 0.58)),
    linear-gradient(120deg, var(--nav), var(--action-hover));
}

.club-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 30px 30px;
}

.club-cover.south {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.12), rgba(21, 32, 29, 0.5)),
    linear-gradient(120deg, var(--nav), var(--action));
}

.club-cover.limit {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.12), rgba(21, 32, 29, 0.5)),
    linear-gradient(145deg, var(--nav-strong), var(--action-hover));
}

.club-cover.capital {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.12), rgba(21, 32, 29, 0.5)),
    linear-gradient(110deg, var(--nav-strong), var(--action));
}

.club-logo {
  position: absolute;
  z-index: 1;
  left: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  font-size: 26px;
  font-weight: 400;
  box-shadow: 0 12px 26px rgba(17, 26, 23, 0.18);
}

.athlete-profile-hero,
.club-profile-hero {
  position: relative;
  display: grid;
  gap: 22px;
  min-height: 342px;
  margin: -4px 0 18px;
  padding: 30px;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--nav-strong), var(--nav)),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  box-shadow: var(--shadow);
}

.athlete-profile-hero::after,
.club-profile-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.athlete-hero-bg,
.club-profile-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.36;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    linear-gradient(120deg, var(--nav-strong), var(--nav) 54%, var(--action));
}

.athlete-identity,
.club-profile-content,
.profile-kpis,
.athlete-profile-hero > .ghost-button,
.club-profile-hero > .ghost-button {
  position: relative;
  z-index: 1;
}

.athlete-identity,
.club-profile-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: end;
  max-width: 920px;
}

.profile-avatar-large,
.club-profile-logo {
  width: 138px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.32);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  box-shadow: 0 22px 46px rgba(0,0,0,0.28);
  font-size: 48px;
  font-weight: 400;
}

.profile-avatar-large.image-avatar {
  object-fit: cover;
  background: var(--panel-soft);
}

.athlete-identity h1,
.club-profile-content h1 {
  max-width: 850px;
  margin: 8px 0 0;
  font-size: var(--title-lg);
  line-height: 1.06;
}

.athlete-identity p,
.club-profile-content p {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.76);
  font-size: var(--text-lg);
}

.athlete-identity a,
.club-profile-content a {
  color: #ffffff;
  font-weight: 400;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.profile-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 980px;
  margin-top: auto;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.profile-kpis article {
  display: grid;
  gap: 5px;
  padding: 16px;
  background: rgba(255,255,255,0.06);
}

.profile-kpis span,
.profile-kpis small {
  color: rgba(255,255,255,0.68);
}

.profile-kpis strong {
  color: #ffffff;
  font-size: var(--title-md);
  line-height: 1;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.72fr);
  gap: 16px;
  align-items: start;
}

/* Desktop detail pages use a focused reading canvas without changing phone layouts. */
@media (min-width: 1081px) {
  .athlete-profile-hero,
  .profile-layout {
    width: min(66.6667vw, 1200px);
    margin-inline: auto;
  }
}

.profile-aside {
  display: grid;
  gap: 16px;
}

.profile-card-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-card-title p {
  margin: 6px 0 0;
}

.profile-privacy-note {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(73, 100, 119, 0.2);
  border-radius: 8px;
  background: var(--info-soft);
  color: var(--info);
}

.profile-privacy-note span {
  line-height: 1.65;
}

.club-profile-hero {
  min-height: 310px;
  align-content: end;
}

.club-profile-cover.south {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.16), rgba(21, 32, 29, 0.62)),
    linear-gradient(120deg, var(--nav), var(--action));
}

.club-profile-cover.limit {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.16), rgba(21, 32, 29, 0.62)),
    linear-gradient(145deg, var(--nav-strong), var(--action-hover));
}

.club-profile-cover.capital {
  background:
    linear-gradient(135deg, rgba(21, 32, 29, 0.16), rgba(21, 32, 29, 0.62)),
    linear-gradient(110deg, var(--nav-strong), var(--action));
}

.club-profile-logo {
  width: 116px;
  color: var(--ink);
  border-color: rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.96);
  font-size: var(--title-lg);
}

.profile-tabs {
  display: flex;
  gap: 6px;
  margin: -2px 0 16px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

.profile-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.profile-tabs a:first-child {
  color: #ffffff;
  background: var(--action);
}

.profile-tabs a:hover {
  color: var(--action);
  background: var(--action-soft);
}

.profile-tabs a:first-child:hover {
  color: #ffffff;
  background: var(--action-hover);
}

.athlete-profile-stacked {
  gap: 0;
  min-height: auto;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
}

.athlete-profile-stacked::after {
  display: none;
}

.athlete-profile-stacked .athlete-hero-bg {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(16,24,21,0.2), rgba(16,24,21,0.68)),
    linear-gradient(120deg, rgba(20,43,39,0.94), rgba(20,43,39,0.84) 55%, rgba(163,58,49,0.76)),
    url("assets/hfc-hero-arena.png");
  background-size: cover;
  background-position: center;
}

.athlete-visual-stage {
  position: relative;
  z-index: 1;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 44px 24px 34px;
  overflow: hidden;
}

.athlete-visual-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}

.athlete-portrait-large {
  position: relative;
  z-index: 1;
  width: 210px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 4px solid rgba(255,255,255,0.86);
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, var(--nav-strong), var(--nav-strong) 7px, var(--nav) 7px, var(--nav) 14px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.32);
  font-size: 72px;
  font-weight: 400;
}

.athlete-portrait-large.image-avatar {
  object-fit: cover;
}

.athlete-visual-badge {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(16,24,21,0.58);
  backdrop-filter: blur(14px);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.athlete-identity-below {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-end;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.athlete-profile-actions,
.athlete-account-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.athlete-profile-actions > .athlete-account-controls {
  display: inline-flex;
  width: auto;
  margin-top: 0;
}

.athlete-account-area {
  width: min(66.6667vw, 1200px);
  margin: 16px auto 0;
}

.athlete-identity-below h1 {
  margin-top: 6px;
  font-size: var(--title-lg);
}

.athlete-identity-below p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-lg);
}

.athlete-identity-below a {
  color: var(--action);
  font-weight: 400;
}

.athlete-profile-stacked .profile-kpis {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #111a17;
}

.athlete-profile-stacked .profile-kpis article {
  background: rgba(255,255,255,0.04);
}

.club-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.club-hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 16px;
  margin-top: 16px;
}

.featured-athlete-card {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #ffffff, #f6faf8);
}

.featured-athlete-card:hover {
  border-color: rgba(163, 58, 49, 0.26);
  box-shadow: var(--shadow-soft);
}

.featured-athlete-card img,
.featured-athlete-card > span {
  width: 94px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  font-size: var(--title-lg);
  font-weight: 400;
}

.featured-athlete-card div {
  display: grid;
  gap: 6px;
}

.featured-athlete-card strong {
  font-size: var(--title-sm);
}

.featured-athlete-card small {
  color: var(--muted);
}

.featured-athlete-card b {
  color: var(--ink);
  font-size: var(--title-sm);
}

.club-cert-card .info-list {
  margin-top: 16px;
}

.advisor-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  min-height: 300px;
  margin-bottom: 18px;
  padding: 30px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--nav-strong), var(--nav)),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: auto, 42px 42px;
  box-shadow: var(--shadow);
}

.advisor-hero .eyebrow {
  color: var(--honor);
}

.advisor-hero h1 {
  max-width: 760px;
  margin-top: 8px;
  font-size: var(--title-lg);
}

.advisor-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: var(--text-lg);
  line-height: 1.8;
}

.advisor-hero > span {
  min-width: 160px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  font-weight: 400;
}

.advisor-person-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.advisor-person-card {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 310px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.advisor-person-card:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 58, 49, 0.24);
  box-shadow: 0 16px 34px rgba(17, 26, 23, 0.1);
}

.advisor-person-photo {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 3px solid #ffffff;
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, var(--nav-strong), var(--nav-strong) 7px, var(--nav) 7px, var(--nav) 14px);
  font-size: var(--title-md);
  font-weight: 400;
  box-shadow: inset 0 0 0 3px var(--honor), 0 14px 30px rgba(20, 43, 39, 0.16);
}

img.advisor-person-photo,
img.advisor-detail-photo,
img.advisor-admin-photo {
  object-fit: cover;
}

.advisor-admin-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.advisor-admin-photo {
  width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #ffffff;
  background:
    repeating-linear-gradient(135deg, var(--nav-strong), var(--nav-strong) 7px, var(--nav) 7px, var(--nav) 14px);
  font-size: var(--text-sm);
  font-weight: 400;
  box-shadow: inset 0 0 0 2px #ffffff, 0 8px 18px rgba(17, 26, 23, 0.12);
}

.advisor-person-card span {
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.advisor-person-card h2 {
  margin-top: 6px;
  font-size: var(--text-lg);
}

.advisor-person-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.advisor-person-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.advisor-person-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.advisor-person-card b {
  display: block;
  margin-top: 14px;
  color: var(--action);
  font-size: var(--text-sm);
}

.advisor-empty {
  grid-column: 1 / -1;
  padding: 46px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  background: var(--panel);
}

.advisor-empty strong {
  font-size: var(--title-sm);
}

.advisor-empty p {
  margin: 8px 0 0;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}

.advisor-modal-backdrop {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(8, 20, 17, 0.78);
  backdrop-filter: blur(8px);
}

.advisor-modal-backdrop.open {
  display: grid;
}

.advisor-modal-panel {
  position: relative;
  width: min(900px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 34px;
  border: 1px solid rgba(208, 169, 87, 0.42);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.advisor-modal-close {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 24px;
  cursor: pointer;
}

.advisor-modal-profile {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 6px 50px 28px 0;
}

.advisor-modal-photo {
  width: 160px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--nav), var(--nav-strong));
  box-shadow: inset 0 0 0 3px var(--honor), 0 18px 38px rgba(20, 43, 39, 0.2);
  font-size: var(--title-lg);
  font-weight: 400;
  object-fit: cover;
}

.advisor-modal-profile span,
.advisor-modal-introduction span {
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.advisor-modal-profile h2 {
  margin: 8px 0 0;
  font-size: var(--title-md);
}

.advisor-modal-profile strong {
  display: block;
  margin-top: 7px;
  font-size: var(--text-lg);
}

.advisor-modal-profile p {
  margin: 7px 0 0;
  color: var(--muted);
}

.advisor-modal-introduction {
  padding: 24px;
  border-top: 1px solid var(--line);
}

.advisor-modal-introduction h3 {
  margin: 7px 0 0;
  font-size: var(--text-lg);
}

.advisor-modal-introduction p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 560px) {
  .advisor-modal-backdrop {
    padding: 10px;
  }

  .advisor-modal-panel {
    max-height: calc(100vh - 20px);
    padding: 24px 20px;
    border-radius: 14px;
  }

  .advisor-modal-profile {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 4px 44px 22px 0;
  }

  .advisor-modal-photo {
    width: 108px;
  }

  .advisor-modal-profile h2 {
    font-size: var(--title-sm);
  }

}

.advisor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.advisor-tags em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--action-soft);
  color: var(--action);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 400;
}

.advisor-detail-hero {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 30px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, var(--nav-strong), var(--nav)),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: auto, 42px 42px;
  box-shadow: var(--shadow);
}

.advisor-detail-photo {
  width: 180px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.28);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--nav), var(--action-hover));
  font-size: 56px;
  font-weight: 400;
  box-shadow: 0 22px 46px rgba(0,0,0,0.28);
}

.advisor-detail-hero .eyebrow {
  color: var(--honor);
}

.advisor-detail-hero h1 {
  margin-top: 8px;
  font-size: var(--title-lg);
}

.advisor-detail-hero p {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.74);
  font-size: var(--text-lg);
}

.advisor-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.advisor-detail-text {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.8;
}

.roster-rank {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin-right: 10px;
  border-radius: 8px;
  background: #edf2ef;
  color: #33413c;
  font-size: var(--text-sm);
  font-weight: 400;
}

.rule-list {
  display: grid;
  gap: 12px;
}

.rule-list article {
  padding: 16px;
  border-left: 4px solid var(--action);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.rules-help-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.help-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.help-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.help-search input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.help-search input:focus {
  box-shadow: 0 0 0 3px rgba(163, 58, 49, 0.18);
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

.faq-item summary {
  min-height: 50px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 400;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--action-soft);
  color: var(--action);
  font-size: var(--text-lg);
  font-weight: 400;
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item p {
  margin: 0;
  padding: 14px 15px 16px;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: 280px;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    display: block;
  }

  .public-mode .sidebar { display: none; }

  .public-mode .sidebar.open {
    display: grid;
    position: fixed;
    z-index: 30;
    width: min(82vw, 320px);
    inset: 0 auto 0 0;
    box-shadow: 12px 0 36px rgba(17, 26, 23, 0.18);
  }

  .public-mode .mobile-menu { display: inline-flex; }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .grid.cols-4,
  .grid.cols-3,
  .split,
  .admin-layout,
  .profile-layout,
  .club-meta-grid,
  .home-ranking-grid,
  .home-ranking-board,
  .club-hub-layout {
    grid-template-columns: 1fr;
  }

  .rules-help-layout {
    grid-template-columns: 1fr;
  }

  .advisor-hero,
  .advisor-person-grid,
  .advisor-detail-layout {
    grid-template-columns: 1fr;
  }

  .advisor-person-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advisor-hero {
    display: grid;
    align-items: start;
  }

  .advisor-detail-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .profile-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-ranking-head {
    display: grid;
    align-items: start;
  }

  .athlete-card-grid {
    grid-template-columns: repeat(3, minmax(136px, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-hero {
    min-height: 450px;
  }

  .site-hero h1 {
    font-size: var(--title-lg);
  }

  .hero-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-hero,
  .public-page-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .ranking-hero-meta {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .event-detail-hero,
  .event-status-panel,
  .event-description-panel,
  .event-organizer-panel {
    padding: 20px;
  }

  .event-detail-topline,
  .event-detail-hero-title,
  .event-organizer-panel {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .event-detail-hero-title {
    margin-top: 24px;
  }

  .event-hero-meta,
  .event-detail-grid {
    grid-template-columns: 1fr;
  }

  .event-hero-meta {
    gap: 10px;
    margin-top: 22px;
  }

  .event-qr-link {
    justify-self: start;
  }

  .event-qr-empty {
    min-width: 0;
    text-align: left;
  }

  .topbar {
    padding: 12px;
    gap: 10px;
  }

  .public-mode .sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
  }

  .public-mode .sidebar .nav-group:first-of-type {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .public-mode .brand {
    min-width: 0;
  }

  .topbar-actions .status-pill {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .primary-button,
  .topbar-actions .ghost-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .search-box {
    min-height: 38px;
    padding: 0 10px;
  }

  .view {
    padding: 16px;
  }

  .site-hero {
    min-height: 500px;
    margin: -16px -16px 18px;
    padding: 42px 16px 148px;
    background-position: 58% center;
  }

  .hero-search-dock {
    bottom: 20px;
    width: calc(100% - 32px);
  }

  .site-hero h1 {
    font-size: 34px;
  }

  .site-hero p {
    font-size: var(--text-base);
  }

  .hero-search-box {
    grid-template-columns: 1fr;
  }

  .hero-search-box .primary-button {
    width: 100%;
  }

  .hero-search-result {
    grid-template-columns: 1fr;
  }

  .hero-search-result span {
    grid-row: auto;
    justify-self: start;
  }

  .hero-stat-strip {
    grid-template-columns: 1fr;
  }

  .ranking-hero,
  .public-page-head,
  .home-ranking-stage {
    padding: 18px;
  }

  .ranking-hero h1,
  .public-page-head h1 {
    font-size: var(--title-md);
  }

  .home-ranking-head h2 {
    font-size: var(--title-md);
  }

  .athlete-profile-hero,
  .club-profile-hero {
    min-height: auto;
    padding: 22px;
  }

  .athlete-profile-stacked {
    padding: 0;
  }

  .athlete-identity,
  .club-profile-content {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .athlete-visual-stage {
    min-height: 260px;
    padding: 34px 18px 28px;
  }

  .athlete-portrait-large {
    width: 164px;
    font-size: 54px;
  }

  .athlete-identity-below {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: 20px;
  }

  .athlete-profile-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .athlete-account-area {
    width: 100%;
  }

  .profile-avatar-large,
  .club-profile-logo {
    width: 112px;
    font-size: var(--title-lg);
  }

  .athlete-identity h1,
  .club-profile-content h1 {
    font-size: var(--title-md);
  }

  .athlete-identity p,
  .club-profile-content p {
    font-size: var(--text-base);
  }

  .profile-kpis {
    grid-template-columns: 1fr;
  }

  .ranking-compact-list a,
  .city-leader-list a,
  .city-leader-list div {
    grid-template-columns: auto auto 1fr auto;
  }

  .featured-athlete-card,
  .advisor-detail-hero {
    grid-template-columns: 1fr;
  }

  .advisor-person-grid {
    grid-template-columns: 1fr;
  }

  .advisor-detail-photo {
    width: 128px;
    font-size: var(--title-lg);
  }

  .athlete-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-directory-search {
    grid-template-columns: 1fr;
  }

  .help-search {
    grid-template-columns: 1fr;
  }

  .mobile-hide {
    display: none;
  }

  table {
    min-width: 520px;
  }

  .table-athlete-cell {
    min-width: 150px;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    margin: 28px -16px -16px;
    padding: 24px 16px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .page-head,
  .profile-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: var(--title-sm);
  }

  h2 {
    font-size: var(--text-lg);
  }

  .panel-pad {
    padding: 16px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .athlete-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Club detail: phase-one public showcase */
.club-detail-page {
  width: min(1320px, 100%);
  min-width: 0;
  display: grid;
  gap: 22px;
  margin: 0 auto;
}

.club-detail-hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: var(--nav-strong);
  box-shadow: 0 26px 64px rgba(14, 33, 29, 0.2);
}

.club-detail-hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(14, 33, 29, 0.98) 0%, rgba(14, 33, 29, 0.82) 42%, rgba(14, 33, 29, 0.35) 100%),
    url("./assets/hfc-hero-arena.png") center 38% / cover;
  transform: scale(1.015);
}

.club-detail-hero-media.south {
  filter: saturate(0.78) sepia(0.08);
  background-position: center 46%;
}

.club-detail-hero-media.limit {
  filter: contrast(1.08) saturate(0.7);
  background-position: center 52%;
}

.club-detail-hero-media.capital {
  filter: contrast(1.04) sepia(0.12);
  background-position: center 44%;
}

.club-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 33, 29, 0.04), rgba(14, 33, 29, 0.88)),
    linear-gradient(114deg, transparent 0 68%, rgba(208, 169, 87, 0.16) 68.1% 68.45%, transparent 68.55%);
  pointer-events: none;
}

.club-detail-hero-grid {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 52%;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: skewX(-10deg) translateX(50px);
  transform-origin: top;
}

.club-detail-hero-content {
  position: relative;
  z-index: 2;
  min-height: 470px;
  display: grid;
  align-content: space-between;
  padding: 28px 38px 40px;
}

.club-detail-hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255,255,255,0.7);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.club-detail-hero-topline a {
  padding: 7px 0;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0;
}

.club-detail-hero-topline a:hover {
  color: var(--honor);
}

.club-detail-identity {
  display: grid;
  grid-template-columns: 104px minmax(0, 760px);
  gap: 24px;
  align-items: end;
}

.club-detail-logo {
  width: 104px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--action), var(--nav-strong) 76%);
  box-shadow: 0 18px 44px rgba(0,0,0,0.28);
  font-size: var(--title-lg);
  font-weight: 400;
}

.club-detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.club-detail-badges,
.club-detail-actions,
.club-detail-hero-meta,
.club-detail-chips,
.club-detail-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.club-detail-badges .tag {
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 7px 20px rgba(0,0,0,0.14);
}

.club-detail-title h1 {
  max-width: 900px;
  margin: 12px 0 0;
  font-size: var(--title-lg);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.club-detail-english {
  margin: 8px 0 0;
  color: var(--honor);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.club-detail-tagline {
  max-width: 680px;
  margin: 14px 0 0;
  color: rgba(255,255,255,0.82);
  font-size: var(--text-lg);
}

.club-detail-hero-meta {
  margin-top: 18px;
  color: rgba(255,255,255,0.68);
  font-size: var(--text-sm);
}

.club-detail-hero-meta span + span::before {
  content: "/";
  margin-right: 9px;
  color: rgba(208,169,87,0.72);
}

.club-detail-actions {
  margin-top: 24px;
}

.club-detail-actions .primary-button,
.club-detail-light-button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 400;
}

.club-detail-light-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.26);
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.club-detail-light-button:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.club-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.club-detail-metrics article {
  position: relative;
  min-width: 0;
  min-height: 138px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.club-detail-metrics article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 92px;
  height: 92px;
  border: 18px solid var(--honor-soft);
  border-radius: 50%;
}

.club-detail-metrics article span,
.club-detail-section-head > div > span,
.club-detail-contact-copy > span {
  display: block;
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.club-detail-metrics article strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: var(--title-md);
  line-height: 1;
  letter-spacing: -0.02em;
}

.club-detail-metrics article small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  color: var(--muted);
}

.club-detail-metrics .club-detail-metric-club {
  background: linear-gradient(145deg, var(--nav), var(--nav-strong));
  color: #ffffff;
  border-color: rgba(255,255,255,0.08);
}

.club-detail-metrics .club-detail-metric-club span {
  color: var(--honor);
}

.club-detail-metrics .club-detail-metric-club small {
  color: rgba(255,255,255,0.64);
}

.club-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.club-detail-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.club-detail-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.club-detail-section-head h2,
.club-detail-contact-copy h2 {
  margin: 4px 0 0;
  font-size: var(--title-sm);
  letter-spacing: -0.01em;
}

.club-detail-source {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 400;
  white-space: nowrap;
}

.club-detail-source.club {
  color: var(--info);
  background: var(--info-soft);
}

.club-detail-source.official {
  color: var(--honor-strong);
  background: var(--honor-soft);
}

.club-detail-lead {
  max-width: 800px;
  margin: 24px 0 0;
  font-size: var(--text-lg);
  line-height: 1.9;
}

.club-detail-history {
  margin-top: 24px;
  padding-left: 18px;
  border-left: 3px solid var(--action);
}

.club-detail-history h3 {
  margin: 0;
  font-size: var(--text-base);
}

.club-detail-history p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.club-detail-facts,
.club-detail-official-list {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
}

.club-detail-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.club-detail-facts > div,
.club-detail-official-list > div {
  display: grid;
  gap: 5px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.club-detail-facts > div:nth-child(odd) {
  padding-right: 22px;
}

.club-detail-facts > div:nth-child(even) {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.club-detail-facts > div:nth-last-child(1) {
  grid-column: 1 / -1;
  padding-left: 0;
  padding-right: 0;
  border-left: 0;
}

.club-detail-facts dt,
.club-detail-official-list dt {
  color: var(--muted);
  font-size: var(--text-xs);
}

.club-detail-facts dd,
.club-detail-official-list dd {
  margin: 0;
  font-weight: 400;
}

.club-detail-chip,
.club-detail-empty-inline {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--text-xs);
}

.club-detail-empty-inline {
  color: var(--muted);
  font-weight: 400;
}

.club-detail-official {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(255,255,255,0.08);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.035), transparent 46%),
    var(--nav);
}

.club-detail-official .club-detail-section-head {
  position: relative;
  z-index: 2;
  border-color: rgba(255,255,255,0.14);
}

.club-detail-official .club-detail-section-head > div > span {
  color: var(--honor);
}

.club-detail-seal {
  position: absolute;
  right: -28px;
  top: 120px;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(208,169,87,0.22);
  border-radius: 50%;
  color: rgba(208,169,87,0.16);
  font-size: 52px;
  font-weight: 400;
  transform: rotate(-12deg);
}

.club-detail-seal span {
  position: absolute;
  bottom: 36px;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.club-detail-official-list {
  position: relative;
  z-index: 1;
}

.club-detail-official-list > div {
  grid-template-columns: 1fr auto;
  align-items: center;
  border-color: rgba(255,255,255,0.12);
}

.club-detail-official-list dt {
  color: rgba(255,255,255,0.58);
}

.club-detail-official-list dd {
  max-width: 180px;
  text-align: right;
  overflow-wrap: anywhere;
}

.club-detail-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.club-detail-gallery-grid figure {
  margin: 0;
}

.club-detail-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.club-detail-gallery-grid figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.club-detail-gallery-empty {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  margin-top: 20px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(20,43,39,0.04), rgba(163,58,49,0.035)),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(20,43,39,0.04) 48px);
}

.club-detail-gallery-empty span {
  color: var(--action);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.club-detail-gallery-empty strong {
  margin-top: 10px;
  font-size: var(--title-sm);
}

.club-detail-gallery-empty p {
  margin: 8px 0 0;
  color: var(--muted);
}

.club-detail-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  box-shadow: 0 22px 50px rgba(14,33,29,0.14);
}

.club-detail-contact-copy,
.club-detail-contact-meta {
  padding: 34px;
  background: var(--nav);
}

.club-detail-contact-copy > span {
  color: var(--honor);
}

.club-detail-contact-copy p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255,255,255,0.72);
  font-size: var(--text-lg);
}

.club-detail-contact-actions {
  margin-top: 24px;
}

.club-detail-wechat-qr {
  margin-top: 22px;
  display: inline-block;
}

.club-detail-wechat-qr-hint {
  margin: 0 0 8px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.52);
  letter-spacing: 0.04em;
}

.club-detail-wechat-qr img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.18);
}

/* 申请表单：微信二维码上传 */
.wechat-qr-upload-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.wechat-qr-upload-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.18s;
  font-size: var(--text-sm);
  color: var(--muted);
}

.wechat-qr-upload-label:hover {
  border-color: var(--action);
  color: var(--action);
}

.wechat-qr-upload-label .upload-icon {
  font-size: 1.25rem;
}

.wechat-qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.club-detail-contact .ghost-button {
  border-color: rgba(255,255,255,0.24);
  color: #ffffff;
  background: rgba(255,255,255,0.08);
}

.club-detail-contact .ghost-button:hover {
  border-color: rgba(255,255,255,0.44);
  background: rgba(255,255,255,0.14);
}

.club-detail-contact-meta {
  display: grid;
  align-content: center;
  gap: 0;
  background: var(--nav-strong);
}

.club-detail-contact-meta > div {
  display: grid;
  gap: 5px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.club-detail-contact-meta > div:last-child {
  border-bottom: 0;
}

.club-detail-contact-meta span {
  color: rgba(255,255,255,0.52);
  font-size: var(--text-xs);
}

.club-detail-contact-meta strong {
  font-size: var(--text-sm);
  font-weight: 400;
}

.club-detail-disclosure {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
}

.club-detail-disclosure > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.club-detail-disclosure p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.club-detail-disclosure > a {
  color: var(--action);
  font-size: var(--text-sm);
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .club-detail-layout,
  .club-detail-contact {
    grid-template-columns: 1fr;
  }

  .club-detail-contact {
    gap: 0;
  }

  .club-detail-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .club-detail-disclosure {
    grid-template-columns: 1fr 1fr;
  }

  .club-detail-disclosure > a {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .club-detail-hero,
  .club-detail-hero-content {
    min-height: 580px;
  }

  .club-detail-hero-content {
    padding: 22px 20px 28px;
  }

  .club-detail-hero-topline {
    display: grid;
    align-items: start;
    overflow-wrap: anywhere;
  }

  .club-detail-hero-topline > span {
    max-width: 150px;
  }

  .club-detail-identity {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .club-detail-logo {
    width: 82px;
  }

  .club-detail-title h1 {
    font-size: var(--title-md);
  }

  .club-detail-hero-meta {
    display: grid;
    gap: 5px;
  }

  .club-detail-hero-meta span + span::before {
    display: none;
  }

  .club-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .club-detail-facts {
    grid-template-columns: 1fr;
  }

  .club-detail-facts > div,
  .club-detail-facts > div:nth-child(odd),
  .club-detail-facts > div:nth-child(even),
  .club-detail-facts > div:nth-last-child(1) {
    grid-column: auto;
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }

  .club-detail-disclosure {
    grid-template-columns: 1fr;
  }

  .club-detail-disclosure > a {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .club-detail-page {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    gap: 16px;
  }

  .club-detail-hero {
    margin: 0 -8px;
    border-radius: 16px;
  }

  .club-detail-hero-grid {
    left: 36%;
  }

  .club-detail-badges {
    gap: 6px;
  }

  .club-detail-actions,
  .club-detail-contact-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .club-detail-actions > *,
  .club-detail-contact-actions > * {
    width: 100%;
  }

  .club-detail-metrics article {
    min-height: 122px;
    padding: 18px;
  }

  .club-detail-metrics article strong {
    font-size: var(--title-md);
  }

  .club-detail-panel,
  .club-detail-contact-copy,
  .club-detail-contact-meta {
    padding: 20px;
  }

  .club-detail-section-head {
    display: grid;
  }

  .club-detail-source {
    justify-self: start;
  }

  .club-detail-gallery-grid {
    grid-template-columns: 1fr;
  }

  .club-detail-official-list > div {
    grid-template-columns: 1fr;
  }

  .club-detail-official-list dd {
    max-width: none;
    text-align: left;
  }

  .club-detail-disclosure > div {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .club-detail-hero-media {
    transform: none;
  }
}

.events-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
  padding: 30px 32px;
  border: 1px solid rgba(208, 169, 87, 0.3);
  border-radius: 16px;
  color: #ffffff;
  background:
    linear-gradient(112deg, rgba(14, 33, 29, 0.98), rgba(20, 43, 39, 0.91) 56%, rgba(163, 58, 49, 0.82)),
    var(--nav);
  box-shadow: var(--shadow);
}

.events-hero h1 {
  margin: 6px 0 0;
  font-size: var(--title-lg);
}

.events-hero .eyebrow {
  color: var(--honor);
}

.events-hero .subtle {
  max-width: 760px;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.events-list-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.home-ranking-board > .home-points-leaders {
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.home-ranking-board > .home-city-leaders {
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.account-center, #accountCenter { display:grid; gap:16px; }
.account-center .ranking-row, #accountCenter .ranking-row { text-decoration:none; color:inherit; }
@media (max-width: 640px) {
  #accountCenter { padding:16px; }
  #accountCenter .ranking-row { min-height:48px; }
}

.event-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.event-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: rgba(163, 58, 49, 0.32);
  box-shadow: var(--shadow);
}

.event-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 76% 22%, rgba(208, 169, 87, 0.45), transparent 25%),
    linear-gradient(138deg, var(--nav-strong), var(--nav) 52%, var(--action));
  background-position: center;
  background-size: cover;
}

.event-card-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
}

.event-card-heading h2 {
  margin: 0;
  font-size: var(--title-sm);
  line-height: 1.25;
}

.event-card-heading .subtle {
  margin: 6px 0 0;
}

.event-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 18px 0;
}

.event-card-meta div {
  min-width: 0;
}

.event-card-meta dt {
  color: var(--muted);
  font-size: var(--text-xs);
}

.event-card-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: var(--text-sm);
  font-weight: 400;
}

.event-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.event-card-footer .event-link {
  margin-left: auto;
  color: var(--action);
  font-size: var(--text-sm);
  font-weight: 400;
}

.event-card-footer .event-link:hover {
  color: var(--action-hover);
}

.event-pairings-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.event-pairings-panel h2 {
  margin: 0;
  font-size: var(--title-sm);
}

.event-pairings-panel .timeline {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .event-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-card-cover {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .events-hero {
    display: grid;
    align-items: start;
    padding: 22px;
  }

  .events-hero h1 {
    font-size: var(--title-md);
  }

  .events-hero .primary-button {
    width: 100%;
  }

  .events-list-section,
  .event-pairings-panel {
    padding: 16px;
  }

  .event-card-grid {
    grid-template-columns: 1fr;
  }

  .event-card-meta {
    grid-template-columns: 1fr;
  }

  .event-card-footer .event-link {
    width: 100%;
    margin-left: 0;
  }
}
/* Material upload card */
.material-list { display:grid; gap:12px; }
.material-upload {
  display:flex; flex-direction:column; gap:0;
  border:1.5px dashed var(--line); border-radius:12px;
  background:var(--panel-soft); overflow:hidden;
  transition:border-color .15s;
}
.material-upload:focus-within { border-color:var(--accent); }
.material-upload-label {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; padding:20px 16px; cursor:pointer; text-align:center;
}
.material-upload-label .upload-icon { font-size:28px; line-height:1; opacity:.55; }
.material-upload-label .upload-title { font-size:.92rem; font-weight: 400; color:var(--ink); }
.material-upload-label .upload-hint { font-size:.78rem; color:var(--ink-subtle); }
.material-upload input[type="file"] { display:none; }
/* preview area */
.material-upload-preview {
  display:none; align-items:center; gap:10px;
  padding:10px 14px; border-top:1px solid var(--line);
  background:var(--panel);
}
.material-upload-preview.has-file { display:flex; }
.material-upload-preview img {
  width:52px; height:52px; object-fit:cover;
  border-radius:6px; border:1px solid var(--line); flex-shrink:0;
}
.material-upload-preview .preview-icon {
  width:52px; height:52px; display:flex; align-items:center; justify-content:center;
  border-radius:6px; border:1px solid var(--line); background:var(--panel-soft);
  font-size:24px; flex-shrink:0;
}
.material-upload-preview .preview-info { flex:1; min-width:0; }
.material-upload-preview .preview-name {
  font-size:.82rem; font-weight: 400; color:var(--ink);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.material-upload-preview .preview-size { font-size:.75rem; color:var(--ink-subtle); }
.material-upload-preview .preview-reselect {
  font-size:.78rem; color:var(--accent); cursor:pointer;
  background:none; border:none; padding:4px 6px; border-radius:6px; flex-shrink:0;
}
.material-upload-preview .preview-reselect:hover { background:var(--panel-soft); }
/* supplementary row */
.material-upload.supplementary { flex-direction:row; align-items:center; gap:10px; padding:10px 14px; }
.material-upload.supplementary .material-upload-label { flex-direction:row; padding:0; flex:0 0 auto; }
.material-upload.supplementary .upload-icon { font-size:18px; }
.material-upload.supplementary .upload-title { font-size:.82rem; }
.material-upload.supplementary .upload-hint { display:none; }
.material-upload.supplementary input[type="text"],
.material-upload.supplementary input[placeholder] { flex:1; min-width:0; }
.material-upload.supplementary .material-upload-preview { border-top:none; border-left:1px solid var(--line); padding:0 0 0 10px; background:none; }
.text-button { border:0; background:transparent; color:var(--red); cursor:pointer; font-size:.82rem; }
@media (max-width: 640px) {
  .material-upload-label { padding:16px 12px; }
  .material-upload.supplementary { flex-direction:column; align-items:stretch; }
  .material-upload.supplementary .material-upload-preview { border-left:none; border-top:1px solid var(--line); padding:8px 0 0 0; }
}
.event-cover-upload-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.event-cover-upload-row input { flex:1 1 220px; }
.event-cover-preview { display:none; width:100%; max-width:320px; aspect-ratio:16 / 9; object-fit:cover; margin-top:10px; border-radius:10px; border:1px solid var(--line); }
.event-cover-preview.is-visible { display:block; }
/* Ranking-entry icon treatment */
.ranking-entry-icon { display:grid; place-items:center; width:46px; height:46px; margin-bottom:4px; border-radius:14px; color:var(--action); background:var(--action-soft); }
.ranking-entry-icon svg { width:28px; height:28px; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.ranking-entry-icon.city { color:var(--honor-strong); background:rgba(208,169,87,.17); }
.ranking-entry-icon.international { color:var(--honor); background:rgba(208,169,87,.13); }
.ranking-feature-card strong { font-weight: 400; }
.ranking-feature-card a { font-weight: 400; }

/* Illustrated ranking-entry cards */
.home-ranking-grid .ranking-feature-card { position:relative; min-height:136px; padding:18px 20px; overflow:hidden; }
.ranking-feature-content { position:relative; z-index:1; display:grid; align-content:start; gap:5px; height:100%; }
.ranking-feature-content span { font-size:var(--text-xs); }
.ranking-feature-content strong { font-size:var(--title-sm); font-weight: 400; }
.ranking-feature-content small { color:var(--muted); font-size:var(--text-sm); }
.ranking-entry-arrow { display:grid; place-items:center; width:26px; height:26px; margin-top:auto; border-radius:50%; color:#fff !important; background:var(--action); font-size:18px; font-weight: 400 !important; line-height:1; }
.ranking-feature-card.accent .ranking-entry-arrow { background:var(--nav); }
.ranking-feature-card.dark .ranking-entry-arrow { background:var(--nav); color:#fff !important; }
.ranking-feature-card.dark .ranking-feature-content small { color:rgba(255,255,255,.72); }
.ranking-feature-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; opacity:.5; filter:saturate(.76) contrast(.9); pointer-events:none; }
.ranking-feature-image.city { opacity:.48; }
.ranking-feature-image.international { opacity:.66; filter:saturate(.66) contrast(.86) brightness(.8); }
@media (max-width:620px) { .home-ranking-grid .ranking-feature-card { min-height:124px; } }

/* Public mobile App chrome */
.mobile-bottom-nav { display:none; }
@media (max-width:620px) {
  .public-mode .sidebar { display:block; padding:10px 16px; }
  .public-mode .brand { min-width:0; grid-template-columns:36px 1fr; gap:8px; }
  .public-mode .brand-mark { width:36px; height:36px; font-size:12px; }
  .public-mode .brand strong { font-size:16px; }
  .public-mode .brand small,
  .public-mode .sidebar .nav-group:first-of-type { display:none; }
  .public-mode .main { min-height:calc(100vh - 56px); }
  .public-mode #view { padding-bottom:84px; }
  .public-mode .site-footer { margin-bottom:0; }
  .site-hero { min-height:400px; margin:-16px -16px 18px; padding:42px 20px 100px; }
  .site-hero-content { top:-14px; }
  .site-hero h1 { font-size:34px; line-height:1.12; }
  .site-hero p { margin-top:12px; font-size:15px; line-height:1.65; }
  .hero-actions { margin-top:18px; }
  .hero-search-dock { bottom:20px; width:calc(100% - 32px); }
  .hero-search label { display:none; }
  .home-ranking-grid { grid-template-columns:1fr; gap:12px; }
  .home-ranking-grid .ranking-feature-card { min-height:132px; }
  .home-ranking-grid .ranking-feature-image { opacity:.44; }
  .home-ranking-grid .ranking-feature-image.international { opacity:.76; }
  .home-ranking-board { display:grid; grid-template-columns:1fr; gap:14px; }
  .home-mobile-ranking-strip { display:flex; gap:12px; margin:0 -4px; padding:0 4px 8px; overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:none; }
  .home-mobile-ranking-strip::-webkit-scrollbar { display:none; }
  .home-mobile-ranking-strip a { flex:0 0 176px; min-height:132px; grid-template-columns:34px 42px 1fr; grid-template-rows:auto auto; padding:14px; scroll-snap-align:start; border-radius:16px; box-shadow:var(--shadow-soft); }
  .home-mobile-ranking-strip .rank-no,.home-mobile-ranking-strip .mini-athlete-avatar { grid-row:span 2; }
  .home-mobile-ranking-strip strong { align-self:end; font-size:16px; }
  .home-mobile-ranking-strip small { grid-column:3; align-self:start; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .home-mobile-ranking-strip b { display:block; grid-column:1 / -1; grid-row:auto; margin-top:8px; font-size:22px; }
  .filters { display:flex; gap:8px; overflow-x:auto; padding:12px; scroll-snap-type:x proximity; scrollbar-width:none; }
  .filters::-webkit-scrollbar { display:none; }
  .filters select,.filters .primary-button { flex:0 0 132px; min-height:44px; scroll-snap-align:start; }
  .filters .primary-button { flex-basis:96px; }
  .ranking-hero { align-items:flex-start; padding:22px 18px; }
  .ranking-hero h1 { font-size:28px; }
  .ranking-hero-meta { align-items:flex-start; }
  .ranking-table-section { display:none; }
  .mobile-ranking-cards { grid-template-columns:1fr; gap:12px; }
  .mobile-ranking-cards .athlete-card { display:grid; grid-template-columns:76px minmax(0,1fr) auto; column-gap:14px; align-items:center; min-height:112px; padding:14px; text-align:left; border-radius:16px; }
  .mobile-ranking-cards .athlete-card-photo { grid-row:span 3; width:70px; margin:0; }
  .mobile-ranking-cards .athlete-card-photo img,.mobile-ranking-cards .athlete-card-photo > span { width:68px; height:68px; }
  .mobile-ranking-cards .athlete-card-photo b { min-width:30px; bottom:-8px; font-size:12px; }
  .mobile-ranking-cards .athlete-card > strong { margin:0; font-size:18px; }
  .mobile-ranking-cards .athlete-card > small { margin:3px 0 0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mobile-ranking-cards .athlete-card-meta { display:none; }
  .mobile-ranking-cards .athlete-card-points { grid-column:3; grid-row:1 / span 3; align-self:center; text-align:right; }
  .mobile-bottom-nav { position:fixed; z-index:30; right:0; bottom:0; left:0; display:grid; grid-template-columns:repeat(5,1fr); min-height:68px; padding:7px max(12px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top:1px solid rgba(20,43,39,.1); background:rgba(255,255,255,.94); box-shadow:0 -8px 28px rgba(18,45,39,.1); backdrop-filter:blur(18px); }
  .mobile-bottom-nav a { display:grid; place-items:center; align-content:center; gap:2px; min-height:48px; color:#71817b; font-size:11px; font-weight: 400; }
  .mobile-bottom-nav i { height:22px; font-size:22px; font-style:normal; line-height:20px; font-weight: 400; }
  .mobile-bottom-nav a.active { color:var(--action); }
  .mobile-bottom-nav a.active i { text-shadow:0 4px 12px rgba(163,58,49,.24); }
}

/* Club discovery list */
.clubs-hero { display:flex; justify-content:space-between; gap:32px; align-items:end; padding:38px 0 24px; }
.athletes-hero { display:flex; justify-content:space-between; gap:32px; align-items:end; padding:38px 0 24px; }
.athlete-library-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:22px; }
.athlete-library-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; width:100%; }
.athlete-desktop-table { display:block; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:16px; }
.athlete-desktop-table table { width:100%; border-collapse:collapse; min-width:850px; }
.athlete-desktop-table th,.athlete-desktop-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; }
.athlete-desktop-table th { color:var(--muted); font-size:13px; background:#fafaf8; }
.athlete-table-person { display:flex; align-items:center; gap:10px; }.athlete-table-person .table-athlete-avatar { width:40px; height:40px; }.athlete-table-person span { display:grid; gap:3px; }.athlete-table-person small { color:var(--muted); }
.athlete-library-mobile { display:none; }
.athlete-mobile-cards { display:none; }
.library-follow-button { min-height:34px; white-space:nowrap; }
.athlete-desktop-table .library-follow-button { min-width:72px; }
.athlete-mobile-cards .library-follow-button { width:100%; margin-top:-10px; }
.athlete-library-cards .athlete-card { min-width:0; min-height:300px; padding:24px; border-radius:16px; }
.athlete-library-grid .athlete-card { min-height:300px; padding:24px; border-radius:16px; }
.athlete-library-grid .athlete-card-photo { width:112px; margin-bottom:8px; }
.athlete-library-grid .athlete-card-photo img,.athlete-library-grid .athlete-card-photo > span { width:104px; }
.clubs-hero h1 { margin:6px 0; }
.clubs-search { display:flex; align-items:center; gap:10px; min-width:300px; padding:12px 16px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.clubs-search input { border:0; outline:0; width:100%; font:inherit; background:transparent; }
.clubs-tools,.clubs-pagination { display:flex; gap:12px; align-items:center; padding:16px; background:#fff; border:1px solid var(--line); border-radius:14px; margin-bottom:18px; }
.clubs-tools select { min-width:170px; }
.club-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.club-discovery-card { overflow:hidden; background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 9px 24px rgba(18,45,39,.08); }
.club-discovery-cover { display:flex; justify-content:space-between; align-items:flex-start; min-height:180px; padding:14px; color:#153c33; background:linear-gradient(135deg,#b8d1c9,#f0e6dc); background-size:cover; background-position:center; }
.club-discovery-cover span,.club-discovery-cover strong { padding:6px 10px; border-radius:8px; background:rgba(255,255,255,.88); font-size:13px; }
.club-discovery-body { padding:18px; }.club-discovery-body h2 { margin:0; font-size:20px; }.club-discovery-body p { color:var(--muted); }
.club-discovery-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding-top:12px; border-top:1px solid var(--line); font-size:13px; }.club-discovery-stats b { line-height:1.7; }
.clubs-pagination { justify-content:flex-end; }.clubs-pagination span { margin-right:auto; color:var(--muted); }
.clubs-empty { padding:40px; text-align:center; background:#fff; border:1px solid var(--line); border-radius:14px; }
@media (max-width:900px) { .club-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.clubs-hero { align-items:stretch; flex-direction:column; }.clubs-search { min-width:0; } }
@media (max-width:620px) { .club-card-grid { grid-template-columns:1fr; }.clubs-tools { flex-direction:column; }.clubs-tools select { width:100%; }.clubs-pagination { justify-content:center; flex-wrap:wrap; }.clubs-pagination span { width:100%; margin-right:0; text-align:center; } }
@media (max-width:620px) { .athlete-library-grid { grid-template-columns:1fr !important; } }
@media (max-width:620px) { .athlete-library-cards { grid-template-columns:1fr; } }
@media (max-width:900px) {
  .athlete-desktop-table { display:none !important; }
  .athlete-library-mobile { display:grid !important; grid-template-columns:1fr !important; width:100%; }
  .athlete-library-mobile .athlete-card { display:flex; min-height:0; min-width:0; padding:18px; text-align:left; align-items:center; gap:16px; }
  .athlete-library-mobile .athlete-card-photo { flex:0 0 96px; width:96px; margin:0; }
  .athlete-library-mobile .athlete-card > strong { margin:0; }
}
@media (max-width:1100px) {
  .athletes-hero { flex-direction:column; align-items:stretch; padding:28px 0 22px; }
  .athletes-hero .clubs-search { width:100%; box-sizing:border-box; }
  .athlete-desktop-table { display:none !important; }
  .athlete-mobile-cards { display:grid; gap:16px; }
  .athlete-mobile-card { display:grid; grid-template-columns:132px minmax(0,1fr) 70px; gap:14px; align-items:center; padding:18px; min-height:170px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-soft); color:var(--ink); }
  .athlete-mobile-avatar { width:120px; aspect-ratio:1; display:grid; place-items:center; border-radius:50%; border:2px solid var(--honor); overflow:hidden; background:linear-gradient(135deg,#26352f,#8b4039); color:#fff; font-size:46px; font-weight: 400; }
  .athlete-mobile-avatar img { width:100%; height:100%; object-fit:cover; }
  .athlete-mobile-main { min-width:0; }.athlete-mobile-main strong { font-size:25px; line-height:1.1; }.athlete-mobile-main p { margin:7px 0 14px; color:var(--muted); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .athlete-mobile-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }.athlete-mobile-stats span { color:var(--muted); font-size:12px; }.athlete-mobile-stats b { display:block; margin-top:3px; color:var(--ink); font-size:16px; }
  .athlete-mobile-tags { display:grid; justify-items:end; gap:7px; }.athlete-mobile-tags em { font-style:normal; padding:5px 8px; border-radius:12px; background:#f2efe7; font-size:12px; white-space:nowrap; }.athlete-mobile-tags i { margin-top:8px; color:var(--muted); font-size:32px; font-style:normal; }
  .clubs-tools { flex-wrap:wrap; align-items:center; }
  .clubs-tools select { flex:0 1 auto; height:54px; min-height:54px; }
  .athlete-mobile-stats b { white-space:nowrap; font-size:15px; }
  .athlete-mobile-stats { gap:5px; }
}

/* Mobile event cards: image-led, compact and touch-friendly */
@media (max-width:620px) {
  .events-hero { padding:28px; border-radius:18px; gap:20px; }
  .events-hero .subtle { font-size:15px; line-height:1.7; }
  .event-card-grid { gap:14px; }
  .event-card { flex-direction:row; align-items:stretch; min-height:0; border-radius:16px; }
  .event-card-cover { flex:0 0 36%; width:auto; aspect-ratio:auto; min-height:190px; border-radius:0; }
  .event-card-body { padding:16px 14px; }
  .event-card-heading h2 { font-size:18px; padding-right:4px; }
  .event-card-heading .subtle { margin-top:5px; font-size:13px; }
  .event-card-meta { grid-template-columns:1fr 1fr; gap:8px 10px; margin:12px 0; }
  .event-card-meta dt { font-size:11px; }
  .event-card-meta dd { font-size:13px; }
  .event-card-meta div:nth-child(3),
  .event-card-meta div:nth-child(4),
  .event-card-footer .tag:first-child { display:none; }
  .event-card-footer { gap:6px; border-top:1px solid var(--line); padding-top:10px; }
  .event-card-footer .event-link { display:none; }
  .event-card-footer .tag { font-size:12px; }
  .event-pagination { margin-top:14px; }
}

.home-amateur-mobile-list { display:none; }

/* Mobile home: compact App type scale and a single-row search action. */
@media (max-width:620px) {
  .site-hero {
    min-height:360px;
    padding:34px 16px 82px;
  }

  .site-hero-content { top:0; }

  .site-hero .eyebrow {
    font-size:12px;
    letter-spacing:.05em;
  }

  .site-hero h1 {
    font-size:28px;
    line-height:1.18;
  }

  .site-hero p {
    margin-top:10px;
    font-size:14px;
    line-height:1.55;
  }

  .hero-actions {
    gap:8px;
    margin-top:16px;
  }

  .hero-actions .primary-button,
  .hero-actions .ghost-button {
    min-height:42px;
    padding:0 13px;
    font-size:15px;
  }

  .hero-search-dock { bottom:14px; }

  .hero-search label { display:none !important; }

  .hero-search-box {
    grid-template-columns:minmax(0,1fr) 84px;
    gap:8px;
    padding:6px;
  }

  .hero-search-box input,
  .hero-search-box .primary-button {
    min-height:44px;
    font-size:15px;
  }

  .hero-search-box .primary-button {
    width:auto;
    padding:0 8px;
  }

  .home-ranking-head h2,
  .profile-card-title h2 {
    font-size:22px;
    line-height:1.2;
  }

  .home-amateur-ranking-preview { display:none; }

  .home-amateur-mobile-list {
    display:grid;
    gap:10px;
  }

  .home-amateur-mobile-list a {
    display:grid;
    grid-template-columns:48px 46px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    min-height:76px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fbfcfb;
  }

  .home-amateur-mobile-list .rank-no,
  .home-amateur-mobile-list .mini-athlete-avatar {
    grid-row:span 1;
  }

  .home-amateur-mobile-list .mini-athlete-avatar {
    width:46px;
    height:46px;
  }

  .home-amateur-mobile-list strong {
    min-width:0;
    font-size:17px;
  }

  .home-amateur-mobile-list b {
    color:var(--ink);
    font-size:18px;
  }
}

/* Public pages: use size, color and spacing—not bold weight—for hierarchy. */
.public-mode .sidebar *,
.public-mode main > #view > :not(.site-hero) *,
.public-mode .site-footer * {
  font-weight: 400 !important;
}

.public-mode .site-hero h1 {
  font-weight: 400 !important;
}

.public-mode .site-hero .eyebrow,
.public-mode .site-hero .primary-button,
.public-mode .site-hero .ghost-button {
  font-weight: 400 !important;
}

.account-role-summary,
.account-role-history {
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.inline-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}

.account-athlete-card {
  display:grid;
  grid-template-columns:44px minmax(0, 1fr) auto;
  align-items:center;
  gap:14px;
  min-height:72px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  box-shadow:0 5px 14px rgba(20, 43, 39, 0.035);
}

.account-athlete-card:hover {
  border-color:var(--line-strong);
  background:#fcfdfc;
}

.account-athlete-card-copy,
.account-athlete-card-score {
  min-width:0;
}

.account-athlete-card-name,
.account-athlete-card-meta,
.account-athlete-card-score small,
.account-athlete-card-score em {
  display:block;
}

.account-athlete-card-name {
  overflow:hidden;
  color:var(--ink);
  font-size:var(--text-lg);
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-athlete-card-meta {
  overflow:hidden;
  margin-top:4px;
  color:var(--muted);
  font-size:var(--text-sm);
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-athlete-card-score {
  display:grid;
  justify-items:end;
  text-align:right;
}

.account-athlete-card-score strong {
  color:var(--ink);
  font-size:22px;
  font-weight: 400;
  line-height:1;
}

.account-athlete-card-score small {
  margin-top:4px;
  color:var(--muted);
  font-size:var(--text-xs);
}

.account-athlete-card-score em {
  margin-top:6px;
  padding:2px 7px;
  border-radius:999px;
  background:var(--panel-soft);
  color:var(--muted);
  font-size:var(--text-xs);
  font-style:normal;
}

.account-athlete-avatar {
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid var(--honor);
  background:var(--nav);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:12px;
}

@media (max-width: 640px) {
  .account-athlete-card {
    grid-template-columns:40px minmax(0, 1fr) auto;
    gap:10px;
    min-height:66px;
    padding:12px;
  }

  .account-athlete-avatar {
    width:38px;
    height:38px;
  }

  .account-athlete-card-name {
    font-size:var(--text-base);
  }

  .account-athlete-card-meta {
    font-size:var(--text-xs);
  }

  .account-athlete-card-score strong {
    font-size:19px;
  }

  .account-athlete-card-score small,
  .account-athlete-card-score em {
    font-size:11px;
  }
}

.athlete-account-controls {
  width:100%;
  margin-top:14px;
}

.account-athlete-manage {
  width:min(100%, 640px);
}

.account-auth-entry {
  min-height:220px;
  display:grid;
  place-items:center;
}

/* ── 个人中心 me page ─────────────────────────── */
.me-hero {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px 28px 24px;
  margin: -20px -20px 0;
  background: linear-gradient(135deg, var(--nav-strong) 0%, var(--nav) 60%, color-mix(in srgb, var(--nav) 80%, var(--action)));
  border-radius: 12px 12px 0 0;
  color: #fff;
}

.me-hero-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
  border: 2px solid rgba(255,255,255,0.3);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.5px;
}

.me-hero-name {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 400;
  color: #fff;
}

.me-hero-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
}

.me-hero-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.me-hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.me-hero-roles .tag {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
}

.me-hero-roles .tag.green {
  background: rgba(52,116,91,0.55);
  border-color: rgba(52,116,91,0.5);
  color: #b6e8d2;
}

.me-logout-btn {
  align-self: start;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  font-size: var(--text-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.me-logout-btn:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* 通知横幅 */
.me-alert-banner {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(163,58,49,0.2);
  border-radius: 10px;
  background: var(--action-soft);
}

.me-alert-banner.me-alert-green {
  border-color: rgba(52,116,91,0.25);
  background: var(--success-soft);
}

.me-alert-icon {
  font-size: 18px;
  line-height: 1;
}

.me-alert-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.me-alert-body strong {
  font-size: var(--text-sm);
  color: var(--ink);
}

.me-alert-body span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.me-alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 快捷操作 */
.me-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.me-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 72px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-sm);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
  cursor: pointer;
}

.me-quick-btn:hover {
  border-color: var(--line-strong);
  background: #f9fbfa;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20,43,39,0.08);
}

.me-quick-btn.primary {
  border-color: rgba(163,58,49,0.3);
  background: var(--action-soft);
  color: var(--action);
}

.me-quick-btn.primary:hover {
  background: color-mix(in srgb, var(--action-soft) 80%, var(--panel));
  border-color: rgba(163,58,49,0.5);
}

.me-quick-icon {
  font-size: 22px;
  line-height: 1;
}

/* 分区网格 */
.me-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 0;
}

.me-section-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  margin-top: 0;
}

.me-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.me-section-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.me-section-title {
  flex: 1;
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--ink);
}

.me-section-link {
  font-size: var(--text-sm);
  color: var(--action);
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
}

.me-section-link:hover {
  text-decoration: underline;
}

.me-athlete-list {
  display: grid;
  gap: 10px;
}

.me-empty-hint {
  margin: 0;
  padding: 16px 0;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

/* 俱乐部入驻行 */
.me-onboarding-list {
  display: grid;
  gap: 10px;
}

.me-onboarding-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.me-onboarding-info strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.me-onboarding-info span {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: 3px;
}

.me-onboarding-status {
  display: grid;
  gap: 4px;
  text-align: right;
  flex-shrink: 0;
}

.me-onboarding-status small {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* 工作身份 */
.me-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

/* 响应式 */
@media (max-width: 640px) {
  .me-hero {
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    margin: -16px -16px 0;
    padding: 20px 16px 18px;
    border-radius: 8px 8px 0 0;
  }

  .me-logout-btn {
    grid-column: span 2;
    width: 100%;
    text-align: center;
  }

  .me-hero-avatar {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }

  .me-hero-name {
    font-size: var(--text-lg);
  }

  .me-sections-grid {
    grid-template-columns: 1fr;
  }

  .me-quick-btn {
    min-width: 58px;
    padding: 12px 6px;
    font-size: var(--text-xs);
  }

  .me-quick-icon {
    font-size: 20px;
  }
}

/* ── end me page ─────────────────────────────── */

.athlete-claim-form {
  grid-template-columns:1fr;
  width:min(100%, 560px);
  margin-inline:auto;
}

.athlete-claim-form .span-2 {
  grid-column:auto;
}

.identity-application-form {
  grid-template-columns:1fr;
  width:min(100%, 680px);
  margin-inline:auto;
}

.identity-application-form .span-2 {
  grid-column:auto;
}

.role-application-intro {
  margin-bottom:16px;
}

.role-application-intro p {
  margin:0;
}

.role-application-choices {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.role-application-card {
  display:grid;
  gap:7px;
  min-height:144px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  color:var(--ink);
  cursor:pointer;
  text-align:left;
}

.role-application-card:hover:not(:disabled),
.role-application-card.selected {
  border-color:var(--action);
  box-shadow:0 8px 18px rgba(163, 58, 49, .08);
}

.role-application-card:disabled {
  cursor:default;
  opacity:.72;
}

.role-application-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.role-application-card-top strong {
  font-size:var(--text-lg);
  font-weight: 400;
}

.role-application-card > span:not(.role-application-card-top) {
  color:var(--muted);
  font-size:var(--text-sm);
}

.role-application-card small {
  margin-top:auto;
  color:var(--muted);
  font-size:var(--text-xs);
}

.role-application-details {
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.role-application-selected {
  margin-bottom:16px;
  padding:14px 16px;
  border-radius:10px;
  background:var(--panel-soft);
}

.role-application-selected p,
.role-application-selected h2 {
  margin:0;
}

.role-application-selected h2 {
  margin-top:2px;
  font-size:var(--title-sm);
}

.role-application-selected h2 + p {
  margin-top:4px;
}

@media (max-width: 640px) {
  .role-application-choices {
    grid-template-columns:1fr;
  }

  .role-application-card {
    min-height:0;
  }
}

.account-auth-dialog {
  width:min(420px, calc(100vw - 32px));
  border:0;
  border-radius:22px;
  padding:30px;
  color:var(--ink);
  background:var(--hfc-paper);
  box-shadow:0 28px 80px rgba(17, 32, 29, .32);
}

.account-auth-dialog::backdrop {
  background:rgba(12, 25, 22, .58);
  backdrop-filter:blur(5px);
}

.account-auth-dialog .form-grid {
  grid-template-columns:1fr;
  gap:14px;
}

.account-auth-dialog.registration-mode {
  width:min(460px, calc(100vw - 32px));
}

.legal-acceptance {
  display:block;
  color:var(--hfc-ink-soft);
  font-size:13px;
  line-height:1.7;
}

.legal-acceptance a {
  color:var(--hfc-vermilion);
}

.legal-document {
  max-width:900px;
  margin-inline:auto;
}

.legal-document h1,
.legal-document h2,
.legal-document h3 {
  font-weight: 400;
}

.legal-document h1 { font-size:24px; margin:0 0 18px; }
.legal-document h2 { font-size:18px; margin:28px 0 10px; }
.legal-document h3 { font-size:15px; margin:20px 0 8px; }
.legal-document p { color:var(--hfc-ink-soft); line-height:1.85; }

.legal-read-confirm {
  display:grid;
  gap:6px;
  margin:28px 0 14px;
  padding:14px;
  border:1px solid var(--hfc-line);
  border-radius:12px;
}

.legal-read-confirm small { color:var(--hfc-ink-soft); }

.account-auth-mark {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:13px;
  color:#fff;
  background:var(--navy);
  font-size:13px;
  letter-spacing:.08em;
}

.account-auth-title {
  margin:20px 0 24px;
}

.account-auth-title span {
  color:var(--muted);
  font-size:12px;
  letter-spacing:.12em;
}

.account-auth-title h2 {
  margin:5px 0 0;
  font-size:26px;
  font-weight: 400;
}

.account-auth-close {
  position:absolute;
  top:15px;
  right:16px;
  width:32px;
  height:32px;
  border:0;
  border-radius:50%;
  color:var(--muted);
  background:transparent;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}

.account-code-field {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  column-gap:10px;
}

.account-code-field label {
  grid-column:1 / -1;
}

.account-code-field .ghost-button {
  min-height:42px;
  white-space:nowrap;
}

@media (max-width:620px) {
  .account-auth-dialog {
    width:calc(100vw - 24px);
    padding:26px 20px 22px;
    border-radius:20px;
  }
}

/* Mobile public UI: reduce the shared type scale by two pixels without affecting admin screens. */
@media (max-width:620px) {
  .public-mode {
    --text-xs:10px;
    --text-sm:12px;
    --text-base:14px;
    --text-lg:15px;
    --title-sm:20px;
    --title-md:30px;
    --title-lg:42px;
    --display-lg:54px;
  }

  .public-mode .site-hero h1 { font-size:26px; }
  .public-mode .site-hero p { font-size:13px; }
  .public-mode .home-mobile-ranking-strip strong { font-size:14px; }
  .public-mode .home-mobile-ranking-strip small { font-size:10px; }
  .public-mode .home-mobile-ranking-strip b { font-size:20px; }
  .public-mode .ranking-hero h1 { font-size:26px; }
  .public-mode .mobile-ranking-cards .athlete-card > strong { font-size:16px; }
  .public-mode .mobile-bottom-nav a { font-size:11px; }
  .public-mode .athlete-mobile-main strong { font-size:23px; }
  .public-mode .athlete-mobile-main p { font-size:12px; }
  .public-mode .athlete-mobile-stats span,
  .public-mode .athlete-mobile-tags em { font-size:10px; }
  .public-mode .athlete-mobile-stats b { font-size:13px; }
  .public-mode .event-card-heading h2 { font-size:16px; }
  .public-mode .event-card-heading .subtle,
  .public-mode .event-card-meta dd { font-size:11px; }
  .public-mode .event-card-meta dt { font-size:9px; }
  .public-mode .event-card-footer .tag { font-size:10px; }
}

/* Mobile home: match the current-points list to the amateur-ranking row pattern. */
@media (max-width:620px) {
  .home-mobile-ranking-strip {
    display:grid;
    gap:10px;
    margin:0;
    padding:0;
    overflow:visible;
  }

  .home-mobile-ranking-strip a {
    display:grid;
    grid-template-columns:48px 46px minmax(0,1fr) auto;
    grid-template-rows:none;
    gap:12px;
    align-items:center;
    min-height:76px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fbfcfb;
    box-shadow:none;
  }

  .home-mobile-ranking-strip .rank-no,
  .home-mobile-ranking-strip .mini-athlete-avatar { grid-row:span 1; }
  .home-mobile-ranking-strip .mini-athlete-avatar { width:46px; height:46px; }
  .home-mobile-ranking-strip strong { min-width:0; font-size:17px; }
  .home-mobile-ranking-strip small { display:none; }
  .home-mobile-ranking-strip b { grid-column:auto; grid-row:auto; margin:0; color:var(--ink); font-size:18px; }
}

/* Public mobile navigation: the desktop header is replaced by a top drawer trigger. */
@media (max-width:1080px) {
  .public-mode .topbar {
    display:grid !important;
    grid-template-columns:auto minmax(0, 1fr) auto;
    gap:10px;
    padding:10px 16px;
  }

  .public-mode .mobile-menu {
    display:inline-flex !important;
  }

  .public-mode .sidebar {
    display:none !important;
  }

  .public-mode .sidebar.open {
    display:grid !important;
    position:fixed;
    z-index:50;
    inset:0 auto 0 0;
    width:min(82vw, 320px);
    height:100dvh;
    padding:20px 16px;
    overflow-y:auto;
    grid-template-columns:1fr;
    align-content:start;
    gap:16px;
    border-bottom:0;
    box-shadow:12px 0 36px rgba(17, 26, 23, 0.18);
  }

  .public-mode .sidebar.open .nav-group:first-of-type {
    display:grid !important;
    justify-content:stretch;
    overflow:visible;
  }
}

/* ── 子页面通用头部 (subpage-head) ─────────────────── */
.subpage-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.subpage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.subpage-back-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--bg);
}

.subpage-back-arrow {
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  margin-top: -1px;
}

.subpage-head {
  margin-bottom: 24px;
}

.subpage-head-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subpage-eyebrow {
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action);
  opacity: 0.85;
}

.subpage-title {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}

.subpage-desc {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ── 子页面表单布局 ─────────────────────────────────── */
.subpage-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.subpage-info-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: var(--text-sm);
  color: var(--ink);
}

.subpage-info-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-color: rgba(52,116,91,0.2);
  background: var(--success-soft, #f0f9f4);
}

.subpage-tip-icon {
  font-size: 16px;
  line-height: 1.5;
  flex-shrink: 0;
  color: var(--success, #34745b);
}

.subpage-info-tip strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 400;
  color: var(--ink);
}

.subpage-info-tip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.subpage-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.subpage-info-label {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 400;
}

.subpage-info-value {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink);
}

.subpage-form-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft, 0 2px 12px rgba(20,43,39,0.05));
}

.subpage-form-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--ink);
}

.subpage-form-card-icon {
  font-size: 18px;
  line-height: 1;
}

.subpage-stacked-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.subpage-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subpage-field label {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.subpage-optional {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--muted);
}

.subpage-field input,
.subpage-field select,
.subpage-field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-sm);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.subpage-field input:focus,
.subpage-field select:focus,
.subpage-field textarea:focus {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 12%, transparent);
}

.subpage-field textarea {
  resize: vertical;
  min-height: 90px;
}

.subpage-field-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.subpage-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.subpage-code-row .ghost-button {
  white-space: nowrap;
  height: 42px;
}

.subpage-field-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(52,116,91,0.2);
  border-radius: 8px;
  background: var(--success-soft, #f0f9f4);
  font-size: var(--text-sm);
  color: var(--muted);
}

.subpage-field-tip span {
  color: var(--success, #34745b);
  font-size: 15px;
  flex-shrink: 0;
}

.subpage-submit-btn {
  margin-top: 4px;
  padding: 12px;
  font-size: var(--text-base);
  border-radius: 10px;
}

/* 认领选手：类型切换按钮 */
.subpage-type-toggle {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.subpage-type-btn {
  flex: 1;
  padding: 9px 12px;
  border: none;
  background: var(--bg);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.subpage-type-btn + .subpage-type-btn {
  border-left: 1.5px solid var(--line);
}

.subpage-type-btn.active {
  background: var(--nav);
  color: #fff;
}

/* ── 工作台 (Workbench) ─────────────────────────── */
.wb-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wb-section-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-soft, 0 2px 12px rgba(20,43,39,0.05));
}

.wb-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--ink);
}

.wb-section-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.wb-head-btn {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--action-soft, #fdf3f0);
  color: var(--action);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.wb-head-btn:hover {
  background: color-mix(in srgb, var(--action-soft) 70%, var(--panel));
  border-color: rgba(163,58,49,0.3);
}

.wb-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wb-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s, border-color 0.12s;
}

.wb-list-row:hover,
a.wb-list-row:hover {
  background: var(--bg);
  border-color: var(--line);
}

.wb-row-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--nav) 15%, #fff), color-mix(in srgb, var(--nav) 8%, #fff));
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 400;
  color: var(--nav);
  flex-shrink: 0;
}

.wb-event-avatar,
.wb-club-avatar {
  background: linear-gradient(135deg, color-mix(in srgb, var(--action) 12%, #fff), color-mix(in srgb, var(--action) 6%, #fff));
  border-color: rgba(163,58,49,0.12);
  color: var(--action);
}

.wb-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wb-row-name {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-row-sub {
  font-size: var(--text-xs);
  color: var(--muted);
}

.wb-row-arrow {
  font-size: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.wb-row-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wb-club-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  margin-bottom: 4px;
}

.wb-club-name {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.wb-club-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.wb-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-size: var(--text-sm);
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s, background 0.15s;
}

.wb-action-btn:hover {
  border-color: var(--line-strong);
  background: var(--bg);
}

.wb-action-btn.danger {
  color: var(--action);
  border-color: rgba(163,58,49,0.2);
}

.wb-action-btn.danger:hover {
  background: var(--action-soft, #fdf3f0);
  border-color: rgba(163,58,49,0.35);
}

.wb-qual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── 响应式 ─────────────────────────────────────── */
@media (max-width: 640px) {
  .subpage-field-group {
    grid-template-columns: 1fr;
  }

  .subpage-title {
    font-size: 20px;
  }

  .subpage-form-card {
    padding: 16px;
  }

  .wb-section-card {
    padding: 16px;
  }

  .wb-club-actions {
    flex-wrap: wrap;
  }
}

/* ── 注册欢迎引导弹窗 (welcome-dialog) ──────────── */
.welcome-dialog {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 480px;
  width: calc(100vw - 32px);
  box-shadow: 0 24px 64px rgba(20,43,39,0.18), 0 4px 16px rgba(20,43,39,0.1);
  overflow: hidden;
}

.welcome-dialog::backdrop {
  background: rgba(10, 26, 22, 0.55);
  backdrop-filter: blur(3px);
}

.welcome-dialog-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.welcome-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, var(--nav-strong) 0%, var(--nav) 65%, color-mix(in srgb, var(--nav) 80%, var(--action)));
  color: #fff;
}

.welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.3);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 400;
  flex-shrink: 0;
}

.welcome-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
}

.welcome-subtitle {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

.welcome-paths {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px;
  background: var(--bg);
}

.welcome-path-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.12s;
  width: 100%;
  margin-bottom: 6px;
}

.welcome-path-card:last-child {
  margin-bottom: 0;
}

.welcome-path-card:hover {
  border-color: var(--line-strong);
  background: var(--bg);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(20,43,39,0.07);
}

.welcome-path-card:nth-child(1):hover { border-color: rgba(163,58,49,0.4); }
.welcome-path-card:nth-child(2):hover { border-color: rgba(52,116,91,0.4); }
.welcome-path-card:nth-child(3):hover { border-color: rgba(52,91,116,0.4); }

.welcome-path-skip {
  border-style: dashed;
  border-color: var(--line);
}

.welcome-path-icon {
  font-size: 26px;
  line-height: 1;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.welcome-path-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.welcome-path-body strong {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--ink);
}

.welcome-path-body span {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.4;
}

.welcome-path-arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .welcome-header {
    padding: 22px 20px 20px;
  }

  .welcome-paths {
    padding: 10px;
  }

  .welcome-path-card {
    padding: 14px 12px;
    gap: 12px;
  }

  .welcome-path-icon {
    font-size: 22px;
    width: 34px;
  }
}
/* ── end welcome-dialog ──────────────────────── */

/* ════════════════════════════════════════════════════════════
   📱  MOBILE APP — 手机端 APP 级全面优化
   目标：让每一次触摸都像在用原生 APP
   ════════════════════════════════════════════════════════════ */

/* ── 0. 全局触摸 & 基础层 ──────────────────────────────────── */
@media (max-width: 768px) {
  /* 防止双击缩放、优化点击延迟 */
  * { -webkit-tap-highlight-color: transparent; }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  /* 所有可点击元素最小触摸区 44×44 */
  a, button, [role="button"], label[for],
  .wb-list-row, .me-quick-btn, .welcome-path-card,
  .subpage-type-btn, .mobile-bottom-nav a,
  .me-section-link, .account-athlete-card {
    min-height: 44px;
  }

  /* 输入框：放大字号防 iOS 自动放大页面 */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* 平滑弹性滚动（iOS momentum scroll） */
  #view, .me-athlete-list, .me-sections-grid,
  .home-mobile-ranking-strip, .filters {
    -webkit-overflow-scrolling: touch;
  }

  /* 全局按钮触摸缩放微动效 */
  .primary-button, .ghost-button,
  .me-quick-btn, .wb-action-btn, .wb-head-btn,
  .subpage-submit-btn, .welcome-path-card,
  .subpage-back-btn {
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
  }
  .primary-button:active, .ghost-button:active,
  .me-quick-btn:active, .wb-action-btn:active,
  .wb-head-btn:active, .subpage-submit-btn:active,
  .welcome-path-card:active, .subpage-back-btn:active {
    transform: scale(0.96);
    opacity: 0.85;
  }

  /* 卡片点击反馈 */
  .account-athlete-card:active,
  .wb-list-row:active,
  .welcome-path-card:active,
  .athlete-mobile-card:active,
  .me-section-card:active {
    transform: scale(0.985);
  }
}

/* ── 1. 顶部导航栏（Topbar）APP 化 ─────────────────────────── */
@media (max-width: 768px) {
  .public-mode .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex !important;
    align-items: center;
    height: 56px;
    padding: 0 14px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(20, 43, 39, 0.08);
    box-shadow: 0 1px 0 rgba(20,43,39,0.06);
  }

  /* Hamburger 图标 */
  .public-mode .mobile-menu {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--nav);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
  }
  .public-mode .mobile-menu:active {
    background: rgba(20, 43, 39, 0.08);
    transform: scale(0.92);
  }

  /* 顶部搜索栏 */
  .public-mode .topbar .search-box {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 34px;
    border-radius: 10px;
    background: rgba(20, 43, 39, 0.07);
    border: none;
    padding: 0 10px;
    gap: 6px;
    transition: background 0.2s;
  }
  .public-mode .topbar .search-box:focus-within {
    background: rgba(20, 43, 39, 0.12);
  }
  .public-mode .topbar .search-box span {
    color: var(--muted);
    font-size: 16px;
    flex-shrink: 0;
  }
  .public-mode .topbar .search-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px !important;
    color: var(--ink);
    padding: 0;
    outline: none;
  }
  .public-mode .topbar .search-box input::placeholder {
    color: var(--muted);
    font-size: 14px;
  }

  /* 用户区：只留头像或登录按钮 */
  .public-mode .topbar .topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .public-mode .topbar .topbar-actions .status-pill {
    display: none;
  }
  .public-mode .topbar .topbar-actions .primary-button {
    display: none; /* 顶部创建赛事按钮在手机端隐藏，通过工作台访问 */
  }
  /* 用户头像按钮 */
  .topbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--nav);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: 0.02em;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(20,43,39,0.2);
  }
}

/* ── 2. 底部 Tab 栏 APP 化 ─────────────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(20, 43, 39, 0.1);
    box-shadow: 0 -4px 24px rgba(18, 45, 39, 0.08);
  }

  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 4px;
    color: #8e9e98;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: none;
    background: transparent;
    position: relative;
    transition: color 0.2s;
    min-height: 52px;
  }

  .mobile-bottom-nav i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    width: 26px;
    height: 26px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
  }

  .mobile-bottom-nav i svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-bottom-nav a.active {
    color: var(--action);
  }

  .mobile-bottom-nav a.active i {
    transform: scale(1.12);
    filter: drop-shadow(0 3px 6px rgba(163, 58, 49, 0.3));
    color: var(--action);
  }
  .mobile-bottom-nav a:active i {
    transform: scale(0.88);
  }

  /* 激活指示点 */
  .mobile-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: var(--action);
    opacity: 0.15;
  }

  /* 触摸缩放反馈 */
  .mobile-bottom-nav a:active i {
    transform: scale(0.88);
  }

  /* 确保内容不被底部 Tab 遮住 */
  .public-mode #view {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}

/* ── 3. me 页 - 个人中心完整 APP 化 ─────────────────────────── */
@media (max-width: 768px) {
  /* 去除默认 panel padding，全屏铺满 */
  .public-mode #accountCenter.panel.panel-pad {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  /* Hero 卡：头像 + 姓名 + 身份 */
  .me-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 28px 20px 20px;
    background: linear-gradient(160deg, var(--nav-strong, #122d25) 0%, var(--nav, #1a3d30) 55%, color-mix(in srgb, var(--nav) 75%, #2d5a47) 100%);
    color: #fff;
    position: relative;
    border-radius: 0 0 28px 28px;
    margin-bottom: 0;
    padding-top: calc(28px + env(safe-area-inset-top));
  }

  .me-hero-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 3px solid rgba(255,255,255,0.35);
    font-size: 26px;
    font-weight: 400;
    display: grid;
    place-items: center;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    letter-spacing: 0.02em;
  }

  .me-hero-info {
    text-align: center;
    flex: none;
    width: 100%;
  }

  .me-hero-name {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 400;
    color: #fff;
  }

  .me-hero-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .me-hero-meta span {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
  }
  .me-hero-meta span + span::before {
    content: "·";
    margin-right: 8px;
  }

  .me-hero-roles {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
  }

  .me-hero-roles .tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    border-radius: 20px;
  }

  /* 退出按钮移到右上角 */
  .me-logout-btn {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    right: 16px;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s, transform 0.1s;
  }
  .me-logout-btn:active {
    background: rgba(255,255,255,0.22);
    transform: scale(0.95);
  }

  /* 通知横幅 */
  .me-alert-banner {
    margin: 12px 16px 0;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(20,43,39,0.08);
  }
  .me-alert-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }
  .me-alert-actions .ghost-button {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 10px;
    min-height: 36px;
  }

  /* 快捷操作：2×3 网格，大卡片 */
  .me-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 16px 8px;
    margin-top: 0;
  }

  .me-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 8px rgba(20,43,39,0.05);
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
  }
  .me-quick-btn:active {
    transform: scale(0.93);
    background: var(--bg);
  }
  .me-quick-btn.primary {
    background: color-mix(in srgb, var(--action) 8%, #fff);
    border-color: color-mix(in srgb, var(--action) 18%, var(--line));
    color: var(--action);
  }

  .me-quick-icon {
    font-size: 22px;
    line-height: 1;
    display: block;
  }

  .me-quick-btn span:not(.me-quick-icon) {
    font-size: 11px;
    line-height: 1.3;
  }

  /* 信息卡片区 */
  .me-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 16px 100px;
  }

  .me-section-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(20,43,39,0.06);
  }

  .me-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(20,43,39,0.02);
  }

  .me-section-icon {
    font-size: 18px;
    line-height: 1;
  }

  .me-section-title {
    flex: 1;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink);
  }

  .me-section-link {
    font-size: 13px;
    font-weight: 400;
    color: var(--action);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--action) 8%, transparent);
  }
  .me-section-link:active {
    background: color-mix(in srgb, var(--action) 14%, transparent);
  }

  .me-athlete-list {
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  /* 选手/关注卡片 */
  .account-athlete-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.1s, background 0.1s;
  }
  .account-athlete-card:active {
    transform: scale(0.97);
    background: rgba(20,43,39,0.03);
  }
  .account-athlete-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }
  .account-athlete-avatar.fallback {
    background: linear-gradient(135deg, color-mix(in srgb, var(--nav) 20%, #fff), color-mix(in srgb, var(--nav) 10%, #fff));
    border: 1.5px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 400;
    color: var(--nav);
  }
  .account-athlete-card-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .account-athlete-card-name {
    font-size: 15px;
    font-weight: 400;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .account-athlete-card-meta {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .account-athlete-card-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex-shrink: 0;
  }
  .account-athlete-card-score strong {
    font-size: 18px;
    font-weight: 400;
    color: var(--action);
    line-height: 1;
  }
  .account-athlete-card-score small {
    font-size: 10px;
    color: var(--muted);
  }
  .account-athlete-card-score em {
    font-size: 10px;
    color: var(--nav);
    font-style: normal;
    font-weight: 400;
  }

  .me-empty-hint {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    margin: 0;
  }

  /* 工作身份卡 */
  .me-role-tags {
    padding: 12px 16px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* 俱乐部入驻区 */
  .me-onboarding-list {
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .me-onboarding-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--line);
  }
  .me-onboarding-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .me-onboarding-info strong {
    font-size: 14px;
    font-weight: 400;
    color: var(--ink);
  }
  .me-onboarding-info span {
    font-size: 12px;
    color: var(--muted);
  }
  .me-onboarding-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
  }
  .me-onboarding-status small {
    font-size: 11px;
    color: var(--muted);
    text-align: right;
  }
}

/* ── 4. 子页面手机端优化（subpage） ─────────────────────────── */
@media (max-width: 768px) {
  /* 子页面头部：固定返回按钮在顶部 */
  .subpage-back-row {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: -16px -16px 16px;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(20,43,39,0.07);
  }

  .subpage-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 22px;
    border: 1.5px solid var(--line);
    background: rgba(255,255,255,0.9);
    color: var(--nav);
    font-size: 14px;
    font-weight: 400;
    min-height: 36px;
    box-shadow: 0 1px 4px rgba(20,43,39,0.08);
  }
  .subpage-back-btn:active {
    background: var(--bg);
    transform: scale(0.95);
  }

  .subpage-title {
    font-size: 22px;
    padding: 0 4px;
  }

  /* 表单卡片：去掉阴影，只保留轻边框，全宽延伸 */
  .subpage-form-card {
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 2px 12px rgba(20,43,39,0.06);
  }

  /* 输入框：更圆润、更大触摸区 */
  .subpage-field input,
  .subpage-field select,
  .subpage-field textarea {
    height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 16px !important;
    border: 1.5px solid var(--line);
    background: var(--bg);
  }
  .subpage-field textarea {
    height: auto;
    min-height: 100px;
    padding: 12px 14px;
  }
  .subpage-field input:focus,
  .subpage-field select:focus,
  .subpage-field textarea:focus {
    border-color: var(--action);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--action) 10%, transparent);
  }

  /* 提交按钮：全宽、更大、悬浮固定 */
  .subpage-submit-btn {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(163,58,49,0.22);
    margin-top: 8px;
  }

  /* 类型切换（分段控件）更圆、更高 */
  .subpage-type-toggle {
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid var(--line);
  }
  .subpage-type-btn {
    height: 46px;
    font-size: 14px;
    font-weight: 400;
    padding: 0 12px;
  }
  .subpage-type-btn.active {
    background: var(--nav);
    color: #fff;
  }

  /* 工作台行更大、更易点击 */
  .wb-section-card {
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(20,43,39,0.06);
    border: 1px solid var(--line);
  }
  .wb-list-row {
    padding: 14px 12px;
    border-radius: 12px;
    gap: 12px;
    min-height: 60px;
  }
  .wb-row-avatar {
    width: 44px;
    height: 44px;
    font-size: 16px;
    border-radius: 12px;
  }
  .wb-row-name {
    font-size: 15px;
    font-weight: 400;
  }
  .wb-row-sub {
    font-size: 12px;
  }
  .wb-row-arrow {
    font-size: 20px;
  }
  .wb-club-row {
    border-radius: 12px;
    padding: 14px;
  }
  .wb-club-actions {
    gap: 10px;
  }
  .wb-action-btn {
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
  }
  .wb-head-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
  }
}

/* ── 5. 登录/注册弹窗：手机端接近全屏底部抽屉 ─────────────── */
@media (max-width: 620px) {
  .account-auth-dialog {
    position: fixed;
    inset: auto 0 0 0 !important;
    width: 100% !important;
    max-width: 100%;
    border-radius: 24px 24px 0 0 !important;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom)) !important;
    margin: 0;
    /* iOS Safari 顶部向上的圆角拖拽手柄 */
  }

  /* 顶部拖拽指示条 */
  .account-auth-dialog::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(20,43,39,0.15);
    border-radius: 3px;
    margin: 0 auto 16px;
  }

  .account-auth-dialog::backdrop {
    background: rgba(10, 24, 20, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .account-auth-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
  }

  .account-auth-title {
    margin: 16px 0 20px;
  }
  .account-auth-title h2 {
    font-size: 22px;
    font-weight: 400;
  }
  .account-auth-title p {
    font-size: 14px;
  }

  /* 表单输入框在弹窗中也保持大触摸区 */
  .account-auth-dialog .form-grid input,
  .account-auth-dialog .form-grid select {
    height: 50px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 16px !important;
    border: 1.5px solid var(--line);
  }
  .account-auth-dialog .form-grid input:focus,
  .account-auth-dialog .form-grid select:focus {
    border-color: var(--action);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--action) 10%, transparent);
  }

  /* 提交按钮 */
  .account-auth-dialog .primary-button {
    height: 52px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 400;
    width: 100%;
    box-shadow: 0 4px 16px rgba(163,58,49,0.2);
    margin-top: 4px;
  }

  /* 验证码行 */
  .account-code-field .ghost-button {
    height: 50px;
    border-radius: 12px;
    font-size: 13px;
    padding: 0 12px;
    white-space: nowrap;
  }

  /* 关闭按钮 */
  .account-auth-close {
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(20,43,39,0.06);
    font-size: 22px;
  }
  .account-auth-close:active {
    background: rgba(20,43,39,0.12);
    transform: scale(0.92);
  }
}

/* ── 6. 欢迎弹窗（注册后引导）手机端底部抽屉化 ──────────── */
@media (max-width: 620px) {
  .welcome-dialog {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100% !important;
    max-width: 100%;
    border-radius: 24px 24px 0 0 !important;
    max-height: 92dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 顶部拖拽条 */
  .welcome-dialog::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.45);
    border-radius: 3px;
    margin: 12px auto -4px;
  }

  .welcome-header {
    padding: 18px 20px 18px;
    border-radius: 0;
  }

  .welcome-paths {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 0;
  }

  .welcome-path-card {
    border-radius: 14px;
    padding: 15px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px rgba(20,43,39,0.05);
  }
  .welcome-path-card:active {
    transform: scale(0.97);
    opacity: 0.85;
  }
}

/* ── 7. 首页手机端优化 ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero 区：更大 padding，更好的呼吸感 */
  .site-hero {
    border-radius: 0 0 28px 28px;
    margin: -16px -16px 20px;
    padding: 48px 24px 110px;
  }
  .site-hero h1 {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 400;
  }
  .site-hero p {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 10px;
    color: rgba(255,255,255,0.82);
  }

  /* Hero 搜索停靠位 */
  .hero-search-dock {
    bottom: 24px;
    width: calc(100% - 32px);
    left: 50%;
    transform: translateX(-50%);
  }
  .hero-search {
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(20,43,39,0.22);
  }
  .hero-search input {
    font-size: 15px !important;
    height: 34px;
  }

  /* 赛事卡片 */
  .event-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(20,43,39,0.08);
    border: 1px solid var(--line);
  }
  .event-card-heading {
    padding: 16px;
  }
  .event-card-meta {
    padding: 0 16px 14px;
  }
  .event-card-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--line);
  }

  /* 选手卡片（移动端列表）*/
  .athlete-mobile-card {
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(20,43,39,0.06);
    border: 1px solid var(--line);
    background: #fff;
    transition: transform 0.1s;
  }
  .athlete-mobile-card:active {
    transform: scale(0.97);
    background: var(--bg);
  }

  .athlete-mobile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 400;
  }
  .athlete-mobile-main strong {
    font-size: 16px;
    font-weight: 400;
  }
  .athlete-mobile-main p {
    font-size: 12px;
    margin: 3px 0 6px;
  }
  .athlete-mobile-stats {
    gap: 10px;
  }
  .athlete-mobile-stats span {
    font-size: 11px;
  }
  .athlete-mobile-stats b {
    font-size: 14px;
    display: block;
  }
  .athlete-mobile-tags em {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
  }

  /* 筛选器 */
  .filters {
    gap: 8px;
    padding: 0 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters select {
    flex: 0 0 auto;
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
    padding: 0 10px;
  }
  .filters .primary-button {
    flex: 0 0 auto;
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
    padding: 0 16px;
    white-space: nowrap;
  }
}

/* ── 8. 侧边抽屉菜单优化 ─────────────────────────────────── */
@media (max-width: 768px) {
  /* 遮罩 */
  .sidebar.open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10,24,20,0.5);
    backdrop-filter: blur(3px);
    z-index: -1;
    pointer-events: none;
  }

  .public-mode .sidebar.open {
    background: #fff;
    width: min(80vw, 300px);
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
    border-radius: 0 24px 24px 0;
    gap: 8px;
    box-shadow: 8px 0 40px rgba(10,24,20,0.22);
    animation: slideInLeft 0.24s cubic-bezier(0.2, 0, 0, 1) both;
  }

  @keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0.7; }
    to { transform: translateX(0); opacity: 1; }
  }

  .public-mode .sidebar.open .nav-group a {
    min-height: 48px;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    font-weight: 400;
    transition: background 0.12s, transform 0.1s;
  }
  .public-mode .sidebar.open .nav-group a:active {
    background: rgba(20,43,39,0.06);
    transform: scale(0.97);
  }
  .public-mode .sidebar.open .nav-group a.active-route {
    background: color-mix(in srgb, var(--nav) 8%, transparent);
    color: var(--nav);
  }

  /* Brand 在侧边栏顶部 */
  .public-mode .sidebar.open .brand {
    padding: 8px 10px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }
}

/* ── 9. Toast 手机端优化 ─────────────────────────────────── */
@media (max-width: 768px) {
  #toast-container {
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    width: auto;
  }
  .toast {
    border-radius: 14px;
    font-size: 14px;
    padding: 12px 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(20,43,39,0.18);
  }
}

/* ── 10. 通用手机端细节 ─────────────────────────────────── */
@media (max-width: 768px) {
  /* 标签 (tag) 稍大一点 */
  .tag {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 20px;
  }

  /* 分隔线视觉提升 */
  .me-sections-grid > :not(:last-child) {
    margin-bottom: 0;
  }

  /* view 内容区留出顶部 topbar 的高度 */
  .public-mode .view {
    padding-top: 0;
  }

  /* 俱乐部详情、选手详情：Hero 区全屏感 */
  .athlete-mobile-full {
    margin: -16px -16px 0;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
  }

  /* 空状态提示 */
  .notice, .subtle {
    font-size: 14px;
    line-height: 1.7;
  }

  /* 通用 panel-pad 在手机端 padding 优化 */
  .public-mode .panel-pad {
    padding: 16px;
  }

  /* 页面标题 */
  .page-hero-title, .athletes-hero h1, .clubs-hero h1,
  .ranking-hero h1 {
    font-size: 26px;
    font-weight: 400;
  }

  /* 分页按钮 */
  .pagination {
    gap: 8px;
  }
  .pagination button, .pagination a {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
  }
}

/* ── 11. 超小屏（375px 以下）极致压缩 ───────────────────── */
@media (max-width: 375px) {
  .me-quick-actions {
    gap: 8px;
  }
  .me-quick-btn {
    padding: 12px 6px 10px;
    border-radius: 14px;
  }
  .me-quick-icon {
    font-size: 20px;
  }
  .me-quick-btn span:not(.me-quick-icon) {
    font-size: 10px;
  }
  .mobile-bottom-nav a {
    font-size: 9px;
  }
  .mobile-bottom-nav i {
    font-size: 22px;
  }
  .subpage-title {
    font-size: 20px;
  }
  .me-hero-avatar {
    width: 66px;
    height: 66px;
    font-size: 22px;
  }
  .me-hero-name {
    font-size: 18px;
  }
}

/* ── 12. 横屏手机（landscape）优化 ──────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
  .mobile-bottom-nav {
    grid-template-columns: repeat(5, 1fr);
    height: calc(50px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav a {
    min-height: 44px;
    padding: 6px 4px 4px;
  }
  .mobile-bottom-nav i {
    font-size: 20px;
  }
  .public-mode #view {
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }
  .me-hero {
    flex-direction: row;
    align-items: center;
    padding: 16px 20px 16px calc(20px + env(safe-area-inset-left));
    border-radius: 0 0 20px 20px;
    gap: 16px;
  }
  .me-hero-info {
    text-align: left;
  }
  .me-hero-roles {
    justify-content: flex-start;
  }
  .me-hero-avatar {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .me-logout-btn {
    top: 10px;
    right: 16px;
  }
}

/* ════════════════════════════════════════════════════════════
   📱  end MOBILE APP optimization
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   🗂  ADMIN DASHBOARD — 赛区工作台重设计
   ════════════════════════════════════════════════════════════ */

/* ── Header 身份栏 ────────────────────────────────────────── */
.admin-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, var(--nav-strong, #122d25) 0%, var(--nav, #1a3d30) 100%);
  border-radius: 16px;
  margin-bottom: 14px;
  color: #fff;
}

.admin-dash-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  flex-shrink: 0;
}

.admin-dash-name {
  display: block;
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 3px;
}

.admin-dash-scope {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.01em;
}

.admin-mvp-flow {
  padding: 16px 18px;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--nav, #1a3d30) 5%, #fff);
  border: 1px solid color-mix(in srgb, var(--nav, #1a3d30) 18%, var(--line));
  border-radius: 14px;
}

.admin-mvp-flow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-mvp-flow-head span {
  color: var(--muted);
  font-size: 12px;
}

.admin-mvp-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-mvp-flow li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
}

.admin-mvp-flow li > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border-radius: 50%;
  background: var(--nav, #1a3d30);
  color: #fff;
  font-size: 12px;
}

/* ── 待办横幅 ─────────────────────────────────────────────── */
.admin-urgent-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--action) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--action) 20%, var(--line));
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 14px;
}

.admin-urgent-banner strong {
  color: var(--action);
  font-weight: 400;
}

.admin-urgent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--action);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 18%, transparent);
  animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 18%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--action) 6%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .admin-urgent-dot {
    animation: none;
  }
}

.admin-urgent-banner--clear {
  background: color-mix(in srgb, var(--success-soft, #e8f5e9) 60%, #fff);
  border-color: color-mix(in srgb, #4caf50 20%, var(--line));
  color: var(--muted);
}

/* ── 主体区域 ─────────────────────────────────────────────── */
.admin-dash-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── 分区标题 ─────────────────────────────────────────────── */
.admin-dash-section-title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px 2px;
}

/* ── 卡片网格（单列） ────────────────────────────────────── */
.admin-dash-list {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

/* ── 单个导航卡片（左图标 右文字） ──────────────────────── */
.admin-dash-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  color: var(--ink);
  transition: background 0.15s;
}

.admin-dash-row + .admin-dash-row { border-top: 1px solid var(--line); }
.admin-dash-row:hover { background: color-mix(in srgb, var(--nav) 3%, var(--panel)); }
.admin-dash-row:active { background: var(--bg); }
.admin-dash-row:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: -3px;
}

.admin-dash-icon {
  font-size: 20px;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--nav) 7%, var(--bg));
  display: grid;
  place-items: center;
}

.admin-dash-label,
.admin-dash-label small {
  min-width: 0;
}

.admin-dash-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-dash-label strong {
  font-size: var(--admin-text-entry);
  font-weight: 400;
  color: var(--admin-color-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-dash-label small {
  font-size: var(--admin-text-caption);
  color: var(--admin-color-supporting);
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.admin-dash-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.admin-dash-arrow {
  font-size: 18px;
  color: var(--muted);
  font-weight: 400;
  transition: transform 0.15s;
}

.admin-dash-row:hover .admin-dash-arrow {
  transform: translateX(3px);
  color: var(--nav);
}

/* ── 待办数字徽标 ─────────────────────────────────────────── */
.admin-dash-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--action);
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

/* ── 超级管理员区块特殊样式 ──────────────────────────────── */
.admin-dash-section--super .admin-dash-section-title {
  color: color-mix(in srgb, var(--action) 70%, var(--muted));
}

.admin-dash-section--super .admin-dash-list {
  border-color: color-mix(in srgb, var(--action) 15%, var(--line));
  background: color-mix(in srgb, var(--action) 3%, #fff);
}

.admin-dash-section--super .admin-dash-row:hover {
  background: color-mix(in srgb, var(--action) 7%, #fff);
}

.admin-dash-section--super .admin-dash-icon {
  background: color-mix(in srgb, var(--action) 8%, var(--bg));
}

/* ── 手机端响应式 ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-dash-header {
    border-radius: 12px;
    padding: 16px 18px 14px;
    margin-bottom: 12px;
  }

  .admin-dash-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 16px;
  }

  .admin-dash-name {
    font-size: 16px;
  }

  .admin-urgent-banner {
    font-size: 13px;
    padding: 11px 14px;
    border-radius: 10px;
  }

  .admin-mvp-flow-head {
    display: block;
  }

  .admin-mvp-flow-head span {
    display: block;
    margin-top: 4px;
  }

  .admin-mvp-flow ol {
    grid-template-columns: 1fr 1fr;
  }

  .admin-dash-body {
    gap: 16px;
  }

  .admin-dash-section-title {
    font-size: 11px;
  }
}

@media (max-width: 680px) {
  .admin-dash-list { grid-template-columns: 1fr; border-radius: 0; }
  .admin-dash-row { min-height: 62px; padding: 10px 12px; }
}

/* ════════════════════════════════════════════════════════════
   end ADMIN DASHBOARD
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   REVIEW CARD LIST（审核卡片列表，替代多列宽表格）
   ════════════════════════════════════════════════════════════ */
.review-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  gap: 8px;
}

.review-card-body {
  padding: 4px 0;
}

.review-card-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
}
.review-card-row:last-child {
  border-bottom: none;
}

.review-card-label {
  flex: 0 0 80px;
  color: var(--text-muted, #888);
  font-size: 12px;
  white-space: nowrap;
}

.review-card-actions {
  padding: 12px 16px;
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}
.review-card-actions .primary-button {
  width: 100%;
}

@media (min-width: 769px) {
  .review-card-actions .primary-button {
    width: auto;
  }
}
/* ════════════════════════════════════════════════════════════
   end REVIEW CARD LIST
   ════════════════════════════════════════════════════════════ */

/* Remaining admin management routes share the Task 3 mobile contracts. */
.admin-mode .review-card-row {
  font-size: var(--admin-text-body);
  color: var(--admin-color-heading);
}

.admin-mode .review-card-label {
  font-size: var(--admin-text-caption);
  color: var(--admin-color-supporting);
}

.admin-mode .review-card-header,
.admin-mode .review-card-row > :last-child,
.admin-mode .admin-log-detail {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-mode .admin-log-detail {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-mode .admin-region-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-mode .admin-region-form .field { margin: 0; }
.admin-mode .admin-region-form button { min-height: 44px; }
.admin-mode .review-card-actions button { min-height: 44px; }
.admin-mode .admin-section-actions > :first-child { min-width: 0; }

.admin-mode dialog.modal {
  width: min(100%, 440px);
  max-width: calc(100vw - max(24px, env(safe-area-inset-left)) - max(24px, env(safe-area-inset-right)));
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  margin-block: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-bottom));
  padding: 0;
  border: 0;
  overflow: auto;
}

.admin-mode dialog.modal .modal-content {
  width: 100%;
  max-width: none !important;
  padding: 20px;
}

.admin-mode dialog.modal .form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.admin-mode dialog.modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-mode dialog.modal .modal-actions > *,
.admin-mode .modal-box :is(button, input, select, textarea) {
  min-height: 44px;
}

.admin-mode dialog.modal .confirm-dialog-actions > * {
  min-height: 44px;
}

.admin-mode .modal-overlay {
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.admin-mode .modal-box {
  position: relative;
  inset: auto;
  width: min(100%, 440px);
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  border-radius: 16px;
  overflow: auto;
}

@media (max-width: 680px) {
  .admin-mode .admin-region-form { grid-template-columns: minmax(0, 1fr); }
  .admin-mode .admin-section-actions { align-items: stretch; }
  .admin-mode .admin-section-actions > * { width: 100%; }
  .admin-mode .review-card-header { align-items: flex-start; }
  .admin-mode .review-card-row { align-items: start; }
}

/* ════════════════════════════════════════════════════════════
   我的赛事列表 & 增加管理员弹窗
   ════════════════════════════════════════════════════════════ */

/* 操作列 */
.event-action-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  white-space: nowrap;
}

/* 发布按钮 */
.btn-primary {
  border-color: var(--nav, #1a3d30) !important;
  color: var(--nav, #1a3d30) !important;
}
.btn-primary:hover {
  background: var(--nav, #1a3d30) !important;
  color: #fff !important;
}

/* 撤回按钮 */
.btn-warning {
  border-color: var(--warning, #b85c00) !important;
  color: var(--warning, #b85c00) !important;
}
.btn-warning:hover {
  background: var(--warning, #b85c00) !important;
  color: #fff !important;
}

/* 状态标签 gold（已撤回）*/
.tag.gold {
  background: var(--warning-soft, #fff3e0);
  color: var(--warning, #b85c00);
  border: 1px solid rgba(184,92,0,0.2);
}

/* 管理员弹窗遮罩 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,26,22,0.5);
  backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* 弹窗主体 */
.modal-box {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(10,26,22,0.18);
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-base);
}

.modal-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--line);
  color: var(--ink);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

/* 管理员 ID 标签 */
.auth-id-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: var(--text-sm);
  color: var(--ink);
}

.auth-id-remove {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.auth-id-remove:hover {
  background: var(--line);
  color: var(--ink);
}

@media (max-width: 520px) {
  .event-action-cell {
    gap: 4px;
  }
  .modal-box {
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
}

/* ════════════════════════════════════════════════════════════
   end 我的赛事列表 & 增加管理员弹窗
   ════════════════════════════════════════════════════════════ */
