.page-medals .site-nav { margin-bottom: clamp(28px, 4vw, 48px); }
.page-medals .site-nav a[href="medals.html"]::after { right: 8px; left: 8px; }

.medals-access-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  color: var(--parchment);
  font-weight: 700;
}

.medals-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(98, 194, 180, 0.2);
  border-top-color: var(--verdigris-400, #62c2b4);
  border-radius: 50%;
  animation: medals-spin 800ms linear infinite;
}

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

.static-copper-frame { border: 1px solid var(--copper-frame, rgba(193, 125, 79, 0.58)); }

.medals-hero {
  max-width: 820px;
  margin: 0 auto 34px;
  padding: 0;
  border: 0 !important;
  text-align: center;
  background: none;
}

.medals-eyebrow {
  margin: 0 0 12px;
  color: var(--copper-light, #e2a270);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.medals-hero h1 {
  margin: 0 0 14px;
  color: var(--limestone, #eee9df);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.medals-hero p:last-child { max-width: none; margin: 0 auto; color: var(--parchment, #d3cec2); }

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

.medals-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: rgba(7, 24, 17, 0.84);
}

.medals-summary-card span { color: var(--parchment, #d3cec2); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.medals-summary-card strong { font-size: 1.75rem; }
.medals-summary-card.bronze strong { color: #d18b58; }
.medals-summary-card.silver strong { color: #dce4e6; }
.medals-summary-card.gold strong { color: #f6d35a; }
.medals-summary-card.platinum strong { color: #b7d6df; }

.medals-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(7, 24, 17, 0.82);
}

.medals-tabs { display: grid; grid-template-columns: repeat(2, 160px); gap: 8px; }
.medals-tab {
  width: 160px;
  min-width: 0;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid rgba(98, 194, 180, 0.22);
  border-radius: 9px;
  color: var(--parchment, #d3cec2);
  background: rgba(2, 13, 9, 0.68);
}
.medals-tab span { margin-left: 5px; color: var(--bark, #948a78); }
.medals-tab.active { border-color: rgba(98, 194, 180, 0.72); color: #f5f1e8; background: rgba(23, 107, 98, 0.3); }
.medals-tab.active span { color: #8be2d4; }

.medals-table-shell { overflow: hidden; border-radius: 16px; background: rgba(4, 16, 11, 0.9); }
.medals-table-scroll { overflow-x: auto; }
.medals-table { width: 100%; min-width: 1180px; border-collapse: collapse; table-layout: fixed; }
.medals-table th {
  padding: 15px 12px;
  color: var(--copper-light, #e2a270);
  background: rgba(12, 31, 23, .96);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.medals-table th:nth-child(1) { width: 170px; }
.medals-table th:nth-child(2) { width: 260px; }
.medals-table th:nth-child(3) { width: 170px; }
.medals-table th:nth-child(n+4):nth-child(-n+7) { width: 120px; text-align: center; }
.medals-table th:nth-child(8) { width: 160px; text-align: center; }
.medals-table td { padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.075); vertical-align: middle; }
.medals-table tbody tr:hover { background: rgba(40, 96, 71, .08); }

.medal-name { display: flex; align-items: center; gap: 11px; color: var(--limestone, #eee9df); font-weight: 800; }
.medal-name img { width: 42px; height: 42px; object-fit: contain; filter: saturate(.45) brightness(.7); }
.medal-description { color: var(--parchment, #d3cec2); font-size: 13px; line-height: 1.4; }
.medal-progress-input { width: 100%; min-width: 146px; height: 42px; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.medal-tier { text-align: center; transition: background 160ms ease, box-shadow 160ms ease; }
.medal-tier-inner { display: grid; justify-items: center; gap: 3px; padding: 4px; border-radius: 10px; }
.medal-tier img { width: 48px; height: 48px; object-fit: contain; opacity: .25; filter: grayscale(1) brightness(.6); transition: all 160ms ease; }
.medal-tier small { color: #746d61; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.medal-tier.earned img { opacity: 1; filter: none; transform: scale(1.05); }
.medal-tier.earned small { color: #f4eadc; }
.medal-tier.bronze.earned .medal-tier-inner { background: rgba(177, 104, 57, .18); box-shadow: inset 0 0 0 1px rgba(209, 139, 88, .42), 0 0 20px rgba(177, 104, 57, .09); }
.medal-tier.silver.earned .medal-tier-inner { background: rgba(198, 211, 215, .14); box-shadow: inset 0 0 0 1px rgba(220, 228, 230, .38), 0 0 20px rgba(220, 228, 230, .07); }
.medal-tier.gold.earned .medal-tier-inner { background: rgba(230, 183, 47, .16); box-shadow: inset 0 0 0 1px rgba(246, 211, 90, .42), 0 0 22px rgba(246, 211, 90, .08); }
.medal-tier.platinum.earned .medal-tier-inner { background: rgba(122, 174, 191, .16); box-shadow: inset 0 0 0 1px rgba(183, 214, 223, .44), 0 0 22px rgba(183, 214, 223, .08); }

.medal-needed { text-align: center; color: var(--limestone, #eee9df); font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; }
.medal-needed span { display: block; color: var(--bark, #948a78); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.medal-needed.complete { color: #8be2d4; }
.medals-empty { padding: 42px 20px; color: var(--parchment, #d3cec2); text-align: center; }
.medals-attribution { max-width: 880px; margin: 22px auto 0; color: var(--bark, #948a78); font-size: 11px; line-height: 1.6; text-align: center; }

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

@media (max-width: 620px) {
  .medals-summary { grid-template-columns: 1fr 1fr; }
  .medals-summary-card { padding: 14px; }
  .medals-tabs { width: 100%; grid-template-columns: 1fr 1fr; }
  .medals-tab { width: 100%; }
}
