:root {
  --bg-0: #09051d;
  --bg-1: #150735;
  --bg-2: #24105a;
  --panel: rgba(43, 14, 91, 0.86);
  --panel-strong: rgba(58, 19, 112, 0.94);
  --panel-soft: rgba(106, 35, 162, 0.38);
  --line: rgba(179, 86, 255, 0.42);
  --line-strong: rgba(224, 120, 255, 0.72);
  --text: #fff9e8;
  --muted: #d8c6ff;
  --gold: #ffca4a;
  --gold-deep: #ff9d2e;
  --blue: #38bdf8;
  --blue-deep: #167ac6;
  --pink: #f05c9c;
  --pink-deep: #c92f70;
  --danger: #ff6262;
  --success: #7ee787;
  --shadow: 0 18px 50px rgba(5, 1, 18, 0.45);
  --radius: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 70% 7%, rgba(56, 189, 248, 0.28), transparent 24rem),
    radial-gradient(circle at 28% 22%, rgba(232, 90, 188, 0.22), transparent 18rem),
    linear-gradient(180deg, #09051d 0%, #160636 38%, #230d51 100%);
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.85;
  background-image:
    radial-gradient(circle, rgba(255, 204, 74, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 249, 232, 0.65) 0 1px, transparent 2px);
  background-position: 18px 36px, 72px 104px;
  background-size: 112px 128px, 176px 188px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

body::after {
  background:
    radial-gradient(ellipse at 0% 85%, rgba(81, 167, 119, 0.5), transparent 12rem),
    radial-gradient(ellipse at 100% 83%, rgba(81, 167, 119, 0.45), transparent 13rem),
    linear-gradient(to bottom, transparent 0 72%, rgba(12, 4, 33, 0.72) 100%);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.spark {
  position: absolute;
  width: 8px;
  aspect-ratio: 1;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 9px rgba(255, 202, 74, 0.72));
  opacity: 0.9;
}

.spark-one {
  top: 17%;
  left: 18%;
}

.spark-two {
  top: 28%;
  right: 23%;
  width: 11px;
}

.spark-three {
  top: 65%;
  left: 30%;
  width: 6px;
}

.spark-four {
  top: 73%;
  right: 14%;
}

.island {
  position: absolute;
  bottom: -44px;
  width: 220px;
  height: 120px;
  border-radius: 52% 48% 18% 21%;
  background:
    radial-gradient(ellipse at 50% 0, #68b878 0 22%, transparent 23%),
    linear-gradient(160deg, #366b64, #17123d 63%);
  box-shadow: 0 -8px 35px rgba(88, 223, 151, 0.22);
  opacity: 0.72;
}

.island-left {
  left: -54px;
}

.island-right {
  right: -36px;
  transform: scaleX(-1);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

main,
.game-panel {
  min-width: 0;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(90px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(54, 14, 107, 0.98), rgba(26, 9, 70, 0.96)),
    radial-gradient(circle at 20% 0, rgba(255, 202, 74, 0.22), transparent 16rem);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.site-header > *,
.fight-layout > *,
.below-grid > *,
.dashboard-grid > *,
.admin-grid > * {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.brand small {
  display: block;
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.06em;
}

.buddy-img {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 16px 20px rgba(4, 1, 18, 0.42));
}

.brand-buddy {
  width: 58px;
  height: 58px;
  object-position: center;
}

.panel-buddy {
  width: clamp(92px, 11vw, 142px);
  height: clamp(92px, 11vw, 142px);
  animation: buddyFloat 4.8s ease-in-out infinite;
}

.buddy-angry-left {
  transform: rotate(-8deg);
}

.buddy-angry-right {
  transform: rotate(7deg);
  animation-delay: 700ms;
}

.status-buddy {
  width: clamp(98px, 15vw, 140px);
  height: clamp(98px, 15vw, 140px);
  margin: -6px auto 6px;
  animation: buddyFloat 5.2s ease-in-out infinite;
}

.buddy-pair {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 138px;
  margin-bottom: 14px;
}

.return-buddy {
  width: 116px;
  height: 116px;
}

.return-buddy.peek {
  transform: translateX(18px) translateY(12px) rotate(-5deg);
}

.return-buddy.wave {
  width: 138px;
  height: 138px;
  transform: translateX(-10px) rotate(5deg);
}

@keyframes buddyFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -7px;
  }
}

.nav-tabs {
  display: flex;
  min-width: 0;
  justify-content: center;
  gap: 10px;
}

.nav-tabs a {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 900;
  font-size: 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-tabs a:hover,
.nav-tabs a.active {
  color: #2d145b;
  background: linear-gradient(180deg, #ffe58a, #ffb23d);
  transform: translateY(-1px);
}

.star-counter {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 74px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 214, 94, 0.75);
  border-radius: 12px;
  background: rgba(16, 7, 43, 0.74);
  color: var(--text);
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.star-counter.large {
  font-size: 1.25rem;
}

.star-shape {
  display: inline-block;
  width: 28px;
  aspect-ratio: 1;
  background: linear-gradient(180deg, #fff39b 0%, var(--gold) 45%, var(--gold-deep) 100%);
  clip-path: polygon(50% 0, 61% 34%, 97% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 3% 35%, 39% 34%);
  filter: drop-shadow(0 5px 9px rgba(255, 157, 46, 0.45));
}

.star-shape.small {
  width: 24px;
}

.star-shape.huge {
  width: 106px;
}

.route {
  display: none;
}

.route.active {
  display: block;
}

.game-panel {
  position: relative;
  margin-top: 26px;
  padding: clamp(30px, 4vw, 58px) clamp(26px, 4vw, 56px) clamp(34px, 4vw, 58px);
  border: 1px solid rgba(206, 100, 255, 0.58);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(42, 8, 93, 0.34), rgba(22, 3, 58, 0.56)),
    radial-gradient(circle at 50% 18%, rgba(138, 49, 255, 0.24), transparent 18rem),
    url("/assets/backgrounds/boxbackground.png") center / cover no-repeat,
    linear-gradient(180deg, rgba(58, 17, 121, 0.94), rgba(30, 8, 73, 0.94));
  box-shadow:
    var(--shadow),
    0 0 58px rgba(143, 57, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.game-panel::before {
  position: absolute;
  inset: 22px 24px auto;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 202, 74, 0.5), transparent);
}

.game-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 50% 30%, rgba(16, 4, 43, 0.08), rgba(16, 4, 43, 0.36) 72%),
    linear-gradient(90deg, rgba(12, 2, 34, 0.32), transparent 20% 80%, rgba(12, 2, 34, 0.32));
  pointer-events: none;
}

.panel-ornament {
  position: absolute;
  top: 52px;
  z-index: 3;
  opacity: 0.98;
}

.panel-ornament.left {
  left: clamp(26px, 6vw, 86px);
}

.panel-ornament.right {
  right: clamp(26px, 6vw, 86px);
}

.challenge-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.challenge-meta span {
  padding: 7px 25px;
  border-radius: 999px;
  color: #5a2a2c;
  background: linear-gradient(180deg, #fff4a7, #ffb449);
  box-shadow: 0 8px 18px rgba(255, 170, 60, 0.24);
}

.challenge-meta strong {
  min-width: 70px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(12, 5, 37, 0.78);
  color: var(--text);
  text-align: center;
}

.game-panel h1,
.content-panel h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--text);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 4px 0 rgba(67, 25, 103, 0.65);
}

.game-panel h1 {
  font-size: clamp(2.1rem, 5vw, 4.35rem);
}

.fight-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(118px, 0.25fr) minmax(0, 1.72fr) minmax(118px, 0.25fr);
  align-items: stretch;
  gap: clamp(14px, 1.8vw, 20px);
  width: min(1120px, 100%);
  margin: 42px auto 0;
}

.trait-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 330px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(209, 118, 255, 0.42);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 202, 74, 0.14), transparent 8rem),
    linear-gradient(180deg, rgba(49, 15, 111, 0.72), rgba(9, 3, 32, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 34px rgba(4, 1, 18, 0.28);
}

.trait-panel::before {
  position: absolute;
  inset: -40% auto auto 50%;
  width: 120px;
  aspect-ratio: 1;
  content: "";
  border-radius: 999px;
  background: rgba(255, 202, 74, 0.16);
  filter: blur(18px);
  transform: translateX(-50%);
}

.trait-panel.left {
  text-align: right;
}

.trait-panel.right {
  text-align: left;
}

.side-label {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trait-panel h2 {
  position: relative;
  z-index: 1;
  margin: 8px 0 8px;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.trait-panel p {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.trait-stack {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trait-panel.left .trait-stack {
  justify-content: flex-end;
}

.trait-panel.right .trait-stack {
  justify-content: flex-start;
}

.trait-stack li {
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(5, 1, 21, 0.78);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.fight-frame {
  position: relative;
  padding: clamp(8px, 1.1vw, 12px);
  border: 1px solid rgba(255, 202, 74, 0.38);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 18%),
    linear-gradient(135deg, rgba(122, 52, 198, 0.92), rgba(22, 6, 65, 0.96));
  box-shadow:
    0 28px 58px rgba(4, 1, 18, 0.48),
    0 0 46px rgba(174, 64, 255, 0.26),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.fight-frame::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 202, 74, 0.72), rgba(219, 86, 255, 0.18), rgba(79, 195, 255, 0.48));
  filter: blur(10px);
  opacity: 0.72;
}

.board-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 2px solid rgba(151, 75, 238, 0.65);
  border-radius: 22px;
  background: rgba(14, 5, 44, 0.78);
  box-shadow: 0 18px 28px rgba(7, 2, 25, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.board-media {
  position: relative;
  min-height: 252px;
  overflow: hidden;
  background: #1a5b35;
}

.board-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 252px;
  object-fit: cover;
}

.board-fallback {
  position: relative;
  min-height: 252px;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 26%, rgba(255, 230, 119, 0.18), transparent 4rem),
    linear-gradient(135deg, rgba(38, 92, 47, 0.96), rgba(104, 132, 50, 0.95));
}

.board-fallback::before {
  position: absolute;
  inset: 22px;
  content: "";
  border-radius: 18px;
  opacity: 0.6;
  background-image:
    linear-gradient(30deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(30deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18));
  background-position: 0 0, 0 0, 26px 45px, 26px 45px;
  background-size: 52px 90px;
}

.unit-dot {
  position: absolute;
  width: var(--size);
  aspect-ratio: 1;
  left: var(--x);
  top: var(--y);
  border-radius: 50% 50% 44% 44%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.95) 0 9%, transparent 10%),
    linear-gradient(180deg, var(--unit-a), var(--unit-b));
  box-shadow: 0 9px 13px rgba(2, 0, 14, 0.42), 0 0 0 2px rgba(255, 241, 162, 0.28);
}

