@font-face {
  font-family: "Beaufort for LoL";
  src: url("../fonts/beaufortforlol-heavy.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Beaufort for LoL";
  src: url("../fonts/beaufortforlol-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spiegel";
  src: url("../fonts/spiegel-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spiegel";
  src: url("../fonts/spiegel-semibold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050a12;
  --bg-2: #0b1727;
  --surface: rgba(13, 24, 39, .88);
  --surface-solid: #0e1a2a;
  --surface-soft: #17263a;
  --line: rgba(200, 155, 60, .34);
  --line-blue: rgba(79, 182, 211, .26);
  --text: #f3ead7;
  --muted: #aeb9c8;
  --gold: #c89b3c;
  --gold-bright: #f0d28a;
  --blue: #4fb6d3;
  --green: #1f9f72;
  --red: #9d3348;
  --amber: #b77b30;
  --shadow: 0 26px 80px rgba(0, 0, 0, .46);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Spiegel", "Segoe UI", system-ui, Arial, sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(79, 182, 211, .17), transparent 25rem),
    radial-gradient(circle at 88% 7%, rgba(200, 155, 60, .17), transparent 24rem),
    linear-gradient(160deg, var(--bg), var(--bg-2) 52%, #03070d);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .78), transparent 76%);
}

button, input { font: inherit; }
button:disabled, input:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.hidden { display: none !important; }

.wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(200, 155, 60, .22);
  background: rgba(5, 10, 18, .86);
  backdrop-filter: blur(14px);
}

.topbar__inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar strong {
  font-family: "Beaufort for LoL", Georgia, serif;
  font-size: 22px;
  text-transform: uppercase;
}

.account-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.top-avatar,
.leader-avatar,
.profile-avatar,
.podium-card img {
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(240, 210, 138, .5);
  background: #050a12;
}

.top-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

.leaderboard-pill {
  height: 36px;
  border: 1px solid rgba(240, 210, 138, .45);
  border-radius: 999px;
  padding: 0 13px;
  color: #120d05;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
  font-family: "Beaufort for LoL", serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.game-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(240, 210, 138, .28);
  border-radius: 999px;
  background: rgba(5, 11, 20, .46);
}

.game-switch a {
  min-width: 74px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-family: "Beaufort for LoL", serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.game-switch a.active {
  color: #120d05;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
}

.compact-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 10, 18, .74), rgba(5, 10, 18, .94));
}

.compact-hero__inner {
  min-height: 172px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
}

.compact-hero__art {
  width: 250px;
  height: 136px;
  object-fit: cover;
  border: 1px solid rgba(240, 210, 138, .34);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34);
}

.compact-hero__copy {
  animation: rise .45s ease both;
}

.compact-hero__copy h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero__copy p {
  max-width: 600px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-bright);
  font-family: "Beaufort for LoL", serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.diamond {
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold-bright);
  transform: rotate(45deg);
  background: rgba(200, 155, 60, .22);
}

h1 {
  margin: 12px 0 0;
  font-family: "Beaufort for LoL", Georgia, serif;
  font-size: clamp(48px, 9vw, 104px);
  line-height: .88;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  max-width: 760px;
  color: #d8e0ec;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  margin: 18px 0 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.stat {
  min-width: 126px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 13, 24, .72);
  backdrop-filter: blur(12px);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-family: "Beaufort for LoL", serif;
  font-size: 19px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 0 54px;
  position: relative;
}

.game-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 28, 46, .9), rgba(7, 14, 25, .94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(200, 155, 60, .18);
}

.search { position: relative; }

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line-blue);
  border-radius: 8px;
  background: rgba(3, 8, 15, .76);
  color: var(--text);
  padding: 0 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(200, 155, 60, .16);
  transform: translateY(-1px);
}

.suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  max-height: 310px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 25, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.suggestions.open {
  display: block;
  animation: fadeIn .16s ease both;
}

.suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.suggestion:hover, .suggestion.active { background: rgba(79, 182, 211, .14); }
.suggestion img { width: 34px; height: 34px; border-radius: 7px; }
.suggestion small { color: var(--muted); }

.btn {
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 38, 58, .86);
  color: var(--text);
  padding: 0 16px;
  font-family: "Beaufort for LoL", serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}

.btn-small {
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: var(--gold-bright);
}

.btn-primary {
  color: #120d05;
  border-color: #f3cf80;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
}

.message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding: 0 16px;
  color: var(--muted);
  border-bottom: 1px solid rgba(200, 155, 60, .14);
}

.reset-countdown {
  flex: 0 0 auto;
  min-width: 184px;
  padding: 8px 11px;
  border: 1px solid rgba(240, 210, 138, .28);
  border-radius: 8px;
  color: var(--gold-bright);
  background: rgba(5, 11, 20, .44);
  font-family: "Beaufort for LoL", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 999px; }

.table-wrap { overflow: visible; }

table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 5px 9px;
  min-width: 0;
  padding: 6px 8px 12px;
}

