/* ============================================================
   ancientfit-frontend/css/profile-upgrade.css
   Athlete Profile upgrade (P-2, Session 42; P-3 trend; P-4 rings; P-4b menus)
   Loaded AFTER profile.css. Same dark glass look; adds:
   Material Symbols sizing, the athlete header, the 6 activity cards,
   the personal-info collapse and the generic activity detail.
   Activity colours come in through --act-color (set inline per card).
   ============================================================ */

:root {
  --act-workout: #FF8C00;
  --act-mountain: #DC143C;
  --act-tachydronic: #FFD700;
  --act-hike: #6B7F55;
  --act-kayak: #64D8FF;
  --act-air: #A78BFA;
  --hero-gold: #FFD700;
}

/* ============================================================
   MATERIAL SYMBOLS — base
   ============================================================ */
.material-symbols-rounded.af-ms {
  font-size: 1.15em;
  line-height: 1;
  vertical-align: -0.18em;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

.material-symbols-rounded.af-ms-fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Header / footer / cart buttons that used emoji */
.menu-toggle .material-symbols-rounded,
.cart-icon .material-symbols-rounded,
#scrollToTopMainBtn .material-symbols-rounded,
.detail-close-btn .material-symbols-rounded,
.close-btn .material-symbols-rounded,
.close .material-symbols-rounded {
  font-size: 1.25em;
  line-height: 1;
  vertical-align: middle;
}

#toggleLangBtn .material-symbols-rounded,
.cart-pay-btn .material-symbols-rounded,
.terms-body .material-symbols-rounded {
  font-size: 1.1em;
  vertical-align: -0.2em;
  margin-right: 4px;
}

/* ============================================================
   ATHLETE HEADER
   ============================================================ */
.athlete-hero {
  padding: 28px 32px 26px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255, 215, 0, 0.10), transparent 55%),
    rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 215, 0, 0.16);
}

.athlete-hero:empty {
  display: none;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-avatar {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--hero-gold);
  background: radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.18), rgba(0, 0, 0, 0.6));
  border: 2px solid rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.15);
}

.hero-identity {
  flex: 1;
  min-width: 0;
}

.hero-name {
  font-family: 'Anton', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 8px;
  word-break: break-word;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.hero-tag .flag {
  font-size: 1rem;
}

.hero-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.18);
  max-width: 100%;
}

.hero-id-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--hero-gold);
  word-break: break-all;
}

.hero-copy-btn {
  background: none;
  border: none;
  color: rgba(255, 215, 0, 0.75);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
  display: inline-flex;
  transition: color 0.2s ease, background 0.2s ease;
}

.hero-copy-btn:hover {
  color: #fff;
  background: rgba(255, 215, 0, 0.15);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  min-width: 0;
}

.hero-stat .af-ms {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.hero-stat-num {
  font-family: 'Anton', sans-serif;
  font-size: 1.45rem;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.hero-stats-note {
  margin: 10px 0 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: right;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 215, 0, 0.07);
  border: 1px solid rgba(255, 215, 0, 0.16);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

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

.hero-chip em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.7rem;
}

.hero-chip-streak {
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.2);
}

/* ============================================================
   PERSONAL INFO — collapse
   ============================================================ */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-collapse-btn:hover {
  color: #fff;
  border-color: rgba(255, 215, 0, 0.3);
}

.section-collapse-btn .af-ms {
  transition: transform 0.25s ease;
}

.section-collapse-btn.is-open .af-ms {
  transform: rotate(180deg);
}

.section-collapse-btn .collapse-label-open { display: none; }
.section-collapse-btn.is-open .collapse-label-open { display: inline; }
.section-collapse-btn.is-open .collapse-label-closed { display: none; }

.personal-info-section .section-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.personal-info-body {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.personal-info-body[hidden] {
  display: none;
}

/* ============================================================
   ACTIVITY CARDS (Section 3)
   ============================================================ */
.domains-grid.act-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.act-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 10px;
  padding: 20px 18px 16px;
}

.act-card::before {
  background: var(--act-color);
}

