:root {
  color-scheme: dark;
  --page: #191b1f;
  --panel: #1f2227;
  --panel-soft: #25282d;
  --line: #777a80;
  --ink: #f4f4f5;
  --muted: #a4a7ad;
  --input: #a9a9a9;
  --green: #1ed760;
  --red: #d94b4b;
  --blue: #4547ff;
  --gold: #d6b34d;
  --orange: #e1833b;
  --button: #ececec;
  --button-ink: #111216;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.build-indicator {
  position: fixed;
  right: calc(10px + env(safe-area-inset-right));
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 25;
  color: rgba(244, 244, 245, 0.74);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    opacity 150ms ease,
    box-shadow 150ms ease;
}

.game-shell {
  display: grid;
  grid-template-rows: 56px auto minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
}

.wordle-topbar {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 40;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 56px;
  border-bottom: 1px solid rgba(74, 78, 86, 0.55);
  background: rgba(18, 19, 20, 0.82);
  -webkit-backdrop-filter: blur(10px) saturate(1.12);
  backdrop-filter: blur(10px) saturate(1.12);
  padding: 0 14px;
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.2);
}

.left-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1;
  min-width: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  grid-column: 2;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 5px 8px;
  cursor: pointer;
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    background 150ms ease;
}

.brand-logo:hover,
.brand-logo:focus-visible {
  background: rgba(255, 255, 255, 0.035);
}

.brand-logo:active {
  transform: translateY(1px) scale(0.99);
}

.logo-mark {
  display: grid;
  position: relative;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--page) 0 7px, transparent 8px),
    repeating-radial-gradient(circle at center, #111216 0 5px, #2b2e34 6px 9px);
  box-shadow:
    0 0 0 1px rgba(30, 215, 96, 0.55),
    0 0 14px rgba(69, 71, 255, 0.38),
    0 0 28px rgba(30, 215, 96, 0.14);
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.logo-mark span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.42rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: lowercase;
}

.top-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  grid-column: 3;
  color: var(--muted);
  font-size: 0.92rem;
}

.user-pill {
  display: inline-flex;
  max-width: 118px;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(60, 64, 71, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 244, 245, 0.82);
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 850;
}

.user-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill:hover,
.user-pill:focus-visible {
  border-color: rgba(30, 215, 96, 0.32);
  background: rgba(30, 215, 96, 0.055);
  color: var(--ink);
}

.profile-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(60, 64, 71, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 244, 245, 0.82);
  padding: 0;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.profile-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-button:hover,
.profile-button:focus-visible,
.profile-button.is-connected {
  border-color: rgba(30, 215, 96, 0.38);
  background: rgba(30, 215, 96, 0.07);
  color: var(--ink);
}

.profile-button:active {
  transform: scale(0.96);
}

.menu-popover {
  position: relative;
}

.landing-menu-popover {
  display: none;
  position: fixed;
  top: max(16px, calc(env(safe-area-inset-top) + 14px));
  left: max(14px, calc(env(safe-area-inset-left) + 14px));
  z-index: 65;
}

.landing-menu-popover .icon-control {
  box-shadow: none;
}

.landing-menu-popover .icon-control:hover,
.landing-menu-popover .icon-control:focus-visible {
  box-shadow: none;
}

.landing-menu-flyout {
  top: calc(100% + 9px);
}

.menu-flyout {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  display: grid;
  gap: 3px;
  width: 194px;
  border: 1px solid rgba(74, 78, 86, 0.64);
  border-radius: 12px;
  background: rgba(27, 29, 34, 0.92);
  padding: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
  backdrop-filter: blur(8px) saturate(1.04);
  transform-origin: top left;
  animation: menu-in 140ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.menu-flyout.is-closing {
  animation: menu-out 120ms ease both;
  pointer-events: none;
}

.menu-flyout button {
  min-height: 39px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(244, 244, 245, 0.88);
  padding: 0 11px;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 800;
}

.menu-flyout button:hover,
.menu-flyout button:focus-visible {
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
}

.menu-flyout button:active {
  transform: scale(0.99);
}

.icon-control:hover {
  background: #24262b;
}

.icon-control:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.guess-button:focus-visible,
.brand-logo:focus-visible,
.leaderboard-name:focus-visible,
.leaderboard-chevron:focus-visible,
.archive-entry:focus-visible {
  outline: 2px solid rgba(30, 215, 96, 0.85);
  outline-offset: 2px;
}

.quiz-meta {
  margin: 11px 0 6px;
  color: rgba(244, 244, 245, 0.78);
  font-size: 0.94rem;
  font-weight: 780;
  text-align: center;
}

.live-toast {
  position: fixed;
  top: 62px;
  left: 50%;
  z-index: 90;
  margin: 0;
  border: 1px solid rgba(244, 244, 245, 0.14);
  border-radius: 999px;
  background: rgba(18, 20, 23, 0.78);
  color: var(--ink);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 12px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -8px);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
  pointer-events: none;
}

.live-toast.is-visible {
  animation: live-toast-in 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.live-toast.is-hiding {
  animation: live-toast-out 240ms ease forwards;
}

.ghost-button,
.primary-button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 15px;
  font-weight: 800;
}

.ghost-button {
  background: #2c3036;
  color: var(--ink);
}

.ghost-button:hover {
  background: #353940;
}

.primary-button {
  background: var(--button);
  color: var(--button-ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.primary-button:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(1px) scale(0.99);
}

.stage {
  display: grid;
  position: relative;
  overflow: hidden;
  place-items: center;
  min-height: 0;
  background:
    linear-gradient(180deg, #151719 0%, #101112 44%, #121314 100%);
  padding: 18px 0 calc(28px + env(safe-area-inset-bottom));
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(30, 215, 96, 0.08), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(69, 71, 255, 0.055), transparent 42%);
  opacity: 0.72;
  pointer-events: none;
}

.stage > * {
  position: relative;
  z-index: 1;
}

.info-popover {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: transparent;
}

.info-popover:hover,
.info-popover:focus-within {
  background: #24262b;
}

.info-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0px;
  width: 34px;
  height: 14px;
}

.info-button {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
}

.info-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  z-index: 10;
  width: 220px;
  border-radius: 6px;
  background: #24262b;
  padding: 13px 14px 14px;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  pointer-events: none;
  text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.info-flyout::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 17px;
  width: 12px;
  height: 12px;
  background: #24262b;
  transform: rotate(45deg);
}