th:nth-child(1), td:nth-child(1) { width: 9.5%; }
th:nth-child(2), td:nth-child(2) { width: 11%; }
th:nth-child(3), td:nth-child(3) { width: 13%; }
th:nth-child(4), td:nth-child(4) { width: 14%; }
th:nth-child(5), td:nth-child(5) { width: 12%; }
th:nth-child(6), td:nth-child(6) { width: 13%; }
th:nth-child(7), td:nth-child(7) { width: 15%; }
th:nth-child(8), td:nth-child(8) { width: 12.5%; }

th, td {
  padding: 0;
  border: 0;
  text-align: center;
  vertical-align: middle;
}

th {
  color: #d7bd80;
  font-family: "Beaufort for LoL", serif;
  font-size: clamp(10px, 1.15vw, 15px);
  line-height: 1.05;
  text-transform: uppercase;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 0 4px 14px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .85);
}

th::after {
  content: "";
  display: block;
  height: 4px;
  margin-top: 11px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(244, 232, 204, .88), transparent);
}

.guess-row.is-new { animation: slideRow .24s ease both; }

.champ-card,
.result-card {
  position: relative;
  min-height: 88px;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(244, 232, 204, .58);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4), 0 10px 22px rgba(0, 0, 0, .28);
  opacity: 1;
  transform: none;
  transform-origin: left center;
}

.guess-row.is-new .champ-card,
.guess-row.is-new .result-card {
  opacity: 0;
  transform: rotateY(78deg) translateY(8px);
  animation: flipCell 1.18s cubic-bezier(.16, .82, .18, 1) forwards;
  animation-delay: var(--delay);
}

.champ-card {
  min-height: 86px;
  background: #050a12;
}

.champ-card img {
  width: 100%;
  height: 100%;
  min-height: 86px;
  object-fit: cover;
}

.champ-name {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 5px 5px;
  background: linear-gradient(to top, rgba(0, 0, 0, .82), transparent);
  font-family: "Beaufort for LoL", serif;
  font-size: 12px;
  line-height: 1;
  color: white;
  text-shadow: 0 2px 3px black;
}

.result-card {
  min-width: 0;
  padding: 8px 7px;
  font-family: "Beaufort for LoL", Georgia, serif;
  font-size: clamp(12px, 1.45vw, 20px);
  font-weight: 900;
  line-height: 1.1;
  color: white;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .78);
  word-break: normal;
  overflow-wrap: anywhere;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background:
    linear-gradient(135deg, transparent 18%, rgba(255, 255, 255, .35) 19%, transparent 20%),
    linear-gradient(45deg, transparent 42%, rgba(0, 0, 0, .28) 43%, transparent 44%);
  background-size: 32px 32px, 44px 44px;
}

.result-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 0, 0, .2);
  background: linear-gradient(135deg, transparent 49%, rgba(0, 0, 0, .12) 50%, transparent 51%);
  opacity: .55;
}

.result-card span {
  position: relative;
  z-index: 1;
}

.match { background: linear-gradient(180deg, #12ca46, #078d2f 72%, #047325); }
.miss { background: linear-gradient(180deg, #e01111, #a50909 72%, #7c0606); }
.partial { background: linear-gradient(180deg, #eeae24, #c77a0d 72%, #995706); }

.empty {
  color: var(--muted);
  padding: 32px;
  text-align: center;
  background: rgba(5, 11, 20, .32);
}

.footer-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.leaderboard {
  order: -1;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 28, 46, .9), rgba(7, 14, 25, .94));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.leaderboard-modal {
  order: initial;
  width: min(1040px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
}

.leaderboard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(200, 155, 60, .18);
}

.leaderboard__head span {
  color: var(--muted);
  font-size: 12px;
}

.leaderboard__head strong {
  display: block;
  margin-top: 4px;
  font-family: "Beaufort for LoL", serif;
  color: var(--text);
}

.medal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #151005 !important;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
  font-size: 22px !important;
}

.leaderboard ol {
  list-style: none;
  margin: 0;
  padding: 14px 18px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 44px 58px minmax(180px, 1fr) repeat(3, minmax(86px, 110px)) 78px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(5, 11, 20, .36);
  color: var(--muted);
}

.leaderboard li + li { border-top: 0; }
.leaderboard li strong { color: var(--text); }

.leader-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
}

.leader-rank {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(240, 210, 138, .32);
  border-radius: 8px;
  color: var(--gold-bright);
  font-family: "Beaufort for LoL", serif;
  font-size: 18px;
}

.leader-player {
  min-width: 0;
}

.leader-player strong {
  display: block;
  font-family: "Beaufort for LoL", serif;
  font-size: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leader-player span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.leader-metric {
  min-width: 88px;
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(200, 155, 60, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.leader-metric--wide {
  min-width: 118px;
}

.leader-metric span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1.1;
}

.leader-metric strong {
  font-family: "Beaufort for LoL", serif;
  font-size: 18px;
  line-height: 1;
}

.leader-detail {
  grid-column: 2 / -1;
  margin-top: 8px;
  border: 1px solid rgba(200, 155, 60, .12);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  overflow: hidden;
}

.leader-detail summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--gold-2);
}

.leader-detail summary::-webkit-details-marker {
  display: none;
}

.leader-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
}

.leader-detail-list span {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  font-size: 12px;
  color: var(--text);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 18px 6px;
}

.podium-card,
.podium-empty {
  min-height: 96px;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(240, 210, 138, .28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 210, 138, .12), transparent 42%),
    rgba(5, 11, 20, .48);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28);
}