.board-card.left .unit-dot {
  --unit-a: #79d7ff;
  --unit-b: #1d4ed8;
}

.board-card.right .unit-dot {
  --unit-a: #ff93bc;
  --unit-b: #be185d;
}

.board-info {
  position: relative;
  padding: 0 18px 18px;
  background: linear-gradient(180deg, rgba(26, 8, 65, 0.8), rgba(11, 4, 33, 0.95));
}

.team-pill {
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: -22px auto 10px;
  padding: 9px 24px;
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(180deg, #6d33b5, #3d176f);
  font-weight: 950;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 7px 14px rgba(6, 1, 21, 0.35);
}

.team-tagline {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.trait-list,
.item-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trait-list {
  margin-bottom: 10px;
}

.trait-list li,
.item-list li {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 0, 15, 0.68);
  color: var(--text);
  font-weight: 850;
}

.trait-list li {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.item-list li {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 9px;
  color: #ffe986;
  font-size: 0.72rem;
}

.vote-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 54px);
  width: min(880px, 100%);
  margin: 28px auto 0;
}

.post-vote-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(760px, 100%);
  margin: 16px auto 0;
}

.post-vote-row:empty {
  display: none;
}

.post-vote-pill {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.1), transparent 9rem),
    rgba(9, 3, 32, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.post-vote-pill strong {
  display: block;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-vote-pill span {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  overflow-wrap: break-word;
}

.post-vote-pill.wrong strong {
  color: #ff8d8d;
}

.next-fight-button {
  flex: 0 0 auto;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px 0 22px;
  background: linear-gradient(180deg, #fff39b, var(--gold) 54%, var(--gold-deep));
  color: #361653;
  font-weight: 1000;
  text-transform: uppercase;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.4),
    inset 0 -4px 0 rgba(129, 63, 0, 0.22),
    0 14px 24px rgba(255, 157, 46, 0.22);
  transition: transform 160ms ease, filter 160ms ease;
}

.next-fight-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.next-fight-button span {
  margin-left: 8px;
  font-size: 1.1rem;
}

.vote-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 82px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  padding: 12px 18px 13px 22px;
  color: var(--text);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    inset 0 -6px 0 rgba(0, 0, 0, 0.2),
    0 16px 30px rgba(6, 1, 24, 0.34);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.vote-button::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(110deg, transparent 0 18%, rgba(255, 255, 255, 0.24) 30%, transparent 43%),
    radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.22), transparent 9rem);
  opacity: 0.64;
  transform: translateX(-24%);
}

