.result {
  text-align: center;
  border-block: 1px solid var(--line);
  padding: 20px;
}
.result small {
  display: block;
  font: 10px monospace;
  color: var(--muted);
}
.result strong {
  display: block;
  font-size: 64px;
}
.leader p {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.achievement {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #eceae3;
  padding: 13px;
  margin: 20px 0;
}
.achievement small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.achievement > div {
  flex: 1;
}
.achievement:first-letter {
  color: var(--coral);
  font-size: 28px;
}
html[data-theme="dark"] .achievement small {
  color: #aaa99f;
}
html[data-theme="dark"] .achievement {
  background: #292e28;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .achievement small {
    color: #aaa99f;
  }
  html:not([data-theme="light"]) .achievement {
    background: #292e28;
  }
}
.progress {
  margin: 33px 0 23px;
  color: var(--muted);
}
.progress b {
  font-size: 28px;
  color: var(--ink);
}
.progress i {
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--coral) 33%, #e1dfd8 33%);
  margin-top: 12px;
}
.achievement-list {
  display: grid;
  gap: 9px;
}
.achievement-list article {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 13px;
  font-size: 22px;
  color: var(--coral);
}
.achievement-list article div {
  flex: 1;
}
.achievement-list b,
.achievement-list small {
  display: block;
  color: var(--ink);
  font-size: 13px;
}
.achievement-list small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.achievement-list em {
  font: 9px monospace;
  color: #86a43f;
}
.daily-challenge-result {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 14px;
  color: #2b1939;
  border: 2px solid #ffd98c;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4bd, #ffd39d);
}
.daily-challenge-result > small:first-child {
  color: #8b4e29;
  font: 900 10px monospace;
  letter-spacing: .12em;
}
.daily-challenge-result > b { font-size: 15px; }
.daily-challenge-result .secondary { margin: 0; }
.daily-challenge-result .secondary[hidden] { display: none; }
.daily-challenge-result[hidden] { display: none; }
#dailyShareLink {
  width: 100%;
  color: inherit;
  border: 1px solid #d9a36a;
  border-radius: 8px;
  background: #fff9e8;
  padding: 8px;
}

