:root {
  --bg: #0b1526;
  --bg-raised: #13203a;
  --bg-card: #16233b;
  --ink: #f7f9ff;
  --ink-muted: #9fb0c8;
  --ink-faint: #6f8098;
  --banana: #f2b134;
  --banana-soft: #ffd97a;
  --win: #4ade80;
  --lose: #f87171;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 20% -10%, #1b2d4d 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}

body.reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

/*
 * Links. The browser default is a dark blue, which on this navy background is
 * blue on blue and unreadable, so anchors take the site accent instead. The
 * underline stays: colour alone is not a cue everyone gets to see. Component
 * rules (.pill-button, .brand, .back-link, .wallet-modal-link) set their own
 * colour and decoration and win on specificity.
 */
a {
  color: var(--banana-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--banana);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--banana);
  color: #0b1526;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(11, 21, 38, 0.92);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  font-size: 1.5rem;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.guest-badge {
  margin-left: 0.4rem;
  /* Without this the badge ran straight into whatever followed it -- on the
     contestant rows that was the mode, rendered as "…OneBOTChampionship". */
  margin-right: 0.4rem;
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
}

.pill-button {
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  /* It looks like a button, so it must not inherit the underline the global
     anchor rule gives every other link. */
  text-decoration: none;
}

.pill-button[aria-pressed="true"] {
  background: var(--banana);
  color: #0b1526;
  border-color: var(--banana);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.25rem 1rem calc(3rem + var(--safe-bottom));
}

.screen {
  outline: none;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.hero-art {
  font-size: 4rem;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0.5rem 0;
}

.lede {
  color: var(--ink-muted);
  max-width: 34rem;
  margin: 0 auto 1rem;
}

input[type="text"] {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  width: 100%;
}

input[type="text"]:focus {
  outline: 2px solid var(--banana);
  outline-offset: 1px;
}

.primary-button,
.control-button {
  background: var(--banana);
  color: #0b1526;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.control-button {
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
}

.control-button:hover,
.pill-button:hover {
  border-color: var(--banana);
}


.status-line {
  min-height: 1.5rem;
  color: var(--banana-soft);
  margin: 0.75rem 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card h2,
.section-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.section-title {
  margin-top: 1.75rem;
}

.card-body {
  min-height: 3rem;
}

.muted {
  color: var(--ink-faint);
}

.power-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.power-tier {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.power-description {
  color: var(--ink-muted);
  margin: 0;
}

.opponent-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0.85rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--bg-raised);
}

/* Profile pictures (identityAvatar -> /api/v1/identities/...): a small
   circle inline before a name in a list row -- inside the name cell, so the
   row grids keep their columns and a phone sees one more chip at most,
   never a wider row. */
.row-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.5rem;
  background: var(--bg-raised);
}

.opponent-name {
  font-weight: 700;
  margin: 0;
}

.opponent-motto {
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin: 0;
}

.opponent-meta {
  color: var(--ink-faint);
  font-size: 0.75rem;
  margin: 0.25rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.battle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  flex-wrap: wrap;
}