.vote-button span,
.vote-button strong,
.vote-button i {
  position: relative;
  z-index: 1;
}

.vote-button span {
  grid-column: 1;
  color: rgba(255, 249, 232, 0.78);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.vote-button strong {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  font-size: clamp(1.02rem, 2vw, 1.32rem);
  font-weight: 1000;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vote-button i {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-style: normal;
  font-size: 1.45rem;
  font-weight: 950;
}

.vote-button:hover:not(:disabled) {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    inset 0 -6px 0 rgba(0, 0, 0, 0.2),
    0 22px 36px rgba(6, 1, 24, 0.4);
}

.vote-button:disabled {
  cursor: default;
  filter: saturate(0.72);
  opacity: 0.66;
}

.vote-button.left {
  background:
    linear-gradient(180deg, #72ddff, #2397d8 55%, #1662ad),
    var(--blue-deep);
}

.vote-button.right {
  background:
    linear-gradient(180deg, #ff83b9, #e3468c 55%, #ac2363),
    var(--pink-deep);
}

.vote-button.selected {
  border-color: rgba(255, 226, 112, 0.88);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.34),
    inset 0 -6px 0 rgba(0, 0, 0, 0.2),
    0 0 0 4px rgba(255, 202, 74, 0.18),
    0 20px 36px rgba(255, 178, 61, 0.22);
  opacity: 1;
}

.reward-row {
  position: relative;
  z-index: 2;
  margin-top: 24px;
  text-align: center;
}

.reward-row h2 {
  margin: 0 0 9px;
  font-size: 1rem;
}

.stars,
.summary-stars {
  display: flex;
  justify-content: center;
  gap: 11px;
}

.result-star {
  position: relative;
  display: inline-block;
  width: 42px;
  aspect-ratio: 1;
  border: 2px solid rgba(191, 139, 255, 0.75);
  background: rgba(20, 5, 52, 0.85);
  clip-path: polygon(50% 0, 61% 34%, 97% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 3% 35%, 39% 34%);
}

.result-star.correct {
  border: 0;
  background: linear-gradient(180deg, #fff59c, var(--gold) 46%, var(--gold-deep));
  filter: drop-shadow(0 7px 10px rgba(255, 157, 46, 0.4));
}

.result-star.wrong {
  border: 0;
  background: linear-gradient(180deg, #ff9b9b, var(--danger));
  filter: drop-shadow(0 7px 10px rgba(255, 98, 98, 0.28));
}

.result-star.wrong::after {
  position: absolute;
  inset: 18px -3px auto;
  height: 5px;
  content: "";
  background: rgba(60, 6, 41, 0.75);
  transform: rotate(-22deg);
}

.below-grid,
.dashboard-grid {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.below-grid {
  grid-template-columns: 0.85fr 1.35fr 0.85fr;
  align-items: stretch;
}

.below-grid.result-flow {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(860px, 100%);
  margin-inline: auto;
}

.dashboard-grid {
  grid-template-columns: 0.9fr 1.35fr 0.9fr;
}

.status-card,
.video-card,
.summary-card,
.leaderboard-card,
.return-card,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0, rgba(229, 90, 216, 0.24), transparent 13rem),
    linear-gradient(180deg, rgba(56, 18, 113, 0.94), rgba(30, 9, 75, 0.94));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.status-card,
.summary-card,
.return-card {
  padding: 24px;
  text-align: center;
}

.status-card h2,
.video-card h2,
.summary-card h2,
.leaderboard-card h2,
.return-card h2,
.content-panel h2 {
  margin: 0 0 9px;
  font-size: 1.25rem;
}

.status-card p,
.return-card p,
.content-panel p {
  margin: 0;
  color: var(--text);
}

.locked-card,
.result-card {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
}

.locked-card h2,
.locked-card p,
.result-card h2,
.result-card p {
  position: relative;
  z-index: 1;
}

.result-card.correct {
  border-color: rgba(255, 202, 74, 0.75);
}

.result-card.wrong {
  border-color: rgba(255, 98, 98, 0.75);
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.result-modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.result-modal::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 50% 50%, rgba(5, 1, 20, 0.42), transparent 45%);
}

.result-modal-card {
  position: relative;
  width: min(390px, 100%);
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 0, rgba(229, 90, 216, 0.24), transparent 13rem),
    linear-gradient(180deg, rgba(56, 18, 113, 0.96), rgba(30, 9, 75, 0.96));
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 44px rgba(255, 202, 74, 0.14);
  text-align: center;
  transform: translateY(0) scale(1);
  animation: resultPop 260ms cubic-bezier(0.2, 0.9, 0.2, 1.12) both;
}

.result-modal.correct .result-modal-card {
  border-color: rgba(255, 202, 74, 0.75);
}

.result-modal.wrong .result-modal-card {
  border-color: rgba(255, 98, 98, 0.75);
}

.result-modal-card h2 {
  margin: 2px 0 8px;
  color: var(--text);
  font-size: 1.3rem;
}

.result-modal-card p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.result-modal-buddy {
  width: 136px;
  height: 136px;
  margin: -12px auto 2px;
  filter: drop-shadow(0 16px 24px rgba(255, 202, 74, 0.28));
}

.modal-wrong-star {
  width: 82px;
  margin-bottom: 12px;
}

@keyframes resultPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.star-burst {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.star-burst::before {
  position: absolute;
  width: 168px;
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 202, 74, 0.34), transparent 65%);
}

.video-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(17, 7, 48, 0.92);
  border-radius: 16px;
  background: #070215;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 -60px 80px rgba(0, 0, 0, 0.28);
}

.fight-media,
.arena-fallback,
.video-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
}