.info-flyout strong {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.info-popover:hover .info-flyout,
.info-popover:focus-within .info-flyout {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.info-names,
.start-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.info-names {
  justify-content: flex-start;
  margin-top: 10px;
}

.info-names span,
.start-names span {
  border: 1px solid #3c4047;
  border-radius: 999px;
  background: #17191d;
  color: var(--ink);
  padding: 7px 11px;
  font-size: 0.86rem;
  font-weight: 800;
}

.volume-popover {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: transparent;
  transition:
    background 170ms ease,
    box-shadow 170ms ease;
}

.volume-popover:hover,
.volume-popover:focus-within {
  background: #24262b;
  box-shadow: none;
}

.volume-popover::after {
  content: "";
  position: absolute;
  top: 100%;
  right: -6px;
  width: 170px;
  height: 14px;
}

.icon-control {
  display: grid;
  position: relative;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}

.menu-button {
  border: 0;
  background: transparent;
  color: rgba(244, 244, 245, 0.88);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.menu-button:hover,
.menu-button:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  box-shadow: none;
}

.menu-button:active {
  transform: translateY(1px) scale(0.98);
}

.speaker-svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.speaker-svg path:first-child {
  stroke: none;
}

.trophy-svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.trophy-button:hover,
.trophy-button:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  color: #ffe08a;
}

.volume-flyout {
  position: absolute;
  top: calc(100% + 10px);
  right: -6px;
  z-index: 30;
  width: 170px;
  border-radius: 6px;
  background: #24262b;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.volume-flyout::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 17px;
  width: 12px;
  height: 12px;
  background: #24262b;
  transform: rotate(45deg);
}

.volume-popover:hover .volume-flyout,
.volume-popover:focus-within .volume-flyout {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.volume-flyout input {
  width: 100%;
  accent-color: var(--ink);
}

.start-panel,
.track-card,
.empty-state,
.summary,
.loading-state {
  display: grid;
  justify-items: center;
  width: min(720px, calc(100vw - 48px));
  text-align: center;
}

.start-panel.is-entering,
.track-card.is-entering,
.empty-state.is-entering,
.summary.is-entering,
.loading-state.is-entering {
  animation: panel-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.start-panel {
  align-content: start;
  min-height: min(650px, calc(100vh - 116px));
  padding: clamp(44px, 7vh, 72px) 18px 28px;
}

.start-logo {
  display: grid;
  position: relative;
  width: 92px;
  height: 92px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #121314 0 23%, transparent 24%),
    repeating-radial-gradient(circle at center, #15171a 0 9px, #34373e 10px 14px);
  box-shadow:
    0 0 0 2px #4547ff,
    0 18px 50px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(69, 71, 255, 0.22);
}

.start-logo::before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.start-logo span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--blue);
}

.start-panel h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: 0;
}

.start-copy {
  max-width: 430px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.start-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(430px, 86vw);
  margin: 0 0 18px;
}

.start-stats span {
  display: grid;
  min-width: 92px;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 9px 12px;
}

.start-stats strong {
  font-size: 1rem;
  line-height: 1.1;
}

.start-stats small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.start-names {
  width: min(430px, 86vw);
  margin-bottom: 28px;
}

.start-button {
  min-width: min(320px, 82vw);
}

.track-card {
  align-content: center;
  min-height: min(760px, calc(100vh - 104px));
  padding: 36px 20px 32px;
}

.progress-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  transform: translateY(-28px);
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 1fr));
  gap: 10px;
  width: min(438px, 88vw);
  margin: 0 0 28px;
  transform: translateY(-28px);
}

.scoreboard span {
  display: grid;
  min-height: 58px;
  align-content: center;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 9px 12px;
}

.scoreboard strong {
  font-size: 1.18rem;
  line-height: 1.05;
}

.scoreboard small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cover-wrap {
  position: relative;
  z-index: 0;
  width: clamp(226px, 14.8vw, 238px);
  aspect-ratio: 1;
  margin-bottom: 14px;
}

.cover-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 20px;
  background:
    linear-gradient(rgba(30, 215, 96, 0.18), rgba(69, 71, 255, 0.14)),
    var(--cover-glow);
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.1);
  opacity: 0.5;
  transform: scale(0.98);
}

#coverImage,
.cover-fallback {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.cover-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #d3d335 0 10%, transparent 10.5%),
    repeating-linear-gradient(135deg, #dad735 0 16px, #b9b626 16px 32px);
}

.cover-fallback span {
  width: 44%;
  aspect-ratio: 1;
  border: 18px solid rgba(25, 27, 31, 0.78);
  border-radius: 50%;
}

.cover-fallback.big {
  width: 180px;
  height: 180px;
  margin-bottom: 24px;
}

.play-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 244, 245, 0.94);
  color: #111216;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(438px, 82vw);
  min-height: 46px;
  margin-bottom: 14px;
}

.replay-button,
.pause-button {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  font-size: 2.05rem;
  font-weight: 900;
  line-height: 1;
  transition:
    transform 140ms ease,
    color 140ms ease,
    background 140ms ease;
}

.replay-button:hover {
  background: rgba(69, 71, 255, 0.12);
  transform: rotate(-26deg);
}

.replay-button:focus-visible,
.pause-button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.replay-button:active {
  transform: rotate(-70deg) scale(0.94);
}

.replay-button.is-disabled {
  color: #656870;
}

.pause-button {
  color: var(--ink);
  font-size: 1rem;
}

.pause-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pause-button:active {
  transform: scale(0.94);
}

.pause-button.is-disabled {
  color: #656870;
}

.pause-icon {
  position: relative;
  width: 18px;
  height: 20px;
}

.pause-icon::before,
.pause-icon::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 6px;
  height: 16px;
  border-radius: 2px;
  background: currentColor;
}

.pause-icon::before {
  left: 2px;
}

.pause-icon::after {
  right: 2px;
}

.pause-button.is-paused .pause-icon::before {
  left: 4px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  border-radius: 0;
  background: transparent;
}

.pause-button.is-paused .pause-icon::after {
  display: none;
}

.track-copy {
  margin-bottom: 20px;
}

#trackTitle {
  margin-bottom: 5px;
  font-size: clamp(1.78rem, 3.2vw, 2.3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

#trackArtist {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.12;
}

.answer-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  min-height: 40px;
  margin-bottom: 4px;
}

.dot {
  display: grid;
  position: relative;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #a7a7a7;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 2px 7px rgba(0, 0, 0, 0.26);
}

.dot.found {
  background: var(--green);
  animation: dot-pop 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dot.found::after {
  content: "";
  width: 14px;
  height: 8px;
  border-left: 3px solid #eaf7ea;
  border-bottom: 3px solid #eaf7ea;
  transform: rotate(-45deg) translate(1px, -3px);
}

.dot.missed {
  background: var(--orange);
}

.dot.missed::before,
.dot.missed::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: #fff4e8;
}

.dot.missed::before {
  transform: rotate(45deg);
}

.dot.missed::after {
  transform: rotate(-45deg);
}

.found-status {
  min-height: 23px;
  margin: 0 0 clamp(18px, 3.5vh, 36px);
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
}

.guess-field {
  position: relative;
  width: min(410px, 82vw);
  min-height: 48px;
  margin-bottom: 18px;
  background: var(--input);
  transition:
    background 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.guess-field:focus-within {
  box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.12);
}