.act-card:hover {
  border-color: color-mix(in srgb, var(--act-color) 35%, transparent);
}

.act-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.act-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--act-color);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--act-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--act-color) 30%, transparent);
  flex-shrink: 0;
}

.act-icon .af-ms {
  vertical-align: 0;
}

.act-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.act-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.act-count-num {
  font-family: 'Anton', sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--act-color);
}

.act-count-noun {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.act-main,
.act-recent {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 0.8rem;
  color: #fff;
}

.act-main-label,
.act-recent-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.act-main-label em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.3);
  margin-left: 4px;
}

.act-main-value {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.act-recent {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.act-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.act-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
}

.act-sub strong {
  color: #fff;
}

.act-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  min-height: 1em;
}

.act-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.act-card .domain-view-btn {
  margin-top: auto;
  align-self: flex-start;
}

.act-card .domain-view-btn:hover:not(:disabled) {
  border-color: var(--act-color);
  color: var(--act-color);
}

.act-card .domain-view-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.act-card-empty .act-count-num {
  color: rgba(255, 255, 255, 0.25);
}

.act-empty-text {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   HISTORY + CHRONICLE icons
   ============================================================ */
.history-item .h-icon .af-ms {
  font-size: 1.3rem;
  vertical-align: 0;
}

.history-item .h-details .af-ms {
  font-size: 0.95rem;
  vertical-align: -0.2em;
}

.chronicle-entry-icon .af-ms {
  color: var(--hero-gold);
}

.arena-card-value .af-ms,
.chronicle-record-badge .af-ms,
.chronicle-dedication .af-ms {
  font-size: 1.05em;
  vertical-align: -0.18em;
}

.trend-tooltip .tooltip-details .af-ms {
  font-size: 0.95rem;
  vertical-align: -0.22em;
}

/* ============================================================
   PERFORMANCE TREND (P-3) — Days/Months/Years + hover popup
   ============================================================ */
.trend-tooltip {
  min-width: 200px;
  max-width: 320px;
}

.trend-tooltip .tooltip-details {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.trend-tooltip .tt-row {
  padding: 4px 0 4px 8px;
  border-left: 2px solid var(--act-color, rgba(255, 255, 255, 0.2));
  margin-top: 4px;
}

.trend-tooltip .tt-row strong,
.trend-tooltip .tt-sub strong {
  color: #fff;
  font-weight: 600;
}

.trend-tooltip .tt-subs {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.trend-tooltip .tt-facts {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.trend-tooltip .tt-sub {
  padding-top: 2px;
}

.trend-tooltip .af-ms {
  font-size: 0.95rem;
  vertical-align: -0.22em;
}

/* ============================================================
   GENERIC ACTIVITY DETAIL
   ============================================================ */
.act-detail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: 'Anton', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--act-color);
}

.act-verified {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(0, 184, 148, 0.12);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: #00B894;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0;
}

.act-detail-head + .detail-grid {
  margin-bottom: 16px;
}

/* ============================================================
   RINGS (P-4) — credential days left + Championship top-3
   The arc length is set inline (stroke-dashoffset); the colour
   comes in through --ring-color.
   ============================================================ */
.af-ring {
  --ring-size: 58px;
  position: relative;
  width: var(--ring-size);
  height: var(--ring-size);
  flex-shrink: 0;
}

.af-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.af-ring-track,
.af-ring-arc {
  fill: none;
  stroke-width: 3.2;
}

.af-ring-track {
  stroke: rgba(255, 255, 255, 0.08);
  stroke: color-mix(in srgb, var(--ring-color) 18%, transparent);
}

.af-ring.is-bad .af-ring-track {
  stroke: rgba(255, 71, 87, 0.45);
}

.af-ring-arc {
  stroke: var(--ring-color);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  animation: afRingDraw 0.9s ease-out both;
}

@keyframes afRingDraw {
  from { stroke-dashoffset: 100; }
}

.af-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  pointer-events: none;
}

.af-ring-num {
  font-family: 'Anton', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.af-ring-num.is-long {
  font-size: 0.78rem;
}

.af-ring-unit {
  margin-top: 2px;
  font-size: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.af-ring-word {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ring-color);
}

.af-ring-center .af-ms {
  font-size: 1.15rem;
  vertical-align: 0;
  color: var(--ring-color);
}

/* Credential card — ring in the top-right corner */
.certificate-card.af-has-ring > .af-ring {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
}

/* Arena — the ring takes the place of the status icon */
.arena-qualification-status.af-has-ring .arena-qualification-icon {
  display: none;
}

.arena-qualification-status > .af-ring {
  --ring-size: 52px;
}

@media (prefers-reduced-motion: reduce) {
  .af-ring-arc {
    animation: none;
  }
}

/* ============================================================
   ICONS + ROUTE MAP (P-4c)
   ============================================================ */
/* Drawn icons (the air rowing machine) sit exactly like font icons */
.af-svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
}

.af-svg-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* MapLibre route map in the detail popup — dark controls */
.af-route-map {
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.af-route-map .maplibregl-ctrl-group {
  background: rgba(10, 14, 22, 0.88);
  border: 1px solid rgba(255, 215, 0, 0.2);
  box-shadow: none;
}

.af-route-map .maplibregl-ctrl-group button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.af-route-map .maplibregl-ctrl-icon,
.af-route-map .maplibregl-ctrl-attrib-button {
  filter: invert(1) brightness(0.9);
}

.af-route-map .maplibregl-ctrl-attrib {
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.af-route-map .maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(10, 14, 22, 0.88);
}

.af-route-map .maplibregl-ctrl-attrib a {
  color: rgba(255, 215, 0, 0.6);
}

.af-route-map .maplibregl-popup-content {
  background: rgba(8, 12, 20, 0.95);
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.af-route-map .maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: rgba(8, 12, 20, 0.95);
}

.af-route-map .maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: rgba(8, 12, 20, 0.95);
}

.af-route-map .af-route-mark {
  pointer-events: none;
}

/* ============================================================
   MENUS (P-4b) — trend + history selects
   One dark, rounded style with a gold arrow. The open list is dark
   too (no more white popup): color-scheme tells the browser the
   menu is dark, and every option gets the same dark background.
   ============================================================ */
.trend-controls .trend-filter,
.history-controls .history-filter {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  color-scheme: dark;
  min-height: 34px;
  padding: 7px 34px 7px 14px;
  border-radius: 30px;
  border: 1px solid rgba(255, 215, 0, 0.18);
  background-color: rgba(10, 14, 22, 0.85);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.trend-controls .trend-filter:hover,
.history-controls .history-filter:hover {
  border-color: rgba(255, 215, 0, 0.4);
  background-color: rgba(20, 24, 34, 0.95);
}

.trend-controls .trend-filter:focus-visible,
.history-controls .history-filter:focus-visible {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

.trend-controls .trend-filter option,
.history-controls .history-filter option {
  background-color: #0c1420;
  color: #fff;
  font-weight: 500;
}

.trend-controls .trend-filter option:checked,
.history-controls .history-filter option:checked {
  background-color: #2b2410;
  color: #FFD700;
}

.history-controls .history-refresh-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 215, 0, 0.18);
  background: rgba(10, 14, 22, 0.85);
  color: rgba(255, 215, 0, 0.8);
}

.history-controls .history-refresh-btn:hover {
  border-color: rgba(255, 215, 0, 0.4);
  color: #FFD700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .domains-grid.act-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-hero {
    padding: 22px 18px 20px;
  }

  .hero-name {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }

  .hero-name {
    font-size: 1.4rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-stat-num {
    font-size: 1.2rem;
  }

  .hero-stats-note {
    text-align: left;
  }

  .domains-grid.act-grid {
    grid-template-columns: 1fr;
  }

  .personal-info-section .section-header {
    flex-direction: row;
    align-items: center;
  }

  /* P-4: keep the ring beside its words on phones */
  .arena-qualification-status.af-has-ring {
    flex-direction: row;
    align-items: center;
    gap: 6px 12px;
  }

  .arena-qualification-status.af-has-ring .arena-qualification-text {
    flex: 1 1 calc(100% - 60px);
    min-width: 0;
  }

  /* the badge drops under the words, lined up with them */
  .arena-qualification-status.af-has-ring .arena-qualification-badge {
    margin-left: 58px;
  }

  .arena-qualification-status > .af-ring {
    --ring-size: 46px;
  }
}

@media (max-width: 380px) {
  /* P-4b: menus keep room for the arrow */
  .trend-controls .trend-filter,
  .history-controls .history-filter {
    padding: 6px 30px 6px 12px;
    background-position: right 10px center;
    font-size: 0.68rem;
  }

  .athlete-hero {
    padding: 16px 12px;
  }

  .hero-chip {
    font-size: 0.68rem;
    padding: 5px 10px;
  }

  .hero-stat {
    padding: 10px 6px;
  }

  /* P-4b: the activity menu gets its own row, the rest share the next */
  .history-controls #historyDomainFilter {
    flex: 1 1 100%;
  }

  /* P-4 */
  .certificate-card.af-has-ring > .af-ring {
    --ring-size: 50px;
    top: 10px;
    right: 10px;
  }
}