.fight-media img,
.fight-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #03010c;
}

.fight-media {
  animation: mediaFade 240ms ease-out both;
}

.fight-media.preview::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(3, 1, 14, 0.04), transparent 45%, rgba(3, 1, 14, 0.42)),
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(3, 1, 14, 0.2));
  pointer-events: none;
}

.media-lock {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(8, 2, 30, 0.72);
  backdrop-filter: blur(14px);
}

.media-lock strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

.media-lock span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.arena-fallback {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(41, 232, 168, 0.23), transparent 9rem),
    radial-gradient(circle at 18% 28%, rgba(68, 180, 255, 0.2), transparent 8rem),
    radial-gradient(circle at 82% 70%, rgba(255, 202, 74, 0.12), transparent 7rem),
    linear-gradient(135deg, #1b6b4d, #237d5c 42%, #125366 100%);
}

.arena-fallback::before {
  position: absolute;
  inset: 8%;
  content: "";
  opacity: 0.46;
  background-image:
    linear-gradient(30deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(30deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.18) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.18) 87.5%, rgba(255, 255, 255, 0.18));
  background-position: 0 0, 0 0, 38px 66px, 38px 66px;
  background-size: 76px 132px;
}

.arena-unit {
  position: absolute;
  z-index: 1;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50% 50% 42% 42%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.95) 0 8%, transparent 9%),
    linear-gradient(180deg, var(--unit-a), var(--unit-b));
  box-shadow: 0 12px 16px rgba(2, 0, 14, 0.42), 0 0 0 2px rgba(255, 241, 162, 0.22);
}