.guess-field input {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #16181c;
  outline: none;
  padding: 0 14px;
  text-align: center;
  font-weight: 760;
}

.guess-field input::placeholder {
  color: rgba(22, 24, 28, 0.62);
}

.guess-field.wrong {
  animation: shake 280ms linear;
  background: var(--red);
  box-shadow:
    0 0 0 4px rgba(217, 75, 75, 0.2),
    0 0 28px rgba(217, 75, 75, 0.34);
}

.guess-suggestions {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: rgba(32, 35, 40, 0.98);
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.guess-suggestions button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: #2c3036;
  color: var(--ink);
  font-weight: 900;
}

.guess-suggestions button:hover {
  background: rgba(30, 215, 96, 0.18);
}

.guess-field.right {
  animation: answer-pulse 420ms cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--green);
  box-shadow:
    0 0 0 4px rgba(30, 215, 96, 0.2),
    0 0 34px rgba(30, 215, 96, 0.38);
}

.found-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
}

.found-names:empty {
  min-height: 0;
}

.found-names span {
  border-radius: 999px;
  background: rgba(61, 125, 60, 0.24);
  color: #baf5c9;
  padding: 7px 12px;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(30, 215, 96, 0.12);
  animation: chip-in 180ms ease both;
}

.found-names span.revealed {
  background: rgba(225, 131, 59, 0.22);
  color: #ffd6b3;
}

#nextTrack {
  margin-top: 12px;
}

.reveal-button {
  margin-top: 10px;
  border-color: rgba(244, 244, 245, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 244, 245, 0.72);
}

.reveal-button:hover,
.reveal-button:focus-visible {
  border-color: rgba(244, 244, 245, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.loading-state {
  gap: 12px;
  color: rgba(164, 167, 173, 0.76);
  animation: loading-soft-in 240ms ease both;
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(74, 78, 86, 0.58);
  border-top-color: rgba(244, 244, 245, 0.82);
  border-radius: 50%;
  animation: spin 0.95s linear infinite;
}

.loading-state p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 760;
}

.empty-state,
.summary {
  align-content: center;
  min-height: min(680px, calc(100vh - 116px));
}

.summary {
  position: relative;
  overflow: hidden;
  padding: 28px 18px;
}

.empty-state h2,
.summary h2 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
}

.summary .kicker {
  color: #9ca3ff;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.empty-state p {
  margin-bottom: 22px;
  color: var(--muted);
}