/* ============================================================
   Phase 2d — "Find your template" button in the athlete header
   ============================================================ */
.hero-soma-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px; cursor: pointer;
  font: inherit; font-size: 0.85rem; font-weight: 600;
  background: rgba(255, 215, 0, 0.14); color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.5);
}
.hero-soma-btn:hover { background: rgba(255, 215, 0, 0.22); }

/* ============================================================
   ACCOUNT DELETION (Phase 2) — reactivate banner, danger zone, modal
   ============================================================ */
.af-reactivate-banner {
  display: none; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(220, 20, 60, 0.12); border: 1px solid rgba(220, 20, 60, 0.4);
  border-radius: 16px; padding: 16px 20px; margin-bottom: 8px;
}
.af-reactivate-banner.show { display: flex; }
.af-reactivate-icon { color: #ff6b6b; font-size: 1.3rem; }
.af-reactivate-text { flex: 1; min-width: 200px; }
.af-reactivate-text strong { display: block; color: #fff; font-weight: 700; }
.af-reactivate-text span { color: rgba(255, 255, 255, 0.7); font-size: 0.85rem; }
.af-reactivate-btn {
  background: linear-gradient(135deg, #00b894, #006666); color: #fff; border: none;
  padding: 10px 22px; border-radius: 40px; font-weight: 700; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.af-reactivate-btn:hover { filter: brightness(1.08); }
.af-reactivate-btn:disabled { opacity: 0.5; cursor: default; }

.af-danger-zone:not(.show) { display: none; }
.af-danger-zone { border-color: rgba(220, 20, 60, 0.25); }
.af-danger-desc { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; line-height: 1.6; }

.af-btn {
  background: rgba(255, 255, 255, 0.06); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 20px; border-radius: 40px; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.af-btn:hover { background: rgba(255, 255, 255, 0.12); }
.af-btn:disabled { opacity: 0.5; cursor: default; }
.af-btn-danger { background: rgba(220, 20, 60, 0.18); border-color: rgba(220, 20, 60, 0.5); color: #ff6b6b; }
.af-btn-danger:hover { background: rgba(220, 20, 60, 0.3); }

.af-delete-modal {
  display: none; position: fixed; inset: 0; z-index: 100001;
  background: rgba(0, 0, 0, 0.85); align-items: center; justify-content: center; padding: 16px;
}
.af-delete-modal.show { display: flex; }
.af-delete-dialog {
  max-width: 480px; width: 100%; background: rgba(12, 12, 18, 0.97);
  border: 1px solid rgba(220, 20, 60, 0.35); border-radius: 20px; padding: 24px;
}
.af-delete-title { font-family: 'Anton', sans-serif; color: #fff; margin: 0 0 12px; }
.af-delete-dialog p { color: rgba(255, 255, 255, 0.85); line-height: 1.6; }
.af-delete-dialog #afDeleteModalBody p + p { margin-top: 10px; }
.af-delete-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.af-delete-note-gold { color: #FFD700; }
.af-delete-note-muted { color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; }
/* ============================================================
   PA-1 — THE ARENA: this year's championships (one row each)
   and the place badges in the Chronicle. Medal colours match the
   Certificate of Honor (gold / silver / bronze).
   ============================================================ */
:root {
  --medal-gold: #FFD700;
  --medal-silver: #C0C0C0;
  --medal-bronze: #CD7F32;
}

.arena-champs {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arena-champs-head {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

.arena-champ-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.arena-champ-row.is-focus {
  border-color: rgba(255, 215, 0, 0.22);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(255, 215, 0, 0.07), transparent 60%),
    rgba(0, 0, 0, 0.5);
}

.arena-champ-row.is-gold { border-color: rgba(255, 215, 0, 0.45); box-shadow: 0 0 22px rgba(255, 215, 0, 0.10); }
.arena-champ-row.is-silver { border-color: rgba(192, 192, 192, 0.4); }
.arena-champ-row.is-bronze { border-color: rgba(205, 127, 50, 0.45); }

.arena-champ-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 220px;
}

.arena-champ-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.arena-champ-title .af-ms {
  color: var(--medal-gold);
}

.arena-champ-detail {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.arena-champ-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.arena-champ-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.arena-champ-chip i { font-size: 0.7rem; }

.arena-champ-chip.is-result.is-gold { color: var(--medal-gold); border-color: rgba(255, 215, 0, 0.45); background: rgba(255, 215, 0, 0.10); }
.arena-champ-chip.is-result.is-silver { color: var(--medal-silver); border-color: rgba(192, 192, 192, 0.4); background: rgba(192, 192, 192, 0.08); }
.arena-champ-chip.is-result.is-bronze { color: var(--medal-bronze); border-color: rgba(205, 127, 50, 0.45); background: rgba(205, 127, 50, 0.10); }
.arena-champ-chip.is-result { color: #fff; }
.arena-champ-chip.is-registered { color: #00B894; border-color: rgba(0, 184, 148, 0.3); background: rgba(0, 184, 148, 0.10); }
.arena-champ-chip.is-open { color: var(--medal-gold); border-color: rgba(255, 215, 0, 0.35); background: rgba(255, 215, 0, 0.08); }
.arena-champ-chip.is-pending { color: #FFB347; border-color: rgba(255, 179, 71, 0.3); background: rgba(255, 179, 71, 0.08); }
.arena-champ-chip.is-muted { color: rgba(255, 255, 255, 0.45); }

/* Black with a gold border, like the RIVALBOARD buttons */
.arena-champ-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 30px;
  background: #0a0a0b;
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: var(--medal-gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.arena-champ-btn:hover {
  background: #141416;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.18);
}

.arena-champ-btn:focus-visible {
  outline: 2px solid var(--medal-gold);
  outline-offset: 2px;
}

.arena-champ-foot {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Chronicle — a championship shows its place */
.chronicle-status-badge.place {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.chronicle-status-badge.place.is-gold { background: rgba(255, 215, 0, 0.12); color: var(--medal-gold); border-color: rgba(255, 215, 0, 0.35); }
.chronicle-status-badge.place.is-silver { background: rgba(192, 192, 192, 0.10); color: var(--medal-silver); border-color: rgba(192, 192, 192, 0.35); }
.chronicle-status-badge.place.is-bronze { background: rgba(205, 127, 50, 0.12); color: var(--medal-bronze); border-color: rgba(205, 127, 50, 0.35); }

.chronicle-status-badge.place .af-ms {
  font-size: 0.95rem;
  vertical-align: 0;
}

@media (max-width: 600px) {
  .arena-champ-row {
    padding: 12px 14px;
  }

  .arena-champ-side {
    width: 100%;
  }

  .arena-champ-btn {
    margin-left: auto;
  }
}