.arena-unit.left {
  --unit-a: #87e2ff;
  --unit-b: #245fe7;
}

.arena-unit.right {
  --unit-a: #ff8fc0;
  --unit-b: #d81e70;
}

.arena-centerline {
  position: absolute;
  inset: 12% auto 12% 50%;
  width: 2px;
  background: linear-gradient(transparent, rgba(255, 202, 74, 0.6), transparent);
  transform: rotate(16deg);
  opacity: 0.7;
}

.arena-status {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(8, 2, 30, 0.72);
  color: var(--text);
  font-weight: 900;
  text-align: center;
}

.video-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(48, 129, 96, 0.18), rgba(184, 64, 151, 0.18)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 12px, transparent 12px 24px);
}

.video-placeholder strong {
  color: var(--text);
  font-size: 1.1rem;
}

@keyframes mediaFade {
  from {
    opacity: 0.38;
    transform: scale(0.992);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 3rem;
  line-height: 1;
}

.summary-card p {
  margin: 8px 0 12px;
  color: var(--text);
  font-weight: 750;
}

.fight-list {
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.fight-list button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.fight-list button:hover,
.fight-list button.active {
  background: rgba(255, 255, 255, 0.08);
}

.fight-list .correct {
  color: var(--success);
}

.fight-list .wrong {
  color: var(--danger);
}

.fight-list .pending {
  color: var(--muted);
}

.ghost-button {
  width: 100%;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 850;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title-row a {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.leaderboard-card {
  padding: 22px;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap.full {
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

td {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-weight: 850;
}

tr.you {
  background: rgba(255, 202, 74, 0.1);
}

.rank-pill {
  display: inline-grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 950;
}

.rank-pill.top {
  color: #3b185d;
  background: linear-gradient(180deg, #fff39b, var(--gold));
}

.return-card {
  display: grid;
  align-content: center;
  min-height: 260px;
}

.reset-copy {
  margin-top: 11px;
  color: var(--muted);
  font-weight: 850;
}

.content-panel {
  margin-top: 26px;
  padding: clamp(28px, 5vw, 54px);
}

.content-panel h1 {
  margin-top: 4px;
  text-align: left;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lede {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.about-grid > div {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(9, 3, 32, 0.34);
}

code {
  color: #ffe58a;
}

.mascot {
  position: relative;
  display: inline-block;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 48% 52% 44% 56%;
  background:
    radial-gradient(circle at 33% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 64% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 35% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 66% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 27% 54%, rgba(255, 198, 221, 0.75) 0 6%, transparent 7%),
    radial-gradient(circle at 72% 54%, rgba(255, 198, 221, 0.65) 0 6%, transparent 7%),
    radial-gradient(circle at 34% 16%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(180deg, #a4ecff 0%, #6866ec 58%, #4b42ca 100%);
  box-shadow:
    inset 0 7px 10px rgba(255, 255, 255, 0.22),
    inset 0 -10px 18px rgba(33, 15, 99, 0.22),
    0 14px 26px rgba(4, 1, 18, 0.38);
  animation: mascotBob 4.8s ease-in-out infinite;
}

.mascot::before,
.mascot::after {
  position: absolute;
  top: -8px;
  width: 28px;
  height: 30px;
  content: "";
  border-radius: 45% 55% 20% 80%;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.46), transparent 24%),
    linear-gradient(180deg, #a4ecff 0%, #6866ec 68%, #4b42ca 100%);
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.18);
  transform: rotate(-28deg);
}

.mascot::before {
  left: 3px;
}

.mascot::after {
  right: 3px;
  transform: rotate(28deg) scaleX(-1);
}

.mascot-small {
  width: 50px;
}

.mascot-large {
  width: 88px;
  margin-bottom: 8px;
}

.mascot-pink,
.mascot.mascot-pink {
  background:
    radial-gradient(circle at 33% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 64% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 35% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 66% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 27% 54%, rgba(255, 226, 236, 0.78) 0 6%, transparent 7%),
    radial-gradient(circle at 72% 54%, rgba(255, 226, 236, 0.7) 0 6%, transparent 7%),
    radial-gradient(circle at 34% 16%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(180deg, #ffacd0 0%, #de4da0 58%, #bd2e83 100%);
}

.mascot-blue,
.mascot.mascot-blue {
  background:
    radial-gradient(circle at 33% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 64% 39%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 35% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 66% 40%, #251034 0 2%, transparent 3%),
    radial-gradient(circle at 27% 54%, rgba(255, 226, 236, 0.72) 0 6%, transparent 7%),
    radial-gradient(circle at 72% 54%, rgba(255, 226, 236, 0.64) 0 6%, transparent 7%),
    radial-gradient(circle at 34% 16%, rgba(255, 255, 255, 0.5), transparent 28%),
    linear-gradient(180deg, #a9efff 0%, #656df0 58%, #464bc9 100%);
}

.mascot-pink::before,
.mascot-pink::after,
.mascot.mascot-pink::before,
.mascot.mascot-pink::after {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.46), transparent 24%),
    linear-gradient(180deg, #ffacd0 0%, #de4da0 68%, #bd2e83 100%);
}

.mascot-blue::before,
.mascot-blue::after,
.mascot.mascot-blue::before,
.mascot.mascot-blue::after {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.46), transparent 24%),
    linear-gradient(180deg, #a9efff 0%, #656df0 68%, #464bc9 100%);
}

@keyframes mascotBob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.mascot-pair {
  position: relative;
  display: inline-flex;
  justify-content: center;
  margin-bottom: 18px;
}

.mascot-pair .mascot {
  width: 82px;
}

.mascot-pair .mascot + .mascot {
  margin-left: -14px;
}

.admin-page .page-shell {
  max-width: 1120px;
}

.admin-panel {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

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

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(6, 2, 25, 0.72);
  color: var(--text);
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

.fight-editor {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(9, 3, 32, 0.42);
}

.fight-editor h2 {
  margin: 0 0 16px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 950;
}

.primary-button {
  border: 0;
  color: #33104b;
  background: linear-gradient(180deg, #fff39b, var(--gold));
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.admin-log {
  min-height: 54px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(5, 1, 20, 0.62);
  color: var(--muted);
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .star-counter {
    justify-self: center;
  }

  .fight-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fight-frame {
    order: -1;
    grid-column: 1 / -1;
  }

  .trait-panel {
    min-height: auto;
    text-align: left;
  }

  .trait-panel.left .trait-stack {
    justify-content: flex-start;
  }

  .below-grid,
  .dashboard-grid,
  .about-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel-ornament {
    top: 34px;
    display: block;
    opacity: 0.82;
  }

  .panel-ornament.left {
    left: 26px;
  }

  .panel-ornament.right {
    right: 26px;
  }

  .panel-buddy {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(1180px, calc(100% - 20px));
    padding-top: 10px;
  }

  .site-header {
    padding: 12px;
  }

  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
  }

  .nav-tabs a {
    min-width: 0;
    padding: 10px 6px;
    overflow: hidden;
    font-size: 0.72rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-panel {
    padding: 24px 14px;
    border-radius: 20px;
  }

  .panel-ornament {
    top: 20px;
  }

  .panel-ornament.left {
    left: 10px;
  }

  .panel-ornament.right {
    right: 10px;
  }

  .panel-buddy {
    width: 48px;
    height: 48px;
    opacity: 0.9;
  }

  .game-panel h1 {
    font-size: clamp(1.65rem, 7vw, 2.05rem);
    line-height: 1.04;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  .challenge-meta {
    gap: 8px;
    font-size: 0.82rem;
  }

  .challenge-meta span {
    padding-inline: 14px;
  }

  .vote-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .post-vote-row {
    display: grid;
    gap: 10px;
  }

  .next-fight-button {
    width: 100%;
  }

  .fight-layout {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .fight-frame {
    grid-column: auto;
  }

  .media-lock {
    position: static;
    display: grid;
    border-radius: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    background: rgba(8, 2, 30, 0.9);
  }

  .video-stage {
    aspect-ratio: auto;
  }

  .fight-media.preview {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .fight-media.preview img,
  .fight-media.preview video,
  .fight-media.revealed video,
  .arena-fallback,
  .video-placeholder {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .board-media,
  .board-fallback,
  .board-media img {
    min-height: 210px;
  }

  .board-info {
    padding-inline: 12px;
  }

  .team-tagline {
    overflow-wrap: break-word;
    font-size: 0.85rem;
  }

  .trait-list li {
    font-size: 0.76rem;
  }

  .item-list li {
    min-width: 31px;
  }

  .status-card,
  .summary-card,
  .return-card,
  .leaderboard-card,
  .video-card,
  .content-panel,
  .admin-panel {
    padding: 18px;
  }

  th,
  td {
    padding: 10px;
  }
}