.summary-copy,
.summary-countdown {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.perfect-note {
  margin: 0 0 8px;
  color: #ffe08a;
  font-size: 0.95rem;
  font-weight: 900;
}

.summary-trophy {
  display: grid;
  gap: 4px;
  width: min(420px, 88vw);
  margin: 6px auto 10px;
  border: 1px solid rgba(255, 224, 138, 0.28);
  border-radius: 9px;
  background: rgba(255, 224, 138, 0.07);
  padding: 10px 12px;
  animation: trophy-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.summary-trophy span {
  color: rgba(255, 224, 138, 0.82);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.summary-trophy strong {
  font-size: 0.96rem;
  font-weight: 900;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  justify-content: center;
  gap: 8px;
  width: min(660px, 90vw);
  margin: 12px auto 14px;
}

.summary-stats article {
  position: relative;
  display: grid;
  align-content: center;
  overflow: hidden;
  min-height: 66px;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
}

.summary-stats strong {
  position: relative;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  line-height: 1.05;
}

.summary-stat.is-streak-fire {
  border-color: rgba(255, 164, 74, 0.42);
  box-shadow:
    0 0 24px rgba(225, 131, 59, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.summary-stat.is-streak-fire::before,
.summary-stat.is-streak-fire::after {
  content: "🔥";
  position: absolute;
  top: 50%;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
}

.summary-stat.is-streak-fire::before {
  left: 16px;
  animation: streak-flame-left 960ms ease-out both;
}

.summary-stat.is-streak-fire::after {
  right: 16px;
  animation: streak-flame-right 960ms ease-out 90ms both;
}

.summary-stat.is-streak-fire strong {
  animation: streak-new-number 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.summary-stat.is-streak-fire strong::before {
  content: attr(data-before);
  position: absolute;
  inset: 0;
  color: rgba(244, 244, 245, 0.78);
  animation: streak-old-number 520ms ease-out both;
}

.summary-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 8px;
  width: min(420px, 88vw);
  margin: 4px 0 12px;
}

.summary-actions .primary-button,
.summary-actions .ghost-button {
  width: 100%;
}

.share-fallback {
  width: min(520px, 88vw);
  min-height: 128px;
  border: 1px solid rgba(30, 215, 96, 0.34);
  border-radius: 8px;
  background: rgba(17, 18, 22, 0.92);
  color: var(--ink);
  margin: 0 0 12px;
  padding: 12px 13px;
  resize: vertical;
  outline: none;
  font: 800 0.9rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  box-shadow: 0 0 26px rgba(30, 215, 96, 0.1);
}

.summary-countdown {
  margin-bottom: 22px;
  color: var(--ink);
  font-weight: 800;
}

.confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: 24%;
  left: 50%;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: confetti-pop 1.35s cubic-bezier(0.16, 1, 0.3, 1) var(--d) forwards;
}

.summary-list {
  display: grid;
  gap: 8px;
  width: min(620px, 88vw);
  margin: 18px auto 22px;
}

.summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px 14px;
  text-align: left;
}

.summary-row.is-correct {
  border-color: rgba(30, 215, 96, 0.45);
  box-shadow: 0 0 18px rgba(30, 215, 96, 0.08);
}

.summary-row.is-revealed {
  border-color: rgba(225, 131, 59, 0.38);
  box-shadow: 0 0 18px rgba(225, 131, 59, 0.08);
}

.summary-row.is-missed {
  border-color: rgba(217, 75, 75, 0.42);
  box-shadow: 0 0 18px rgba(217, 75, 75, 0.08);
}

.summary-row-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.summary-row strong {
  overflow-wrap: anywhere;
}

.summary-row small,
.summary-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-row-score {
  display: grid;
  justify-items: end;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.summary-row-score small {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 10, 0.72);
  padding: 18px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-panel {
  width: min(440px, calc(100vw - 28px));
  border: 1px solid rgba(74, 78, 86, 0.68);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(37, 40, 45, 0.98), rgba(26, 28, 32, 0.98));
  color: var(--ink);
  padding: 24px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.5);
  contain: layout paint;
}

.modal-panel.is-entering {
  animation: modal-in 210ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-panel h2 {
  margin-bottom: 8px;
  font-size: 1.62rem;
  line-height: 1.1;
}

.modal-panel p {
  color: var(--muted);
  line-height: 1.52;
}

.about-panel p {
  margin-bottom: 13px;
  font-size: 0.98rem;
}

.about-panel p:last-child {
  margin-bottom: 0;
  color: rgba(244, 244, 245, 0.86);
  font-weight: 720;
  line-height: 1.7;
}

.username-panel form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.username-panel input {
  min-height: 46px;
  border: 1px solid #3c4047;
  border-radius: 8px;
  background: #111216;
  color: var(--ink);
  outline: none;
  padding: 0 13px;
  font-weight: 850;
}

.username-panel input:focus {
  border-color: rgba(30, 215, 96, 0.72);
  box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.11);
}

.form-error {
  margin: -2px 0 0;
  color: #ffb3b3 !important;
  font-size: 0.86rem;
  font-weight: 800;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
}

.leaderboard-panel {
  width: min(560px, calc(100vw - 28px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(760px, calc(100vh - 36px));
  max-height: min(760px, calc(100svh - 36px));
  overflow: hidden;
  padding: 24px 24px 22px;
}

.tab-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-radius: 8px;
  background: #17191d;
  padding: 5px;
}

.tab-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab-button.is-active {
  background: #ececec;
  color: #111216;
}

.leaderboard-list {
  display: grid;
  align-content: start;
  gap: 9px;
  margin-top: 15px;
  height: min(600px, calc(100vh - 190px));
  height: min(600px, calc(100svh - 190px));
  min-height: min(360px, calc(100vh - 220px));
  min-height: min(360px, calc(100svh - 220px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #34373d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px 13px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.leaderboard-row:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 215, 96, 0.3);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.leaderboard-row strong {
  color: #ffe08a;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}

.leaderboard-row.is-top-1 {
  border-color: rgba(255, 224, 138, 0.55);
  background:
    linear-gradient(90deg, rgba(255, 224, 138, 0.13), rgba(255, 255, 255, 0.045));
  box-shadow: 0 0 26px rgba(255, 224, 138, 0.11);
}

.leaderboard-row.is-top-2 {
  border-color: rgba(210, 218, 230, 0.42);
  background:
    linear-gradient(90deg, rgba(210, 218, 230, 0.1), rgba(255, 255, 255, 0.045));
}

.leaderboard-row.is-top-3 {
  border-color: rgba(225, 131, 59, 0.42);
  background:
    linear-gradient(90deg, rgba(225, 131, 59, 0.1), rgba(255, 255, 255, 0.045));
}

.leaderboard-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.leaderboard-row b {
  font-size: 0.96rem;
}

.leaderboard-row small {
  color: var(--muted);
  font-weight: 850;
}

.empty-leaderboard {
  margin: 14px 0 2px;
  border: 1px dashed rgba(91, 96, 107, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 26px 14px;
  color: rgba(244, 244, 245, 0.78);
  font-weight: 820;
  text-align: center;
}

.leaderboard-entry {
  border: 1.5px solid #34373d;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.leaderboard-entry:hover,
.leaderboard-entry.is-open {
  border-color: rgba(30, 215, 96, 0.3);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.leaderboard-main {
  display: grid;
  grid-template-columns: 40px 34px minmax(0, 1fr) auto 30px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.leaderboard-main:hover {
  background: rgba(255, 255, 255, 0.035);
}

.leaderboard-main strong {
  color: #ffe08a;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}

.leaderboard-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(244, 244, 245, 0.74);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-main b {
  font-size: 0.98rem;
  font-weight: 920;
  white-space: nowrap;
}

.leaderboard-name {
  display: grid;
  gap: 2px;
  align-content: center;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-weight: 900;
}

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

.leaderboard-profile-hint {
  justify-self: start;
  color: rgba(164, 167, 173, 0.68);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  transition:
    color 150ms ease,
    opacity 150ms ease;
}

.leaderboard-name:hover .leaderboard-profile-hint,
.leaderboard-name:focus-visible .leaderboard-profile-hint {
  color: rgba(30, 215, 96, 0.8);
}

.leaderboard-chevron {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  line-height: 0;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-chevron:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.leaderboard-chevron::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transform-origin: 50% 50%;
}

.leaderboard-entry.is-open .leaderboard-chevron {
  transform: rotate(180deg);
}

.leaderboard-entry.is-top-1 {
  border-color: rgba(255, 224, 138, 0.55);
  background:
    linear-gradient(90deg, rgba(255, 224, 138, 0.13), rgba(255, 255, 255, 0.045));
}

.leaderboard-entry.is-top-2 {
  border-color: rgba(210, 218, 230, 0.42);
  background:
    linear-gradient(90deg, rgba(210, 218, 230, 0.1), rgba(255, 255, 255, 0.045));
}

.leaderboard-entry.is-top-3 {
  border-color: rgba(225, 131, 59, 0.42);
  background:
    linear-gradient(90deg, rgba(225, 131, 59, 0.1), rgba(255, 255, 255, 0.045));
}

.leaderboard-details {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(74, 78, 86, 0.52);
  background: rgba(8, 9, 10, 0.2);
  padding: 8px;
  animation: detail-in 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.leaderboard-entry.is-closing .leaderboard-details {
  animation: detail-out 220ms ease both;
}

.leaderboard-answer-row,
.weekly-game-row {
  border: 2px solid rgba(74, 78, 86, 0.62);
  border-radius: 8px;
  background: rgba(17, 18, 22, 0.36);
  overflow: hidden;
}

.leaderboard-answer-row.is-correct {
  border-color: rgba(30, 215, 96, 0.42);
}

.leaderboard-answer-row.is-revealed {
  border-color: rgba(225, 131, 59, 0.44);
}

.leaderboard-answer-row.is-missed {
  border-color: rgba(217, 75, 75, 0.44);
}

.leaderboard-answer-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 8px 9px;
  text-align: left;
  transition: background 150ms ease;
}

.leaderboard-answer-toggle:hover,
.leaderboard-answer-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.045);
}

.leaderboard-answer-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.leaderboard-answer-copy strong,
.weekly-game-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.leaderboard-answer-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-answer-copy small,
.leaderboard-answer-copy span,
.weekly-game-row small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-answer-toggle > b,
.weekly-game-row > b {
  white-space: nowrap;
}

.leaderboard-answer-chevron {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: rgba(244, 244, 245, 0.62);
  transition:
    color 150ms ease,
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-answer-chevron::before {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transform-origin: 50% 50%;
}

.leaderboard-answer-toggle:hover .leaderboard-answer-chevron,
.leaderboard-answer-toggle:focus-visible .leaderboard-answer-chevron {
  color: var(--ink);
}

.leaderboard-answer-row.is-open .leaderboard-answer-chevron {
  transform: rotate(180deg);
}

.leaderboard-answer-detail {
  display: grid;
  gap: 4px;
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1.25;
  opacity: 0;
  transition:
    border-color 220ms ease,
    max-height 260ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    padding 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-answer-row.is-open .leaderboard-answer-detail {
  max-height: 120px;
  border-top-color: rgba(74, 78, 86, 0.5);
  padding: 8px 10px 9px;
  opacity: 1;
}

.weekly-game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
}

.leaderboard-detail-empty {
  margin: 0;
  border: 1px dashed rgba(91, 96, 107, 0.54);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.028);
  color: var(--muted);
  padding: 13px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 820;
}

.profile-backdrop {
  background: rgba(8, 9, 10, 0.64);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  backdrop-filter: blur(8px) saturate(1.02);
}

.profile-panel {
  width: min(380px, calc(100vw - 28px));
  padding: 24px;
}

#profileTitle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-title-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-badges {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
}

.profile-badge {
  position: relative;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
  line-height: 1;
  filter: saturate(0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.profile-badge:hover,
.profile-badge:focus-visible {
  border-color: rgba(255, 224, 138, 0.24);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-1px);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.profile-stats article {
  display: grid;
  min-height: 78px;
  align-content: center;
  border: 1px solid rgba(74, 78, 86, 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.profile-stats strong {
  overflow-wrap: anywhere;
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1.1;
}

.profile-stats span,
.profile-loading {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-loading {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  text-align: center;
}

.account-panel {
  width: min(430px, calc(100vw - 28px));
}

.account-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(30, 215, 96, 0.26);
  border-radius: 999px;
  background: rgba(30, 215, 96, 0.075);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-copy strong {
  overflow-wrap: anywhere;
  font-size: 1.12rem;
  line-height: 1.1;
}

.account-copy span,
.account-copy small,
.account-group span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.4;
}

.account-group span[hidden] {
  display: none;
}

.account-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  border-top: 1px solid rgba(74, 78, 86, 0.46);
  padding-top: 16px;
}

.account-group > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.account-group strong {
  overflow-wrap: anywhere;
  font-size: 0.94rem;
}

.account-group-actions,
.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-actions {
  margin-top: 16px;
}

.account-group-actions .ghost-button,
.account-actions .ghost-button {
  width: auto;
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.84rem;
}

.group-panel,
.group-form-panel {
  width: min(430px, calc(100vw - 28px));
}

.group-summary {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border-bottom: 1px solid rgba(74, 78, 86, 0.46);
  padding-bottom: 15px;
}

.group-summary strong {
  overflow-wrap: anywhere;
  font-size: 1.08rem;
  font-weight: 900;
}

.group-summary span,
.group-code-card span,
.modal-helper {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.4;
}

.group-code-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 15px;
}

.group-code-card span {
  grid-column: 1 / -1;
}

.group-code-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0.06em;
  font-size: 1.12rem;
  font-weight: 900;
}

.group-code-card .ghost-button {
  width: auto;
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.84rem;
}

.modal-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.modal-form label {
  display: grid;
  gap: 7px;
}

.modal-form label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 860;
  text-transform: uppercase;
}

.modal-form input {
  min-height: 46px;
  border: 1px solid #3c4047;
  border-radius: 8px;
  background: #111216;
  color: var(--ink);
  outline: none;
  padding: 0 13px;
  font-weight: 850;
}

.modal-form input:focus {
  border-color: rgba(30, 215, 96, 0.72);
  box-shadow: 0 0 0 4px rgba(30, 215, 96, 0.11);
}

.modal-helper {
  margin: -4px 0 0;
}

.landing-group-pill {
  width: fit-content;
  max-width: min(340px, 82vw);
  margin: -4px auto 18px;
  border: 1px solid rgba(244, 244, 245, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(244, 244, 245, 0.76);
  padding: 6px 11px;
  overflow-wrap: anywhere;
  font-size: 0.76rem;
  font-weight: 860;
}

@media (max-width: 520px) {
  .account-group {
    grid-template-columns: 1fr;
  }

  .account-group-actions,
  .account-actions {
    justify-content: stretch;
  }

  .account-group-actions .ghost-button,
  .account-actions .ghost-button {
    flex: 1 1 110px;
  }

  .group-code-card {
    grid-template-columns: 1fr;
  }

  .group-code-card .ghost-button {
    width: 100%;
  }
}

.trophies-panel {
  width: min(470px, calc(100vw - 28px));
}

.trophy-list {
  display: grid;
  gap: 8px;
  max-height: min(460px, 62vh);
  margin-top: 14px;
  overflow: auto;
}

.trophy-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(74, 78, 86, 0.64);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.042);
  padding: 11px;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.trophy-row:not(.is-locked) {
  border-color: rgba(255, 224, 138, 0.32);
  background: rgba(255, 224, 138, 0.055);
}

.trophy-row:not(.is-locked):hover,
.trophy-row:not(.is-locked):focus-visible {
  border-color: rgba(255, 224, 138, 0.42);
  background: rgba(255, 224, 138, 0.075);
  transform: translateY(-1px);
}

.trophy-row.is-weekly:not(.is-locked) {
  border-color: rgba(255, 224, 138, 0.38);
}

.trophy-row.is-locked {
  opacity: 0.56;
}

.profile-badge[data-tooltip]::after,
.trophy-icon[data-tooltip]::after {
  position: absolute;
  z-index: 5;
  max-width: 210px;
  border: 1px solid rgba(244, 244, 245, 0.12);
  border-radius: 7px;
  background: rgba(12, 13, 15, 0.94);
  color: rgba(244, 244, 245, 0.88);
  content: attr(data-tooltip);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1.2;
  opacity: 0;
  padding: 6px 8px;
  pointer-events: none;
  text-align: center;
  transition:
    opacity 130ms ease,
    transform 130ms ease;
  white-space: normal;
}

.profile-badge[data-tooltip]::after {
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, 3px);
  width: max-content;
}

.trophy-icon[data-tooltip]::after {
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, 3px);
  width: max-content;
}

.profile-badge[data-tooltip]:hover::after,
.profile-badge[data-tooltip]:focus-visible::after,
.trophy-icon[data-tooltip]:hover::after,
.trophy-icon[data-tooltip]:focus-visible::after {
  opacity: 1;
}

.profile-badge[data-tooltip]:hover::after,
.profile-badge[data-tooltip]:focus-visible::after,
.trophy-icon[data-tooltip]:hover::after,
.trophy-icon[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.trophy-icon {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(244, 244, 245, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 1rem;
}

.trophy-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.trophy-copy strong {
  font-size: 0.98rem;
  font-weight: 900;
}

.trophy-copy small,
.trophy-copy span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
}

.trophy-copy span {
  color: rgba(244, 244, 245, 0.72);
  font-weight: 850;
}

.archive-panel {
  width: min(540px, calc(100vw - 28px));
}

.archive-list {
  display: grid;
  gap: 12px;
  max-height: min(440px, 62vh);
  margin-top: 15px;
  overflow: auto;
}

.archive-entry {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(74, 78, 86, 0.62);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.038);
  color: var(--ink);
  padding: 11px 13px;
  text-align: left;
}

.archive-entry:hover {
  border-color: rgba(244, 244, 245, 0.18);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.archive-entry strong {
  font-size: 0.98rem;
}

.archive-entry span,
.archive-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.archive-empty {
  margin: 8px 0 0;
  border: 1px dashed rgba(91, 96, 107, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
  padding: 22px 14px;
  text-align: center;
}

.archive-month {
  display: grid;
  gap: 12px;
}

.archive-month h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

.archive-weekdays,
.archive-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.archive-weekdays span {
  color: rgba(164, 167, 173, 0.74);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.archive-day {
  display: grid;
  position: relative;
  min-height: 52px;
  align-content: center;
  gap: 2px;
  border: 1.5px solid rgba(74, 78, 86, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink);
  padding: 6px 4px;
  text-align: center;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.archive-day:not(:disabled):hover {
  border-color: rgba(30, 215, 96, 0.34);
  background: rgba(30, 215, 96, 0.06);
  transform: translateY(-1px);
}

.archive-day.is-empty {
  border-color: transparent;
  background: transparent;
}

.archive-day.is-available {
  border-color: rgba(244, 244, 245, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.archive-day.is-played {
  border-color: rgba(30, 215, 96, 0.32);
  background: rgba(30, 215, 96, 0.05);
}

.archive-day.is-unplayed {
  border-color: rgba(244, 244, 245, 0.14);
}

.archive-day.is-today {
  border-color: rgba(255, 224, 138, 0.48);
  background: rgba(255, 224, 138, 0.07);
}

.archive-day strong {
  font-size: 0.94rem;
  line-height: 1;
}

.archive-day small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-day small {
  color: rgba(244, 244, 245, 0.72);
}

.archive-day.is-played small {
  color: rgba(206, 247, 218, 0.82);
}

.archive-day[data-archive-meta]::after {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 7px);
  z-index: 3;
  width: max-content;
  max-width: 180px;
  border: 1px solid rgba(244, 244, 245, 0.12);
  border-radius: 7px;
  background: rgba(12, 13, 15, 0.94);
  color: rgba(244, 244, 245, 0.84);
  content: attr(data-archive-meta);
  font-size: 0.68rem;
  font-weight: 820;
  line-height: 1.2;
  opacity: 0;
  padding: 6px 8px;
  pointer-events: none;
  transform: translate(50%, 3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.archive-day[data-archive-meta]:not(:disabled):hover::after,
.archive-day[data-archive-meta]:focus-visible::after {
  opacity: 1;
  transform: translate(50%, 0);
}

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

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(5px);
  }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes menu-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

@keyframes lift {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
}

@keyframes answer-pulse {
  0% {
    transform: scale(1);
  }
  38% {
    transform: scale(1.018);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loading-soft-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes detail-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-3px);
  }
}

@keyframes live-toast-in {
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes live-toast-out {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

@keyframes dot-pop {
  from {
    transform: scale(0.68);
  }
  to {
    transform: scale(1);
  }
}

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.6);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(1);
  }
}

@keyframes landing-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes button-sheen {
  0%,
  55% {
    opacity: 0;
    transform: translateX(-100%);
  }
  68% {
    opacity: 0.6;
  }
  82%,
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes button-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes correct-pop {
  0% {
    transform: scale(0.98);
  }
  45% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes wrong-pop {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-3px);
  }
  70% {
    transform: translateX(2px);
  }
}

@keyframes toast-pop {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  18%,
  72% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

@keyframes streak-old-number {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(0.92);
    filter: blur(2px);
  }
}

@keyframes streak-new-number {
  0%,
  42% {
    color: transparent;
    transform: translateY(10px) scale(0.94);
  }
  70% {
    color: #ffe08a;
    transform: translateY(-1px) scale(1.07);
  }
  100% {
    color: var(--ink);
    transform: translateY(0) scale(1);
  }
}

@keyframes streak-flame-left {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.5) rotate(-12deg);
  }
  28%,
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(14px, -22px) scale(1.1) rotate(12deg);
  }
}

@keyframes streak-flame-right {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.5) rotate(12deg);
  }
  28%,
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-14px, -22px) scale(1.1) rotate(-12deg);
  }
}

@keyframes trophy-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .game-shell {
    padding: 0;
  }

  .stage {
    min-height: calc(100vh - 92px);
    min-height: calc(100svh - 92px);
    padding: 6px 0 calc(16px + env(safe-area-inset-bottom));
  }

  .wordle-topbar {
    padding: 0 8px;
  }

  .brand-logo {
    padding: 4px 6px;
  }

  .left-icons {
    gap: 4px;
  }

  .user-pill {
    max-width: 86px;
    padding: 0 8px;
  }

  .quiz-meta {
    margin: 6px 12px 4px;
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .start-panel,
  .summary,
  .empty-state {
    width: min(100%, calc(100vw - 22px));
    min-height: calc(100svh - 108px);
    padding: 22px 14px calc(28px + env(safe-area-inset-bottom));
  }

  .summary {
    align-content: start;
    width: 100%;
    max-width: 430px;
    padding: 18px 20px calc(28px + env(safe-area-inset-bottom));
  }

  .summary h2 {
    margin-bottom: 7px;
    font-size: clamp(1.7rem, 9vw, 2.25rem);
  }

  .summary .kicker {
    margin-bottom: 7px;
    font-size: 0.72rem;
  }

  .summary-copy,
  .summary-countdown {
    font-size: 0.94rem;
  }

  .perfect-note {
    margin-bottom: 6px;
    font-size: 0.86rem;
  }

  .volume-popover:hover,
  .volume-popover:focus-within {
    background: #24262b;
  }

  .volume-flyout {
    width: 150px;
    right: -4px;
  }

  .info-flyout {
    right: 0;
    width: min(220px, calc(100vw - 28px));
  }

  .modal-backdrop {
    align-items: center;
    padding: 14px 12px calc(18px + env(safe-area-inset-bottom));
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .modal-panel {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100svh - 32px - env(safe-area-inset-bottom));
    overflow: auto;
    padding: 20px;
  }

  .leaderboard-panel,
  .archive-panel,
  .profile-panel,
  .trophies-panel {
    padding: 20px;
  }

  .leaderboard-panel {
    max-height: calc(100svh - 32px - env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .trophy-list {
    max-height: min(540px, 58svh);
  }

  .archive-day {
    min-height: 52px;
    border-radius: 8px;
  }

  .profile-stats {
    gap: 8px;
  }

  .profile-stats article {
    min-height: 70px;
    padding: 11px;
  }

  .track-card {
    width: 100%;
    max-width: 430px;
    min-height: calc(100svh - 96px);
    align-content: start;
    padding: 6px 18px calc(16px + env(safe-area-inset-bottom));
  }

  .progress-line {
    margin-bottom: 5px;
    transform: translateY(-3px);
  }

  .scoreboard {
    justify-self: center;
    width: 100%;
    max-width: 342px;
    gap: 5px;
    margin: -2px 0 11px;
    transform: translateY(-3px);
  }

  .scoreboard span {
    min-height: 38px;
    padding: 5px 5px;
  }

  .scoreboard strong {
    font-size: 0.98rem;
  }

  .scoreboard small {
    font-size: 0.62rem;
  }

  .cover-wrap {
    width: min(187px, 49vw);
    margin-bottom: 6px;
  }

  .cover-wrap::before {
    inset: -8px;
    filter: blur(12px) saturate(1.06);
  }

  .answer-dots {
    gap: 20px;
  }

  .audio-controls {
    min-height: 34px;
    margin-bottom: 5px;
  }

  .replay-button,
  .pause-button {
    width: 34px;
    height: 34px;
  }

  .dot {
    width: 34px;
    height: 34px;
  }

  .found-status {
    margin-bottom: 7px;
  }

  .guess-field,
  .audio-controls {
    justify-self: center;
    width: 100%;
    max-width: 350px;
  }

  .guess-field input {
    font-size: 1rem;
  }

  .reveal-button,
  #nextTrack {
    justify-self: center;
    width: 100%;
    max-width: 342px;
    min-height: 40px;
    margin-bottom: env(safe-area-inset-bottom);
  }

  .summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: center;
    width: 100%;
    max-width: 350px;
    gap: 7px;
    margin: 12px auto 12px;
  }

  .summary-trophy {
    justify-self: center;
    width: 100%;
    max-width: 350px;
  }

  .summary-stats article:first-child {
    grid-column: 1 / -1;
  }

  .summary-actions {
    grid-template-columns: 1fr;
    justify-self: center;
    width: 100%;
    max-width: 350px;
    gap: 9px;
    margin-bottom: 14px;
  }

  .summary-list {
    justify-self: center;
    width: 100%;
    max-width: 350px;
    max-height: none;
    gap: 7px;
    margin-top: 14px;
    margin-bottom: calc(24px + env(safe-area-inset-bottom));
    margin-left: auto;
    margin-right: auto;
  }

  .summary-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .summary-row-score {
    justify-items: start;
    font-size: 0.94rem;
  }

  .guess-suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: calc(100% + 7px);
  }

  .leaderboard-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .leaderboard-row small {
    grid-column: 2 / -1;
  }

  .leaderboard-main {
    grid-template-columns: 34px 30px minmax(0, 1fr) auto 28px;
    gap: 8px;
    min-height: 54px;
    padding: 10px 11px;
  }

  .leaderboard-list {
    height: min(560px, calc(100svh - 184px - env(safe-area-inset-bottom)));
    min-height: min(420px, calc(100svh - 220px - env(safe-area-inset-bottom)));
    max-height: none;
  }

  .archive-list {
    max-height: min(520px, 58svh);
  }

  .leaderboard-answer-row,
  .weekly-game-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-answer-toggle {
    grid-template-columns: minmax(0, 1fr) auto 22px;
    gap: 7px;
    min-height: 38px;
    padding: 8px;
  }

  .leaderboard-answer-copy {
    gap: 4px;
  }

  .leaderboard-answer-row.is-open .leaderboard-answer-detail {
    padding: 7px 9px 8px;
  }
}

@media (max-width: 390px) {
  .brand-logo {
    gap: 7px;
  }

  h1 {
    font-size: 1.24rem;
  }

  .top-icons {
    gap: 4px;
  }

  .icon-control {
    width: 31px;
    height: 31px;
  }

  .user-pill {
    max-width: 66px;
    font-size: 0.72rem;
  }

  #trackTitle {
    font-size: 1.55rem;
  }

  #trackArtist {
    font-size: 1.28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-delay: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.guess-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(460px, 88vw);
  margin: 10px 0 18px;
}

.guess-button {
  min-height: 50px;
  border: 1px solid #34373d;
  border-radius: 10px;
  background: #23262b;
  color: var(--ink);
  padding: 11px 13px;
  font-weight: 800;
  animation: button-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 34ms);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    transform 130ms ease,
    border-color 130ms ease,
    background 130ms ease,
    box-shadow 130ms ease;
}