.podium-card {
  position: relative;
}

.podium-card img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
}

.podium-card-1 {
  border-color: rgba(240, 210, 138, .72);
  background:
    linear-gradient(135deg, rgba(240, 210, 138, .28), transparent 48%),
    rgba(5, 11, 20, .58);
}

.podium-info {
  min-width: 0;
}

.podium-info strong {
  display: block;
  font-family: "Beaufort for LoL", serif;
  font-size: 24px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-info span,
.podium-info small,
.podium-card em,
.podium-empty {
  color: var(--muted);
  font-style: normal;
}

.podium-info small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.podium-place {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #120d05 !important;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
  font-family: "Beaufort for LoL", serif;
  font-size: 13px;
}

.medal-count {
  justify-self: end;
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid rgba(240, 210, 138, .24);
  border-radius: 999px;
  color: var(--gold-bright) !important;
  font-family: "Beaufort for LoL", serif;
  text-align: center;
}
.empty-leaderboard { display: block !important; text-align: center; padding: 18px !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 14, 25, .96);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(1, 5, 12, .72);
  backdrop-filter: blur(8px);
}

.modal.open {
  display: grid;
  animation: fadeIn .2s ease both;
}

.auth-card {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  padding: 18px;
  animation: modalIn .26s ease both;
}

.auth-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-card h2 {
  margin: 0;
  font-family: "Beaufort for LoL", serif;
  font-size: 32px;
  text-transform: uppercase;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 38, 58, .86);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  height: 42px;
  border: 1px solid rgba(200, 155, 60, .22);
  border-radius: 8px;
  background: rgba(5, 11, 20, .52);
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  color: #120d05;
  border-color: #f3cf80;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
  font-weight: 700;
}

.auth-card form {
  display: grid;
  gap: 12px;
}

.profile-box {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(200, 155, 60, .2);
  border-radius: 8px;
  background: rgba(5, 11, 20, .42);
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  object-position: center;
}

.profile-box strong {
  display: block;
  margin-bottom: 9px;
  font-family: "Beaufort for LoL", serif;
  font-size: 22px;
}

.upload-btn {
  display: inline-grid !important;
  place-items: center;
  min-height: 38px;
  width: fit-content;
  padding: 0 12px;
  border: 1px solid rgba(240, 210, 138, .42);
  border-radius: 8px;
  color: #120d05 !important;
  background: linear-gradient(180deg, #f0d28a, #b9842d);
  font-family: "Beaufort for LoL", serif;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.upload-btn input { display: none; }

.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.victory {
  width: min(620px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  animation: modalIn .26s ease both;
}

.victory-art {
  min-height: 230px;
  background-image: linear-gradient(180deg, transparent, rgba(14, 26, 42, .98)), var(--victory);
  background-size: cover;
  background-position: center 24%;
  display: flex;
  align-items: end;
  padding: 18px;
}

.victory h2 {
  margin: 0;
  font-family: "Beaufort for LoL", serif;
  font-size: 36px;
  line-height: 1;
  text-transform: uppercase;
}

.victory-body {
  padding: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.victory-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

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

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

@keyframes flipCell {
  0% { opacity: 0; transform: rotateY(78deg) translateY(8px); filter: brightness(.6); }
  65% { opacity: 1; transform: rotateY(-8deg) translateY(0); filter: brightness(1.12); }
  100% { opacity: 1; transform: rotateY(0) translateY(0); filter: brightness(1); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .compact-hero__inner { grid-template-columns: 1fr; }
  .compact-hero__art { width: 100%; height: 120px; }
  .podium { grid-template-columns: 1fr; }
  .leaderboard-modal { width: min(940px, calc(100vw - 20px)); }
  .leaderboard ol { padding: 12px; }
  .leaderboard li {
    grid-template-columns: 34px 46px minmax(0, 1fr);
    gap: 8px;
  }
  .leader-metric {
    grid-column: span 1;
    padding: 6px;
  }
  .medal-count {
    justify-self: stretch;
    grid-column: 1 / -1;
  }
  table { border-spacing: 3px 7px; padding-inline: 4px; }
  .result-card, .champ-card { min-height: 72px; }
  .champ-card img { min-height: 72px; }
  .result-card { font-size: clamp(10px, 3vw, 14px); padding: 5px 3px; }
  .champ-name { display: none; }
  th { font-size: 9px; padding-inline: 0; }
  .controls { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .topbar__inner { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .account-strip { flex-wrap: wrap; }
  .message { align-items: flex-start; flex-direction: column; padding: 13px 16px; }
  .reset-countdown { width: 100%; }
  .stat { flex: 1 1 130px; }
}