#seriesTransitionScreen {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#seriesTransitionScreen.active { display: flex; min-height: 70vh; }
.series-transition-card {
  width: min(720px, 100%);
  padding: clamp(24px, 5vw, 52px);
  border: 2px solid var(--accent, #f6c85f);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(91, 45, 127, .96), rgba(52, 33, 63, .98));
  box-shadow: 0 10px 0 rgba(12, 9, 17, .35);
}
.series-transition-card h1 {
  margin: 10px 0 20px;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: .95;
}
.series-transition-outcome,
.series-transition-next {
  margin: 0 0 18px;
  color: #fff9f0;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.35;
}
.series-transition-next {
  margin: 20px 0 0;
  color: #f6c85f;
  font-size: 1rem;
}
.series-standings,
.series-final-standings {
  display: grid;
  gap: 8px;
}
.series-standing,
.series-final-standing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  color: #fff9f0;
}
.series-standing small,
.series-final-standing span {
  color: #f6c85f;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.series-standing.is-withdrawn,
.series-final-standing.is-withdrawn {
  opacity: .62;
}
.series-final-panel {
  display: grid;
  gap: 10px;
  margin: 26px 0 12px;
  padding: 12px;
  border: 2px solid rgba(246, 200, 95, .75);
  border-radius: 20px;
  background: rgba(91, 45, 127, .12);
}
.series-final-panel[hidden] { display: none; }
.series-final-panel .eyebrow { margin: 0; font-size: .65rem; }
.series-final-standing.is-winner {
  border: 2px solid #f6c85f;
  background: rgba(246, 200, 95, .16);
}
.series-final-standing strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.series-final-standing b {
  flex: none;
  color: #f6c85f;
}
.series-history {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 26px;
}
.series-history-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 800;
}
.series-history-details[open] summary { margin-bottom: 8px; }
.series-history li {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  line-height: 1.35;
}
.series-live-standings {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.series-live-standings span {
  padding: 4px 8px;
  border: 1px solid rgba(246, 200, 95, .65);
  border-radius: 999px;
  background: rgba(91, 45, 127, .12);
  color: var(--ink, #1d1d1b);
  font-size: 11px;
  font-weight: 800;
}
.series-live-standings span.is-you { background: var(--lime, #c8f36a); }
.series-live-standings span.is-withdrawn { opacity: .55; text-decoration: line-through; }
@media (max-width: 600px) {
  .series-standing,
  .series-final-standing { align-items: flex-start; flex-wrap: wrap; }
  .series-standing small,
  .series-final-standing span { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #seriesTransitionScreen,
  .series-transition-card,
  .series-final-panel { animation: none !important; transition: none !important; }
}
html[data-theme="dark"] .results-actions #again {
  background: var(--lime);
  color: #1d1d1b;
  border-color: var(--lime);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .results-actions #again {
    background: var(--lime);
    color: #1d1d1b;
    border-color: var(--lime);
  }
}

#resultsScreen h1 {
  overflow-wrap: anywhere;
}

/* Results are a celebration, not a spreadsheet. */
#resultsScreen {
  position: relative;
  padding-top: 14px;
  padding-bottom: 24px;
}
body:has(#resultsScreen.active) nav { display: none; }
.result-hero {
  position: relative;
  isolation: isolate;
  margin: 0 -10px 18px;
  padding: 18px 16px 14px;
  overflow: hidden;
  text-align: center;
  border: 3px solid #2c1c37;
  border-radius: 26px;
  background:
    radial-gradient(circle at 15% 15%, #b7f5ff 0 22%, transparent 22.5%),
    radial-gradient(circle at 90% 90%, #f7b2a8 0 25%, transparent 25.5%),
    linear-gradient(135deg, #f6c85f, #eaf9d2);
  color: #2c1c37;
  box-shadow: 0 8px 0 #2c1c37;
}
.result-hero .eyebrow { color: #5b2d7f; font-weight: 950; letter-spacing: .13em; }
#resultsScreen .result-hero h1 {
  position: relative;
  z-index: 1;
  margin: 4px auto 8px;
  font-size: clamp(1.8rem, 8vw, 3rem);
  line-height: .92;
  letter-spacing: -.065em;
}
#resultsScreen .result-hero h1 em { color: #dd5f58; text-shadow: 2px 2px 0 #fff9f0; }
.result-confetti i {
  position: absolute;
  color: #5b2d7f;
  font-style: normal;
  font-size: 1.1rem;
  animation: confetti-float 2.4s ease-in-out infinite alternate;
}
.result-confetti i:nth-child(1) { top: 12%; left: 7%; }
.result-confetti i:nth-child(2) { top: 22%; right: 8%; color: #dd5f58; animation-delay: -.6s; }
.result-confetti i:nth-child(3) { top: 52%; left: 12%; color: #5268c7; animation-delay: -1.1s; }
.result-confetti i:nth-child(4) { top: 62%; right: 11%; animation-delay: -.3s; }
.result-confetti i:nth-child(5) { top: 8%; left: 47%; color: #dd5f58; animation-delay: -1.5s; }
@keyframes confetti-float { to { transform: translateY(-8px) rotate(35deg) scale(1.2); } }
.result-scoreboard {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 10px 12px 8px;
  border: 3px solid #2c1c37;
  border-radius: 20px;
  background: #2c1c37;
  color: #fff9f0;
  box-shadow: 0 6px 0 #dd5f58;
  transform: rotate(-1deg);
}
.result-scoreboard-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 5px;
  border-bottom: 1px solid rgb(255 249 240 / .32);
}
.result-scoreboard-heading > small {
  color: #f6c85f;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .1em;
}
.result-scoreboard-heading > span {
  color: rgb(255 249 240 / .65);
  font-size: .54rem;
  font-weight: 900;
  letter-spacing: .1em;
}
.result-scoreboard-heading > span b {
  margin-left: 28px;
  color: #f6c85f;
}
.result-hero-scores {
  display: grid;
  gap: 0;
  margin-top: 3px;
}
.result-score-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 3px;
  border-bottom: 1px solid rgb(255 249 240 / .2);
  color: #fff9f0;
  text-align: left;
}
.result-score-row:last-child { border-bottom: 0; }
.result-score-row.is-winner {
  margin: 3px 0;
  padding: 5px 8px;
  border: 2px solid #f6c85f;
  border-radius: 11px;
  background: linear-gradient(100deg, #f6c85f, #fff1a8);
  color: #2c1c37;
}
.result-score-row.is-you:not(.is-winner) { color: #b7f5ff; }
.result-score-rank {
  color: #f6c85f;
  font-size: 1.05rem;
  font-weight: 950;
  text-align: center;
}
.result-score-row.is-winner .result-score-rank { color: #5b2d7f; }
.result-score-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.result-score-identity b,
.result-score-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-score-identity b { font-size: .78rem; }
.result-score-identity small {
  color: rgb(255 249 240 / .65);
  font-size: .54rem;
  font-weight: 900;
  letter-spacing: .07em;
}
.result-score-row.is-winner .result-score-identity small { color: #5b2d7f; }
.result-score-value {
  color: #f6c85f;
  font-size: 1.3rem;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.result-score-row.is-winner .result-score-value { color: #5b2d7f; }
.result-scoreboard-footer {
  display: block;
  margin-top: 5px;
  color: rgb(255 249 240 / .7);
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-align: center;
}
.result-scoreboard #finalScore[hidden] { display: none; }
.result-word-highlights {
  margin: 20px 0 0;
  padding: 13px 12px 12px;
  border: 2px solid #2c1c37;
  border-radius: 20px;
  background: #fff9f0;
  color: #2c1c37;
  box-shadow: 0 5px 0 #2c1c37;
}
.result-word-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px 8px;
  border-bottom: 1px solid rgb(44 28 55 / .2);
}
.result-word-heading small {
  color: #5b2d7f;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .1em;
}
.result-word-heading span {
  color: #6d6175;
  font-size: .54rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.result-word-list {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}
.result-word-row {
  display: grid;
  grid-template-columns: 22px minmax(0, .75fr) minmax(0, 1.25fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 3px;
  border-bottom: 1px solid rgb(44 28 55 / .14);
}
.result-word-row:last-child { border-bottom: 0; }
.result-word-rank {
  color: #5b2d7f;
  font-size: .82rem;
  font-weight: 950;
  text-align: center;
}
.result-word-main,
.result-word-players { min-width: 0; }
.result-word-main b,
.result-word-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-word-main b {
  font-size: .82rem;
  letter-spacing: .03em;
}
.result-word-main small {
  margin-top: 2px;
  color: #6d6175;
  font-size: .58rem;
  font-weight: 800;
}
.result-word-players {
  color: #2c1c37;
  font-size: .67rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.result-word-player { white-space: nowrap; }
.result-word-empty {
  margin: 12px 3px 2px;
  color: #6d6175;
  font-size: .7rem;
  font-weight: 800;
  text-align: center;
}
.result-word-empty[hidden] { display: none; }
.sudden-death-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 12px 14px;
  border: 2px solid #2c1c37;
  border-radius: 15px;
  background: linear-gradient(110deg, #ffcf58, #ff8b74);
  color: #2c1c37;
  box-shadow: 0 4px 0 #2c1c37;
}
.sudden-death-callout[hidden] { display: none; }
.sudden-death-callout > span { font-size: 1.7rem; }
.sudden-death-callout b,
.sudden-death-callout small { display: block; }
.sudden-death-callout b { font-size: .9rem; }
.sudden-death-callout small { margin-top: 3px; font-weight: 800; }
.rush-next-round {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 14px 0 18px;
  padding: 14px 18px;
  border: 2px solid #2c1c37;
  border-radius: 15px;
  background: linear-gradient(110deg, #b7f5ff, #b9f2dc);
  color: #2c1c37;
  box-shadow: 0 4px 0 #2c1c37;
  text-align: center;
}
.rush-next-round[hidden] { display: none; }
.rush-next-round:active { transform: translateY(3px); box-shadow: 0 1px 0 #2c1c37; }
.rush-next-round > span:first-child { font-size: 1.9rem; line-height: 1; }
.rush-next-round > span:last-child { display: grid; justify-items: center; gap: 3px; }
.rush-next-round b,
.rush-next-round small { display: block; }
.rush-next-round b { font-size: 1rem; }
.rush-next-round small { font-size: .72rem; font-weight: 800; }
.sudden-death-explosion {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 28px;
  overflow: hidden;
  pointer-events: none;
  text-align: center;
  background: radial-gradient(circle, rgb(255 244 174) 0 12%, rgb(255 118 94) 42%, rgb(91 45 127) 100%);
  color: #fff9f0;
  text-shadow: 3px 3px 0 #2c1c37;
}
.sudden-death-explosion[hidden] { display: none; }
.sudden-death-explosion.is-active { animation: sudden-death-screen 4.5s ease-out both; }
.sudden-death-explosion strong { font-size: clamp(2.4rem, 11vw, 5rem); line-height: .9; }
.sudden-death-explosion > span { font-size: clamp(1rem, 4vw, 1.5rem); font-weight: 900; }
.explosion-confetti i {
  position: absolute;
  font-style: normal;
  font-size: clamp(1.8rem, 8vw, 4rem);
  animation: explosion-confetti 4.5s cubic-bezier(.18,.8,.24,1) both;
}
.explosion-confetti i:nth-child(1) { top: 10%; left: 12%; color: #f6c85f; }
.explosion-confetti i:nth-child(2) { top: 20%; right: 10%; color: #b7f5ff; }
.explosion-confetti i:nth-child(3) { bottom: 14%; left: 9%; color: #eaf9d2; }
.explosion-confetti i:nth-child(4) { bottom: 19%; right: 13%; color: #f6c85f; }
.explosion-confetti i:nth-child(5) { top: 8%; left: 48%; color: #f7b2a8; }
.explosion-confetti i:nth-child(6) { bottom: 10%; left: 48%; color: #b7f5ff; }
.explosion-confetti i:nth-child(7) { top: 45%; right: 5%; color: #eaf9d2; }
@keyframes sudden-death-screen {
  0% { opacity: 0; transform: scale(.78) rotate(-2deg); }
  12% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  26% { transform: scale(.98) rotate(-1deg); }
  42% { transform: scale(1.02) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes explosion-confetti {
  from { opacity: 0; transform: translate(0, 0) scale(.2) rotate(0); }
  20% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(1.3) rotate(180deg); }
}
@media (prefers-reduced-motion: reduce) {
  .sudden-death-explosion.is-active {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .explosion-confetti i { animation: none; }
}
.results-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.results-actions .result-action-tile {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 2px solid #2c1c37;
  border-radius: 14px;
  background: #efe2ff;
  color: #2c1c37;
  box-shadow: 0 4px 0 #2c1c37;
  font: 900 .68rem/1.1 monospace;
  text-align: center;
  text-transform: uppercase;
}
.results-actions .result-action-tile:hover,
.results-actions .result-action-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #2c1c37;
}
.results-actions .result-action-tile:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #2c1c37;
}
.results-actions #again { background: #ff765e; }
.results-actions #exitParty { background: #b7f5ff; }
.results-actions #stopRushResults { background: #c8f36a; }
.results-actions #pauseRushResults { background: #b7f5ff; }
.results-actions #resultsHome { background: #e3c8ff; }
.results-actions .result-action-tile[hidden] { display: none; }
html[data-theme="dark"] .result-word-highlights { color: #2c1c37; }
@media (prefers-reduced-motion: reduce) { .result-confetti i { animation: none; } }

.progress {
  margin: 30px 0 25px;
  padding: 18px;
  border: 2px solid #2c1c37;
  border-radius: 20px;
  background: linear-gradient(120deg, #f7b2a8, #ffe278 52%, #b7f5ff);
  color: #2c1c37;
  box-shadow: 0 5px 0 #2c1c37;
}
.progress b { color: #2c1c37; }
.progress i {
  height: 12px;
  border: 2px solid #2c1c37;
  border-radius: 99px;
  background: #fff9f0;
  overflow: hidden;
}
.achievement-list article {
  border: 2px solid #2c1c37;
  border-radius: 16px;
  background: #fff9f0;
  color: #5b2d7f;
  box-shadow: 0 4px 0 #2c1c37;
}
.achievement-list article:nth-child(3n + 2) { background: #b7f5ff; }
.achievement-list article:nth-child(3n) { background: #e3c8ff; }
.achievement-list article:nth-child(4n) { background: #eaf9d2; }
.achievement-list article > span { font-size: 1.8rem; }
.achievement-list b { color: #2c1c37; }
.achievement-list small { color: #5e5266; }
.achievement-list em { color: #5b2d7f; font-weight: 900; }
@media (prefers-reduced-motion: no-preference) {
  .achievement-list article:hover { transform: translateY(-3px) rotate(0); }
}