.guess-button:hover:not(:disabled) {
  border-color: rgba(244, 244, 245, 0.18);
  background: #2d3138;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.guess-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.guess-button:focus-visible {
  border-color: rgba(244, 244, 245, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(244, 244, 245, 0.08);
}

.guess-button:disabled {
  cursor: default;
  opacity: 1;
}

.guess-button.is-correct {
  border-color: rgba(30, 215, 96, 0.45);
  background: rgba(30, 215, 96, 0.18);
  color: #dfffe9;
  animation: correct-pop 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 0 22px rgba(30, 215, 96, 0.14);
}

.guess-button.is-wrong {
  border-color: rgba(217, 75, 75, 0.4);
  background: rgba(217, 75, 75, 0.16);
  color: #ffe2e2;
  animation: wrong-pop 260ms ease both;
  box-shadow: 0 0 20px rgba(217, 75, 75, 0.12);
}

.guess-buttons.wrong {
  animation: shake 320ms ease;
}

.guess-buttons.right {
  animation: pulse-green 320ms ease;
}

@media (min-width: 701px) and (max-height: 780px) {
  .track-card {
    min-height: calc(100vh - 100px);
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .progress-line {
    margin-bottom: 7px;
    font-size: 0.86rem;
    transform: translateY(-14px);
  }

  .scoreboard {
    gap: 9px;
    width: min(426px, 88vw);
    margin-bottom: 18px;
    transform: translateY(-14px);
  }

  .scoreboard span {
    min-height: 48px;
    padding: 7px 10px;
  }

  .scoreboard strong {
    font-size: 1.02rem;
  }

  .scoreboard small {
    margin-top: 2px;
    font-size: 0.62rem;
  }

  .cover-wrap {
    width: clamp(178px, 26vh, 212px);
    margin-bottom: 9px;
  }

  .cover-wrap::before {
    inset: -10px;
    filter: blur(13px) saturate(1.06);
    opacity: 0.46;
  }

  .audio-controls {
    min-height: 38px;
    margin-bottom: 9px;
  }

  .replay-button,
  .pause-button {
    width: 38px;
    height: 38px;
  }

  .replay-button {
    font-size: 1.78rem;
  }

  .track-copy {
    margin-bottom: 12px;
  }

  #trackTitle {
    margin-bottom: 3px;
    font-size: clamp(1.45rem, 2.7vw, 1.85rem);
  }

  #trackArtist {
    font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  }

  .answer-dots {
    gap: 24px;
    min-height: 32px;
    margin-bottom: 3px;
  }

  .dot {
    width: 30px;
    height: 30px;
  }

  .dot.found::after {
    width: 12px;
    height: 7px;
    border-width: 2px;
  }

  .found-status {
    min-height: 20px;
    margin-bottom: 14px;
    font-size: 0.84rem;
  }

  .guess-buttons {
    gap: 9px;
    width: min(426px, 88vw);
    margin: 10px 0;
  }

  .guess-button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .reveal-button,
  #nextTrack {
    min-height: 36px;
    margin-top: 8px;
  }
}