.battle-versus {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.battle-score {
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.winner-pill {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.winner-pill.win {
  background: rgba(74, 222, 128, 0.18);
  color: var(--win);
}

.winner-pill.lose {
  background: rgba(248, 113, 113, 0.18);
  color: var(--lose);
}

.watch-button {
  background: transparent;
  color: var(--banana-soft);
  border: 1px solid rgba(242, 177, 52, 0.45);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
}


/* Replay */
.replay-head {
  margin-bottom: 1rem;
}

.back-link {
  color: var(--banana-soft);
  text-decoration: none;
  font-size: 0.9rem;
}

.replay-head h1 {
  margin: 0.5rem 0;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.replay-banner {
  min-height: 1.5rem;
  color: var(--ink-muted);
}

.scoreboard {
  display: grid;
  gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* Three lines: the scores between the two avatars, then the names, then the
   daily powers. Each name and power stays on its own side -- left for A,
   right for B -- so it reads under the avatar it belongs to, and anything
   that does not fit is truncated rather than pushed onto another line. */
.score-line-scores {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.score-line-scores strong {
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.score-line-names,
.score-line-powers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
}

.score-line-names span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-line-names > :last-child {
  text-align: right;
}

.score-line-powers > :first-child {
  justify-self: start;
}

.score-line-powers > :last-child {
  justify-self: end;
}

/* Each player's daily power. */
.side-power {
  max-width: 100%;
  font-size: 0.72rem;
  color: var(--banana-soft);
  background: rgba(242, 177, 52, 0.1);
  border: 1px solid rgba(242, 177, 52, 0.3);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lit only for the round in which it fired. */
.side-power.firing {
  background: rgba(242, 177, 52, 0.32);
  border-color: var(--banana);
  box-shadow: 0 0 16px rgba(242, 177, 52, 0.45);
  animation: power-pulse 800ms ease-in-out infinite alternate;
}

@keyframes power-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.04);
  }
}

.round-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.card-slot {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0.7rem;
  text-align: center;
  overflow: visible;
  transition: transform 160ms ease, border-color 160ms ease;
}

.card-slot.winner {
  border-color: var(--win);
  transform: translateY(-4px);
}

.card-slot.loser {
  border-color: rgba(248, 113, 113, 0.6);
}

.card-image {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 240 / 240;
  object-fit: contain;
  border-radius: 12px;
  /* The slot's own colour: object-fit letterboxes a non-square artwork, and
     backing it with --bg-raised put a second, slightly darker shade inside
     the frame (rgb(19, 32, 58) against rgb(22, 35, 59)). */
  background: var(--bg-card);
  margin: 0 auto;
  display: block;
}

.card-name {
  margin-bottom: 0.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-muted);
  min-height: 1.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-value {
  margin-top: 0.25rem;
  min-height: 2.4rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
}

.value-number {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.value-number.modified {
  color: var(--banana-soft);
  text-shadow: 0 0 18px rgba(242, 177, 52, 0.35);
}

/* The compared value takes the winner/loser colour of its card slot. */
.card-slot.winner .value-number,
.card-slot.winner .value-number.modified {
  color: var(--win);
  text-shadow: 0 0 18px rgba(74, 222, 128, 0.35);
}

.card-slot.loser .value-number,
.card-slot.loser .value-number.modified {
  color: var(--lose);
  text-shadow: 0 0 18px rgba(248, 113, 113, 0.3);
}

.value-striken {
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--ink-faint);
  text-decoration: line-through wavy var(--lose) 0.14em;
  text-decoration-thickness: 0.14em;
  transform: rotate(-8deg);
  opacity: 0.75;
}

.attribute-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.attribute-name {
  position: relative;
  top: 11.35rem;
  font-size: clamp(1.7rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
  color: var(--banana-soft);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 0 5px rgba(0, 0, 0, 0.9);
  transform: rotate(-3deg);
}

.power-events {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

/* Nothing to say about the round means no gap either. */
.power-events:empty {
  display: none;
}

.power-chip {
  background: rgba(242, 177, 52, 0.14);
  border: 1px solid rgba(242, 177, 52, 0.4);
  color: var(--banana-soft);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  text-align: center;
}

.power-chip.reversal {
  background: rgba(74, 222, 128, 0.16);
  border-color: rgba(74, 222, 128, 0.5);
  color: var(--win);
}

.replay-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.media-button {
  min-width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.speed-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-muted);
}

.speed-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.speed-select {
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.speed-select:hover,
.speed-select:focus {
  border-color: var(--banana);
}

.round-buttons {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.3rem;
  flex: 1 1 auto;
  min-width: 0;
}

.round-button {
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--ink-muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.round-button:hover,
.control-button:hover,
.pill-button:hover {
  border-color: var(--banana);
}

.round-button.played {
  background: rgba(242, 177, 52, 0.22);
  color: var(--banana-soft);
  border-color: rgba(242, 177, 52, 0.4);
}

.round-button.current {
  background: var(--banana);
  color: #0b1526;
  border-color: var(--banana);
  transform: scale(1.08);
}

.replay-text {
  color: var(--ink-muted);
  min-height: 1.5rem;
  margin-top: 0.75rem;
}

.end-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2rem, 10vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 50;
  animation: banner-pop 900ms ease-out;
}

/* A dark outline around these words: both overlay the round stage, and light
   text over light artwork was hard to read. em units so the outline tracks
   each font size, and the glow goes *under* it (shadows are painted
   first-listed on top). Shared by the result banners and the countdown. */
.end-banner,
.countdown-banner {
  --banner-outline: 0.04em 0.04em 0 #0b1526, -0.04em 0.04em 0 #0b1526,
    0.04em -0.04em 0 #0b1526, -0.04em -0.04em 0 #0b1526, 0.04em 0 0 #0b1526,
    -0.04em 0 0 #0b1526, 0 0.04em 0 #0b1526, 0 -0.04em 0 #0b1526,
    0 0 0.09em rgba(11, 21, 38, 0.95);
}

.end-banner.win {
  color: var(--win);
  text-shadow: var(--banner-outline), 0 0 30px rgba(74, 222, 128, 0.5);
}

.end-banner.lose {
  color: var(--lose);
  text-shadow: var(--banner-outline), 0 0 30px rgba(248, 113, 113, 0.5);
}

.end-banner[hidden] {
  display: none;
}

/* 3 -> 2 -> 1 -> 0 before a replay runs itself: same weight and dark outline
   as the result banners, so the two moments read as one. */
.countdown-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(5rem, 26vw, 13rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--banana-soft);
  text-shadow: var(--banner-outline), 0 0 40px rgba(242, 177, 52, 0.55);
  pointer-events: none;
  z-index: 55;
}

.countdown-banner[hidden] {
  display: none;
}

/* Each digit pops in; JS restarts the animation by reflowing. */
.countdown-banner.pop {
  animation: banner-pop 480ms ease-out;
}

/* The cards -- and the attribute they are about -- are held back for those
   beats. The stage keeps every pixel of its space, so nothing shifts when
   they arrive. */
.round-stage.counting .card-name,
.round-stage.counting .card-image,
.round-stage.counting .card-value,
.round-stage.counting .attribute-name {
  visibility: hidden;
}

@keyframes banner-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -12px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall 1.4s linear forwards;
  z-index: 49;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(540deg);
    opacity: 0;
  }
}

@media (max-width: 720px) {
  .round-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.6rem;
  }
  .card-slot {
    padding: 0.4rem;
  }
  .card-image {
    max-width: 100%;
    aspect-ratio: 240 / 300;
  }
  .card-name {
    font-size: 0.75rem;
    min-height: 1.4rem;
  }
  .attribute-name {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    top: 6rem;
  }
  .value-number {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }
  .value-striken {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
  }
  .score-line-scores strong {
    font-size: 1.1rem;
  }
  .round-buttons {
    flex-basis: 100%;
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-slot,
  .end-banner,
  .countdown-banner,
  .side-power,
  .confetti {
    animation: none !important;
    transition: none !important;
  }
}

/* Wallet connection and daily entry */
.wallet-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.wallet-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.play-today-meta {
  margin-top: 1.25rem;
}

.play-today-day {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.play-today-countdown {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.play-today-countdown-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--banana-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.play-today-countdown-target {
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* The dashboard stacks several cards one under another. Only .entry-card used
   to carry a margin, so "Your templates for today" and "Other contestants" --
   and every pair after them -- sat flush against each other with their borders
   touching. Scope the spacing to direct children so the cards inside
   .dashboard-grid keep the grid's own gap. */
#dashboard > .card {
  margin-bottom: 1.25rem;
}

/* Other contestants. Each row is a <button>, and it had no rules at all, so it
   kept the browser's native chrome: a white, content-width bar whose width
   changed with the text on every line. The name, the BOT badge and the mode
   also ran into one another, because nothing separated them. */
.contestants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contestant-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contestant-toggle:hover,
.contestant-toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
}

.contestant-name {
  font-weight: 600;
}

.contestant-templates:not([hidden]) {
  margin-top: 0.75rem;
}

/* Monkey Vault */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.vault-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vault-card img {
  width: 100%;
  object-fit: cover;
  background: var(--bg-raised);
}

/* Per-schema card aspect ratios. The archived card derivatives are 344x480
   for the crptomonkeys and packs schemas, and 480x480 for monkeystacks and
   poops. */
.schema-crptomonkeys img { aspect-ratio: 344 / 480; }
.schema-monkeystacks img { aspect-ratio: 1 / 1; }
.schema-packs img { aspect-ratio: 344 / 480; }
.schema-poops img { aspect-ratio: 1 / 1; }

.prize-place {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

/* Twice the size it rendered at, so the medal reads before the name. */
.prize-place .prize-icon {
  font-size: 2em;
  line-height: 1;
}

.vault-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* A prize won by a house bot: the crown badge ribbon under its name --
   the trimmed copy of art/Rigged Monkey Crown Badge (486x123 WebP, ~25KB
   with ~3px padding, versus the 1.1MB source), spanning the card body.

   Scoped as `.vault-card .bot-crown` (0,2,0) on purpose: the card's own
   `img` rules are (0,1,1) -- `.vault-card img { object-fit: cover }` and
   the per-schema `aspect-ratio` -- and a bare `.bot-crown` (0,1,0) lost to
   both, which cover-cropped the ribbon's sides into a portrait box. Here
   the ribbon keeps its own shape: aspect-ratio follows the image (never
   the cards' 344/480 or 1/1), contain never crops, and no card-coloured
   frame shows behind the padding. */
.vault-card .bot-crown {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: transparent;
}

.vault-body h3 {
  font-size: 0.95rem;
  margin: 0;
}

/* The gold/silver/bronze tier chips lived here. Desirability is no longer
   shown to visitors anywhere -- not on the vault, not on the prize cards --
   so the rules went with it rather than waiting to be picked up again. */

/* Championship results */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Four prizes, always: two across on a phone -- one row for 1 and 2, one for
   3 and the monkey -- and four equal columns on anything wider. The section,
   not the window: the prizes belong to #results (and to the landing's card),
   and four columns is what removes the empty fifth track auto-fill used to
   leave behind, which is what made the cards look ~80% wide. */
#prizes-grid,
#results-prizes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 721px) {
  #prizes-grid,
  #results-prizes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.prizes-card {
  margin-top: 1.5rem;
}

.leaderboard,
.match-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-row,
.match-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.leaderboard-row {
  grid-template-columns: 3rem 1fr 7rem 5rem 5rem 4rem;
}

/* Watch | Rounds | score | winner. The score column uses minmax(0, 1fr) so it
   can shrink and wrap instead of forcing the row wider than the card. */
.match-row {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.leaderboard-row .rank {
  font-weight: 700;
  color: var(--banana-soft);
}

.prize-place {
  color: var(--banana-soft);
  font-weight: 700;
}

.match-rounds {
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
}

/* Two lines per round: what it was, then both cards. Mobile-first -- the
   four-column grid it replaces could not hold two card names and two numbers
   at phone width. */
.round-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.round-row:first-child {
  border-top: 0;
}

.round-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  color: var(--ink-muted);
}

.round-label {
  color: var(--ink);
  font-weight: 600;
}

.round-sides {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  min-width: 0;
}

.round-side {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
}

.round-card {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.round-attr {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Only the side that scored has one, and it is green by definition. */
.round-score {
  margin-left: auto;
  color: var(--win);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .leaderboard-row {
    grid-template-columns: 2rem 1fr 4rem;
  }

  .leaderboard-row .muted,
  .leaderboard-row .prize-place {
    display: none;
  }

  /* The rounds panel stacks by default rather than dropping a column here:
     two lines was always the plan, and a phone is where the old four-column
     grid became illegible. */

  /* Same treatment the leaderboard gives its muted column: drop the winner tag
     rather than squeeze four columns into a phone-width card. The winner is
     still shown in the leaderboard above and in the replay itself. */
  .match-row {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .match-row .match-winner {
    display: none;
  }
}

.entered-banner {
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: rgba(127, 209, 168, 0.15);
  border: 1px solid rgba(127, 209, 168, 0.4);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 600;
}

/* Top bar user slot */
.user-slot {
  position: relative;
  display: flex;
  align-items: center;
}

.user-slot[hidden] {
  display: none;
}

.user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--banana-soft);
  color: #0b1526;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  /* The AtomicHub picture is layered over the initials, which stay behind
     it as the fallback when the avatar host is unreachable. */
  position: relative;
  overflow: hidden;
}

.user-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar:hover {
  filter: brightness(1.1);
}

/* User menu */
.user-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
  z-index: 40;
}

.user-menu[hidden] {
  display: none;
}

.user-menu-header {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.25rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  word-break: break-all;
}

.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.4rem;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  /* One line per row: the menu is absolutely positioned, so it grows to
     the widest item instead of wrapping it ("Disconnect WAX" and
     "Disconnect Discord" must not break across two lines). */
  white-space: nowrap;
}

/* Identity choices: one row with two options (WAX / Discord) and a note
   for when a Discord round-trip fails. The chosen one is filled. */
.user-menu-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.85rem;
}

/* The author display rules above would otherwise beat the UA's
   [hidden] { display: none } -- a hidden menu item would still show. */
.user-menu-identity[hidden],
.user-menu-note[hidden],
.user-menu-item[hidden],
.user-menu-toggle[hidden] {
  display: none;
}

/* Preferences as switches: the whole row is the touch target (generous
   height for a thumb), the state is aria-checked, and the thumb follows
   it. body.reduced-motion * already removes the transition. */
.user-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0.4rem;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.user-menu-toggle:hover,
.user-menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.toggle-label {
  font-size: 0.85rem;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.4rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.15s ease;
}

.switch-thumb {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #f7f9ff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.user-menu-toggle[aria-checked="true"] .switch {
  background: var(--banana-soft);
}

.user-menu-toggle[aria-checked="true"] .switch-thumb {
  transform: translateX(1.05rem);
  background: #0b1526;
}

.user-menu-label {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.user-menu-choice {
  flex: 1;
  padding: 0.3rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.user-menu-choice:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.user-menu-choice[aria-checked="true"] {
  background: var(--banana-soft);
  border-color: var(--banana-soft);
  color: #0b1526;
  font-weight: 700;
}

.user-menu-note {
  padding: 0.25rem 0.5rem;
  color: #f87171;
  font-size: 0.78rem;
}

.user-menu-item:hover {
  background: var(--bg-raised);
}

/* Page trailer */
.page-trailer {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2rem;
}

.page-trailer a {
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.page-trailer a:hover {
  color: var(--ink);
}

/* Wallet prompt modal (WharfKit ui.prompt) */
.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(4px);
}

.wallet-modal-card {
  position: relative;
  width: 100%;
  max-width: 24rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.wallet-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  padding-right: 2rem;
}

.wallet-modal-body {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.wallet-modal-elements {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.wallet-modal-button {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: var(--bg-raised);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.wallet-modal-button-primary {
  background: var(--banana);
  color: #0b1526;
}

.wallet-modal-button-text {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  font-weight: 500;
}

.wallet-modal-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--bg-raised);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

.wallet-modal-qr-image {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  /* The code is black on white; the modal is dark, so give it a light plate. */
  background: #ffffff;
}

/* `.wallet-modal-qr code` sets display:block, which outranks the UA rule for
   [hidden]; the fallback text must stay hidden until the QR fails to load. */
.wallet-modal-qr code[hidden] {
  display: none;
}

.wallet-modal-qr code {
  display: block;
  max-height: 8rem;
  overflow: auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--bg-raised);
  color: var(--ink-muted);
  font-size: 0.7rem;
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.wallet-modal-countdown {
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-align: center;
}

.wallet-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1rem;
  cursor: pointer;
}

.wallet-modal-close:hover {
  background: var(--bg-raised);
  color: var(--ink);
}

/* ---------------------------------------------------------------------------
 * Pun-Petition (docs/pun-petition.md)
 *
 * Mobile-first: the discovery shelf is a horizontal-scroll strip of small
 * cards (one row of thumbnails instead of a tall grid), and the detail card
 * stacks its art above the lines and the form.
 * ------------------------------------------------------------------------- */
.puns-lede {
  max-width: 40rem;
  margin: 0 0 1rem;
}

.pun-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.pun-search {
  margin-bottom: 1rem;
}

.pun-search label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.pun-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pun-search-row input {
  flex: 1 1 10rem;
  min-width: 0;
}

.pun-search-row select {
  flex: 0 1 auto;
  max-width: 100%;
}

/* One row of cards, swiped through, rather than a grid that pushes the form
   off the first phone screen. */
.pun-shelf {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}

.pun-card {
  flex: 0 0 8.5rem;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font: inherit;
}

.pun-card[aria-pressed="true"] {
  border-color: var(--banana);
  box-shadow: 0 0 0 1px var(--banana);
}

.pun-card img {
  width: 100%;
  object-fit: cover;
  background: var(--bg-raised);
}

.pun-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
}

.pun-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.pun-card-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.68rem;
}

.pun-approved {
  color: var(--win);
}

.pun-pending {
  color: var(--banana-soft);
}

/* The art is the source material for the jokes, so it leads and is large:
   full card width on a phone, uncropped (contain), square like the
   monkeystacks originals. The stats sit beside it once there is room. */
.pun-selected-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pun-selected-img {
  display: block;
  /* Most of a mobile screen: full card width, capped at the 480px the
     archived card derivative provides (owner's size reference). */
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--bg-raised);
  border-radius: 12px;
}

.pun-selected-side {
  min-width: 0;
}

.pun-selected-meta h2 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.pun-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.pun-subhead {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 1.1rem 0 0.5rem;
}

.pun-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pun-line {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}

.pun-line-text {
  margin: 0;
  font-size: 0.98rem;
}

.pun-line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.pun-state {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(242, 177, 52, 0.5);
  color: var(--banana-soft);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

.pun-line-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pun-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pun-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}

.pun-form textarea,
.pun-edit-text {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  resize: vertical;
}

.pun-form textarea:focus,
.pun-edit-text:focus {
  outline: 2px solid var(--banana);
  outline-offset: 1px;
}

.pun-form select {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  font-size: 0.95rem;
  width: 100%;
}

.pun-form select:focus {
  outline: 2px solid var(--banana);
  outline-offset: 1px;
}

.pun-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pun-form-row > span {
  flex: 1 1 9rem;
  min-width: 0;
}

.pun-similarity {
  background: rgba(242, 177, 52, 0.1);
  border: 1px solid rgba(242, 177, 52, 0.35);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--ink);
}

.pun-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pun-submit-row .muted {
  font-size: 0.8rem;
}

@media (min-width: 721px) {
  .pun-card {
    flex-basis: 10rem;
  }

  /* Art left at about half a desktop window (min(65%, 640px) against
     the 936px card content = ~608px at 1280), stats and attributes right.
     Sourced from the existing 480px card derivative: a mild upscale is
     preferred over pulling the lossless hd file (median 937KB). */
  .pun-selected-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .pun-selected-img {
    flex: 0 0 auto;
    width: min(65%, 640px);
    max-width: 640px;
  }

  .pun-selected-side {
    flex: 1 1 auto;
  }
}

/* The card's gameplay stats: one chip per attribute, name left, value
   right -- scannable at a glance while writing. */
.pun-attributes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.4rem;
  margin: 0;
}

.pun-attr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
}