.score-toast {
  position: relative;
  top: -6px;
  min-height: 24px;
  margin: -12px 0 0;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  pointer-events: none;
}

.score-toast:empty {
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

.score-toast.is-visible {
  animation: toast-pop 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.score-toast.is-right {
  background: rgba(30, 215, 96, 0.14);
  color: #dfffe9;
  box-shadow: 0 0 18px rgba(30, 215, 96, 0.14);
}

.score-toast.is-wrong {
  background: rgba(217, 75, 75, 0.14);
  color: #ffe2e2;
  box-shadow: 0 0 18px rgba(217, 75, 75, 0.12);
}

.score-toast.is-reveal {
  background: rgba(225, 131, 59, 0.14);
  color: #ffe2c8;
  box-shadow: 0 0 18px rgba(225, 131, 59, 0.12);
}

@media (max-width: 700px) {
  .track-copy {
    margin-bottom: 9px;
  }

  #trackTitle {
    font-size: 1.28rem;
  }

  #trackArtist {
    font-size: 1.02rem;
  }

  .answer-dots {
    gap: 14px;
    min-height: 32px;
    margin-bottom: 4px;
  }

  .dot {
    width: 30px;
    height: 30px;
  }

  .found-status {
    margin-bottom: 8px;
  }

  .guess-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: center;
    gap: 6px;
    width: 100%;
    max-width: 342px;
    margin: 7px 0 10px;
  }

  .guess-button {
    min-height: 40px;
    border-radius: 9px;
    padding: 7px 6px;
    font-size: 0.86rem;
  }
}

@media (max-width: 700px) and (max-height: 860px) {
  .stage {
    min-height: calc(100svh - 92px);
    padding-top: 4px;
  }

  .quiz-meta {
    margin-top: 5px;
    margin-bottom: 3px;
    font-size: 0.72rem;
  }

  .track-card {
    min-height: calc(100svh - 96px);
    padding-top: 4px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .progress-line {
    margin-bottom: 5px;
    font-size: 0.8rem;
  }

  .scoreboard {
    max-width: 330px;
    gap: 5px;
    margin-bottom: 10px;
  }

  .scoreboard span {
    min-height: 36px;
    padding: 5px 4px;
  }

  .scoreboard strong {
    font-size: 0.9rem;
  }

  .scoreboard small {
    margin-top: 1px;
    font-size: 0.56rem;
  }

  .cover-wrap {
    width: min(172px, 45vw);
    margin-bottom: 5px;
  }

  .cover-wrap::before {
    inset: -8px;
    filter: blur(12px) saturate(1.05);
    opacity: 0.42;
  }

  .audio-controls {
    min-height: 32px;
    margin-bottom: 4px;
  }

  .replay-button,
  .pause-button {
    width: 34px;
    height: 34px;
  }

  .track-copy {
    margin-bottom: 6px;
  }

  #trackTitle {
    margin-bottom: 2px;
    font-size: 1.08rem;
  }

  #trackArtist {
    font-size: 0.9rem;
  }

  .answer-dots {
    gap: 10px;
    min-height: 26px;
    margin-bottom: 2px;
  }

  .dot {
    width: 25px;
    height: 25px;
  }

  .dot.found::after {
    width: 10px;
    height: 6px;
    border-width: 2px;
  }

  .found-status {
    min-height: 18px;
    margin-bottom: 4px;
    font-size: 0.78rem;
  }

  .score-toast {
    min-height: 18px;
    margin-top: -8px;
    padding: 3px 8px;
    font-size: 0.74rem;
  }

  .guess-buttons {
    max-width: 330px;
    gap: 6px;
    margin: 6px 0 9px;
  }

  .guess-button {
    min-height: 38px;
    border-radius: 8px;
    padding: 6px 5px;
    font-size: 0.82rem;
  }

  .reveal-button,
  #nextTrack {
    max-width: 330px;
    min-height: 38px;
  }
}