.pun-attr dt {
  font-size: 0.75rem;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.pun-attr dd {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--banana-soft);
  font-variant-numeric: tabular-nums;
}

/* The inspiration feed below the form. */
.pun-recent-section {
  margin-top: 1.5rem;
}

.pun-recent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pun-recent-card {
  margin-left: auto;
  font-size: 0.72rem;
}

/* Spec section 7: the terms are presented before a submission is
   accepted. The wording is a draft pending the owner's approval and is
   marked as such in both the summary and the text. */
.pun-consent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pun-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.pun-consent-check input {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--banana);
}

.pun-terms {
  background: var(--bg-raised);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.pun-terms summary {
  cursor: pointer;
  color: var(--banana-soft);
}

.pun-terms p {
  margin: 0.5rem 0 0;
  line-height: 1.55;
}

.pun-terms p:last-child {
  margin-bottom: 0.25rem;
}

/* P2 voting: the counts and three choices ride in a line's meta row and
   wrap under it on a phone. */
.pun-vote-counts {
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.pun-votes,
.pun-line-meta .pill-button.pun-vote {
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
}

.pun-vote {
  border-color: rgba(255, 255, 255, 0.18);
}

.pun-vote[aria-pressed="true"] {
  background: var(--banana);
  color: #0b1526;
  border-color: var(--banana);
}

.pun-vote:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Winners page: the daily Golden Pun draw (spec 5). */
.pun-winners-link {
  display: inline-block;
  margin-top: 0.5rem;
}

.winners-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.winner-entry {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
}

.winner-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: transparent;
  border: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.winner-author:hover,
.winner-author:focus-visible {
  background: var(--bg-raised);
}

.winner-rank {
  min-width: 1.6rem;
  color: var(--ink-faint);
}

.winner-name {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.winner-count {
  color: var(--banana-soft);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.winner-expand {
  color: var(--ink-faint);
  transition: transform 0.15s ease;
}

.winner-author[aria-expanded="true"] .winner-expand {
  transform: rotate(180deg);
}

/* The author's jokes panel sets display:flex -- without this the UA
   [hidden] rule would lose and a collapsed panel would stay open (the
   lesson from .user-menu-item in the identity round). */
.winner-jokes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.winner-jokes[hidden] {
  display: none;
}

.winner-joke {
  background: var(--bg-raised);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}