@media (max-width: 700px) and (max-height: 760px) {
  .cover-wrap {
    width: min(148px, 41vw);
  }

  .scoreboard span {
    min-height: 34px;
  }

  .guess-button {
    min-height: 36px;
  }
}

.info-rules {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.info-rules p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.landing-logo {
  margin-bottom: 16px;
  animation: landing-float 5s ease-in-out infinite;
}

.landing-logo-image {
  width: 260px;
  max-width: 74vw;
  object-fit: contain;
  filter:
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 22px rgba(30, 215, 96, 0.16));
}

.landing-subtitle {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

.landing-auth-copy {
  width: min(340px, 82vw);
  margin: -4px auto 18px;
  color: rgba(164, 167, 173, 0.86);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.45;
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  width: fit-content;
  margin: 0 auto 26px;
}

.landing-stat {
  min-width: 110px;
  border: 1px solid #2d3138;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.18);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.landing-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 244, 245, 0.18);
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 36px rgba(0, 0, 0, 0.24);
}

.landing-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 850;
}

.landing-stat span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-button {
  position: relative;
  overflow: hidden;
  width: min(320px, 82vw);
  margin-bottom: 0;
}

.landing-winner {
  margin: 12px 0 0;
  color: rgba(244, 244, 245, 0.62);
  font-size: 0.82rem;
  font-weight: 780;
}

.landing-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.5) 48%, transparent 58% 100%);
  opacity: 0;
  transform: translateX(-100%);
  animation: button-sheen 5.5s ease-in-out 1.4s infinite;
  pointer-events: none;
}

.landing-footer {
  margin-top: 20px;
  display: grid;
  gap: 5px;
  justify-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.landing-footer p {
  margin: 0;
  display: block;
}

.landing-credit {
  margin-top: 8px;
  opacity: 0.65;
}

.header-logo-image {
  height: 36px;
  max-width: 190px;
  object-fit: contain;
}

body.is-start-screen .wordle-topbar,
body.is-start-screen .quiz-meta,
body.is-booting .wordle-topbar,
body.is-booting .quiz-meta,
body.is-booting .landing-menu-popover {
  display: none;
}

body.is-start-screen .landing-menu-popover {
  display: block;
}

body.is-start-screen .game-shell {
  grid-template-rows: 1fr;
}

body.is-start-screen .stage,
body.is-booting .stage {
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  background:
    linear-gradient(180deg, #151719 0%, #111216 52%, #0f1012 100%);
}

body.is-booting .game-shell {
  grid-template-rows: 1fr;
}

body.is-start-screen .start-panel {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
  align-content: center;
  padding: 22px 18px calc(34px + env(safe-area-inset-bottom));
}
