*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.game-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1rem 2.25rem;
  user-select: none;
}

.game-container input {
  user-select: text;
}

.game-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.game-header h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mute-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

.back-button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 50px;
  text-decoration: none;
}

.screen-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
}

.game-intro,
.best-line,
.hint,
.stat-line,
.rival-line {
  margin: 0;
}

.game-intro {
  margin-bottom: 1rem;
}

.best-line {
  margin-top: 0.7rem;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.setup-grid,
.results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.option-label {
  margin: 0.9rem 0 0.4rem;
}

.options-column .option-label:first-child {
  margin-top: 0;
}

.name-label {
  display: block;
  margin: 0.7rem 0 0.3rem;
}

#player-name {
  width: 100%;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #0f172a;
  font-size: 1.05rem;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.inst-btn,
.song-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 4.5rem;
  border-radius: 16px;
  padding: 0.4rem 0.3rem;
  line-height: 1.15;
}

.inst-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 1.65rem;
  line-height: 1.15;
}

.song-name {
  font-size: 0.92rem;
}

.song-meta {
  font-size: 0.78rem;
  opacity: 0.85;
}

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

button.color-dot {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid #1d4ed8;
  box-shadow: 0 3px 0 #1e3a8a;
  flex: 0 0 auto;
}

button.color-dot.selected {
  outline: 3px solid #dbeafe;
  outline-offset: 3px;
}

.color-pick {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

input[type="color"] {
  width: 52px;
  height: 44px;
  padding: 0;
  border: 3px solid #1d4ed8;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

#start-button,
.results-actions button,
.leave-button {
  border-radius: 999px;
  cursor: pointer;
}

#start-button {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  min-height: 3.5rem;
  font-size: 1.25rem;
}

.practice-room,
.stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 3px solid #1d4ed8;
  background:
    radial-gradient(circle at 18% 0%, rgba(96, 165, 250, 0.4), transparent 42%),
    radial-gradient(circle at 90% 8%, rgba(250, 204, 21, 0.22), transparent 36%),
    linear-gradient(180deg, #1e1b4b 0%, #172554 58%, #0f172a 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.practice-room {
  height: 300px;
}

.stage-play {
  height: 268px;
}

.stage.mini {
  height: 230px;
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), #0b1224 70%);
  z-index: 1;
}

.curtain {
  position: absolute;
  top: 0;
  width: 13%;
  height: 72%;
  z-index: 3;
  background:
    repeating-linear-gradient(
      90deg,
      #1e3a8a 0 10px,
      #2563eb 10px 18px
    );
  box-shadow: inset 0 -18px 20px rgba(0, 0, 0, 0.25);
}

.curtain.left {
  left: 0;
  border-bottom-right-radius: 40px;
}

.curtain.right {
  right: 0;
  border-bottom-left-radius: 40px;
}

.spot {
  position: absolute;
  top: -10px;
  width: 90px;
  height: 160px;
  z-index: 2;
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.38), transparent 72%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  animation: sway 3.2s ease-in-out infinite;
  pointer-events: none;
}

.spot-left {
  left: 18%;
}

.spot-right {
  right: 16%;
  animation-delay: -1.4s;
}

.amp {
  position: absolute;
  bottom: 34px;
  width: 42px;
  height: 64px;
  border-radius: 8px;
  background: #0f172a;
  border: 3px solid #60a5fa;
  z-index: 2;
}

.amp::before,
.amp::after {
  content: "";
  position: absolute;
  left: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #93c5fd;
}

.amp::before {
  top: 6px;
}

.amp::after {
  bottom: 6px;
}

.practice-room .amp {
  left: 12px;
}

.stage .amp-left {
  left: 15%;
  bottom: 42px;
}

.stage .amp-right {
  right: 15%;
  bottom: 42px;
}

.float-note {
  position: absolute;
  z-index: 2;
  color: #dbeafe;
  font-size: 1.6rem;
  animation: note-float 2.8s ease-in-out infinite;
  pointer-events: none;
}

.float-note.n1 {
  top: 18px;
  right: 22px;
}

.float-note.n2 {
  top: 54px;
  right: 58px;
  font-size: 1.2rem;
  animation-delay: -1s;
}

.nameplate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 6;
  margin: 0;
  text-align: center;
}

.player-slot {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 168px;
  height: 214px;
  margin-left: -84px;
  z-index: 4;
}

.practice-room .player-slot {
  bottom: 34px;
  transform: scale(0.92);
  transform-origin: 50% 100%;
}

.stage-play .player-slot {
  bottom: 44px;
  transform: scale(0.9);
  transform-origin: 50% 100%;
}

.stage.mini .player-slot {
  bottom: 28px;
  transform: scale(0.74);
  transform-origin: 50% 100%;
}

.player {
  position: absolute;
  inset: 0;
  transform-origin: 50% 78%;
}

.player.idle,
.player.celebrate {
  animation: bob 0.7s ease-in-out infinite;
}

.player.celebrate {
  animation-duration: 0.42s;
}

.hair,
.head,
.torso,
.arm,
.leg,
.g-body,
.g-neck,
.keys,
.kick,
.snare,
.hat,
.crash {
  position: absolute;
}

.hair {
  top: 18px;
  left: 50%;
  width: 66px;
  height: 34px;
  margin-left: -33px;
  background: var(--hair, #4c1d95);
  border-radius: 30px 30px 14px 14px;
  z-index: 5;
}

.head {
  top: 32px;
  left: 50%;
  width: 56px;
  height: 52px;
  margin-left: -28px;
  background: var(--skin, #f6c7a1);
  border-radius: 50%;
  z-index: 6;
  box-shadow: inset -4px -3px 0 rgba(0, 0, 0, 0.08);
}

.eye,
.blush,
.smile {
  position: absolute;
}

.eye {
  width: 7px;
  height: 9px;
  top: 18px;
  background: #2b1b2e;
  border-radius: 50%;
  animation: blink 4.2s infinite;
}

.eye::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
}

.eye.left {
  left: 14px;
}

.eye.right {
  right: 14px;
}

.blush {
  width: 9px;
  height: 6px;
  top: 30px;
  border-radius: 50%;
  background: #ff8fab;
  opacity: 0.8;
}

.blush.left {
  left: 6px;
}

.blush.right {
  right: 6px;
}

.smile {
  left: 50%;
  bottom: 8px;
  width: 16px;
  height: 8px;
  margin-left: -8px;
  border-bottom: 3px solid #6b3a32;
  border-radius: 0 0 10px 10px;
}

.torso {
  top: 80px;
  left: 50%;
  width: 52px;
  height: 54px;
  margin-left: -26px;
  background: #1d4ed8;
  border-radius: 16px 16px 12px 12px;
  z-index: 3;
}

.torso::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 10px;
  border-radius: 6px;
  background: var(--inst, #f43f5e);
}

.arm {
  top: 84px;
  width: 14px;
  height: 48px;
  border-radius: 8px;
  background: var(--skin, #f6c7a1);
  transform-origin: 50% 8px;
  transition: transform 0.08s ease-out;
  z-index: 7;
}

.arm::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: -4px;
  width: 16px;
  height: 14px;
  border-radius: 50%;
  background: var(--skin, #f6c7a1);
}

.arm.left {
  left: 34px;
  transform: rotate(16deg);
}

.arm.right {
  right: 34px;
  transform: rotate(-16deg);
}

.leg {
  top: 128px;
  width: 16px;
  height: 52px;
  border-radius: 8px;
  background: #1e3a8a;
  z-index: 2;
  transform-origin: top center;
  transition: transform 0.08s ease-out;
}

.leg.left {
  left: 62px;
}

.leg.right {
  right: 62px;
}

.leg::after {
  content: "";
  position: absolute;
  left: -5px;
  bottom: 0;
  width: 26px;
  height: 10px;
  border-radius: 5px 8px 4px 4px;
  background: var(--inst, #f43f5e);
}

.g-body,
.g-neck,
.keys,
.kick,
.snare,
.hat,
.crash {
  display: none;
}

.g-body {
  left: 86px;
  top: 102px;
  width: 58px;
  height: 74px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.45), transparent 36%), var(--inst, #f43f5e);
  border-radius: 30px;
  border: 3px solid rgba(0, 0, 0, 0.28);
  z-index: 4;
  transform-origin: 20% 40%;
  transition: transform 0.08s ease-out;
}

.g-body::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 26px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.g-neck {
  left: 112px;
  top: 16px;
  width: 12px;
  height: 102px;
  background: #92400e;
  border-radius: 5px;
  z-index: 3;
  transform: rotate(16deg);
  transform-origin: 50% 100%;
}

.g-neck::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -8px;
  width: 28px;
  height: 18px;
  border-radius: 6px 6px 3px 3px;
  background: var(--inst, #f43f5e);
}

.g-neck::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 8px;
  width: 2px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 4px 0 0 rgba(255, 255, 255, 0.75);
}

.inst-guitar .g-body,
.inst-guitar .g-neck {
  display: block;
}

.inst-guitar .hair {
  height: 46px;
  top: 10px;
  border-radius: 34px 34px 16px 16px;
}

.inst-guitar .hair::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 22px;
  width: 16px;
  height: 40px;
  border-radius: 10px;
  background: var(--hair, #4c1d95);
}

.inst-guitar .arm.left {
  transform: rotate(42deg);
}

.inst-guitar .arm.right {
  transform: rotate(-62deg);
}

.inst-guitar.pose-0 .arm.left,
.inst-guitar.pose-2 .arm.left {
  transform: rotate(18deg);
}

.inst-guitar.pose-1 .arm.left,
.inst-guitar.pose-3 .arm.left {
  transform: rotate(68deg);
}

.inst-guitar.pose-1 .g-body,
.inst-guitar.pose-3 .g-body {
  transform: rotate(-10deg);
}

.inst-guitar.pose-3 .arm.right {
  transform: rotate(-80deg);
}

.keys {
  left: 22px;
  top: 136px;
  width: 124px;
  height: 40px;
  background: #f8fafc;
  border-radius: 7px;
  border: 3px solid #1e3a8a;
  z-index: 8;
  box-shadow: 0 6px 0 #172554;
  transition: transform 0.08s ease-out;
}

.keys::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 11px;
  height: 18px;
  background: #0f172a;
  box-shadow: 24px 0 0 #0f172a, 62px 0 0 #0f172a, 86px 0 0 #0f172a;
}

.keys::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  border-radius: 0 0 4px 4px;
  background: var(--inst, #38bdf8);
}

.inst-piano .keys {
  display: block;
}

.inst-piano .hair {
  height: 26px;
  top: 20px;
  width: 60px;
  margin-left: -30px;
}

.inst-piano .arm.left {
  transform: rotate(48deg);
}

.inst-piano .arm.right {
  transform: rotate(-48deg);
}

.inst-piano.pose-0 .arm.left {
  transform: rotate(64deg) translateY(4px);
}

.inst-piano.pose-1 .arm.right {
  transform: rotate(-64deg) translateY(4px);
}

.inst-piano.pose-2 .arm.left,
.inst-piano.pose-2 .arm.right {
  transform: rotate(8deg) translateY(2px);
}

.inst-piano.pose-3 .arm.left {
  transform: rotate(72deg);
}

.inst-piano.pose-3 .arm.right {
  transform: rotate(-72deg);
}

.inst-piano.pose-0 .keys,
.inst-piano.pose-1 .keys,
.inst-piano.pose-3 .keys {
  transform: translateY(3px);
}

.kick,
.snare,
.hat,
.crash {
  transition: transform 0.08s ease-out;
}

.kick {
  left: 50px;
  top: 128px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #0f172a;
  background:
    radial-gradient(circle at 50% 50%, #0f172a 0 8px, transparent 9px),
    radial-gradient(circle at 40% 35%, #fff, var(--inst, #facc15) 42%, #1e3a8a 46%, var(--inst, #facc15));
  z-index: 3;
}

.snare {
  left: 8px;
  top: 118px;
  width: 42px;
  height: 26px;
  border-radius: 50%;
  background: #f8fafc;
  border: 4px solid var(--inst, #facc15);
  z-index: 5;
}

.hat {
  right: 18px;
  top: 86px;
  width: 40px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(#fef9c3, #fbbf24);
  box-shadow: 0 4px 0 #d97706;
  z-index: 5;
}

.hat::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 8px;
  width: 4px;
  height: 64px;
  border-radius: 2px;
  background: #93c5fd;
  z-index: -1;
}

.crash {
  right: 2px;
  top: 48px;
  width: 48px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(#fff7c2, #f59e0b);
  border: 2px solid #92400e;
  z-index: 4;
  transform-origin: 80% 50%;
}

.crash::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 10px;
  width: 4px;
  height: 78px;
  background: #93c5fd;
  z-index: -1;
}

.inst-drums .kick,
.inst-drums .snare,
.inst-drums .hat,
.inst-drums .crash {
  display: block;
}

.inst-drums .hair {
  top: 16px;
  height: 22px;
  width: 70px;
  margin-left: -35px;
  border-radius: 8px 8px 12px 12px;
  background: var(--inst, #facc15);
}

.inst-drums .hair::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 8px;
  width: 22px;
  height: 8px;
  border-radius: 8px 0 0 8px;
  background: var(--inst, #facc15);
}

.inst-drums .arm::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 4px;
  height: 34px;
  border-radius: 2px;
  background: #fde68a;
  transform: rotate(18deg);
}

.inst-drums .arm.left {
  transform: rotate(-18deg);
}

.inst-drums .arm.right {
  transform: rotate(18deg);
}

.inst-drums.pose-0 .arm.right {
  transform: rotate(62deg);
}

.inst-drums.pose-0 .kick {
  transform: scale(0.92);
}

.inst-drums.pose-1 .arm.left {
  transform: rotate(-64deg);
}

.inst-drums.pose-1 .snare {
  transform: translateY(4px);
}

.inst-drums.pose-2 .arm.right {
  transform: rotate(-8deg) translateY(-8px);
}

.inst-drums.pose-2 .hat {
  transform: scaleY(0.65);
}

.inst-drums.pose-3 .arm.left {
  transform: rotate(-108deg);
}

.inst-drums.pose-3 .crash {
  transform: rotate(-14deg) scale(1.08);
}

.player.pose-0,
.player.pose-1,
.player.pose-2,
.player.pose-3,
.player.pose-miss {
  animation: none;
}

.player.pose-miss {
  transform: translateY(6px) rotate(7deg);
}

.player.pose-miss .smile {
  border-bottom: none;
  border-top: 3px solid #6b3a32;
  border-radius: 10px 10px 0 0;
  bottom: 10px;
}

.player.pose-2 {
  transform: translateY(-10px);
}

.crowd {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  z-index: 5;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
}

.crowd div {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 1.35rem;
  line-height: 1;
}

.crowd.hyped div {
  animation: cheer 0.35s ease-in-out infinite alternate;
}

body.lex-games-brand .countdown {
  position: absolute;
  top: 8%;
  left: 0;
  right: 0;
  z-index: 7;
  margin: 0;
  text-align: center;
  font-size: clamp(2.4rem, 8vw, 4rem);
  color: #fde047;
  -webkit-text-stroke: 3px #1e3a8a;
  filter: drop-shadow(0 4px 0 #1e3a8a);
  pointer-events: none;
}

body.lex-games-brand .judgment {
  min-height: 1.8rem;
  margin: 0.15rem 0;
  text-align: center;
  font-size: 1.35rem;
  -webkit-text-stroke: 2px #1e3a8a;
}

body.lex-games-brand .judgment.perfect {
  color: #fde047;
}

body.lex-games-brand .judgment.good {
  color: #dbeafe;
}

body.lex-games-brand .judgment.miss {
  color: #fda4af;
}

.judgment.pop {
  animation: pop-word 0.28s ease-out;
}

#screen-stage {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.4rem;
}

.hud p {
  margin: 0;
}

.hud-score {
  justify-self: start;
}

.hud-song {
  text-align: center;
}

.hud-combo {
  justify-self: end;
}

body.lex-games-brand .hud-combo.hot {
  color: #fde047;
}

.song-progress {
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  background: #0f172a;
  border: 2px solid #1d4ed8;
}

#song-progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #38bdf8, #fde047);
}

.highway {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  height: 168px;
}

.lane {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(30, 58, 138, 0.45));
  border: 2px solid rgba(147, 197, 253, 0.35);
}

.lane[data-lane="0"],
.tap-button[data-lane="0"] {
  --lane: #fb7185;
  --lane-ink: #4c0519;
}

.lane[data-lane="1"],
.tap-button[data-lane="1"] {
  --lane: #fde047;
  --lane-ink: #422006;
}

.lane[data-lane="2"],
.tap-button[data-lane="2"] {
  --lane: #4ade80;
  --lane-ink: #052e16;
}

.lane[data-lane="3"],
.tap-button[data-lane="3"] {
  --lane: #60a5fa;
  --lane-ink: #172554;
}

.note {
  position: absolute;
  top: 0;
  left: 50%;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lane);
  color: var(--lane-ink);
  font-size: 1.2rem;
  z-index: 1;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.note.special {
  border-radius: 12px;
}

.hit-pad {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 42px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 3px solid var(--lane);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--lane);
  font-size: 1.15rem;
  box-shadow: 0 0 12px var(--lane);
  touch-action: manipulation;
}

.hit-pad.ok,
body.lex-games-brand button.tap-button.ok {
  box-shadow: 0 0 18px #fff !important;
  transform: scale(1.04);
}

.hit-pad.bad,
body.lex-games-brand button.tap-button.bad {
  box-shadow: inset 0 0 0 3px #fb7185 !important;
}

.highway.pulse .hit-pad {
  animation: pad-pop 0.16s ease-out;
}

.tap-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

body.lex-games-brand button.tap-button:not(.color-dot) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  min-height: 68px;
  border-radius: 16px;
  background: var(--lane) !important;
  color: var(--lane-ink) !important;
  border: 3px solid #0f172a !important;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28), 0 0 12px var(--lane) !important;
  -webkit-text-stroke: 0 !important;
  touch-action: manipulation;
  line-height: 1.05;
  padding: 0.2rem;
}

body.lex-games-brand button.tap-button:not(.color-dot):hover {
  transform: none;
  filter: brightness(1.06);
}

body.lex-games-brand button.tap-button span,
body.lex-games-brand .inst-btn span,
body.lex-games-brand .song-btn span,
body.lex-games-brand .color-pick,
body.lex-games-brand .name-label {
  color: inherit;
  -webkit-text-stroke: 0;
  filter: none;
}

.tap-glyph {
  font-size: 1.35rem;
}

.tap-name {
  font-size: 0.78rem;
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.leave-button {
  min-height: 2.7rem;
  padding: 0.35rem 0.9rem;
}

.results-card {
  text-align: center;
}

.trophy {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 3.2rem;
  line-height: 1;
}

body.lex-games-brand .trophy-name,
body.lex-games-brand .stars,
body.lex-games-brand .best-banner {
  color: #fde047;
  -webkit-text-stroke: 1.5px #1e3a8a;
}

.trophy-name {
  margin: 0.15rem 0;
  font-size: 1.35rem;
}

.stars {
  margin: 0;
  letter-spacing: 0.18em;
  font-size: 1.35rem;
}

.final-score {
  margin: 0.25rem 0 0;
  font-size: clamp(2.2rem, 6vw, 3rem);
}

.best-banner,
.stat-line,
.rival-line {
  margin: 0.35rem 0;
}

.judges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.7rem 0;
}

.judge-card {
  padding: 0.65rem 0.35rem;
  border-radius: 16px;
  background: #1e1e1e;
  border: 3px solid #1d4ed8;
  opacity: 0;
  transform: translateY(10px);
}

.judge-card.show {
  animation: judge-in 0.35s ease-out forwards;
}

.judge-face {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 1.8rem;
  line-height: 1.2;
}

body.lex-games-brand .judge-card h3 {
  margin: 0.1rem 0;
  font-size: 1rem;
  background: none;
  -webkit-text-fill-color: #dbeafe;
  -webkit-text-stroke: 1.5px #1e3a8a;
  filter: none;
  letter-spacing: 0.03em;
}

.judge-role,
.judge-score,
.judge-quote {
  margin: 0.12rem 0;
}

.judge-score {
  font-size: 1.35rem;
}

.judge-quote,
.judge-role {
  font-size: 0.8rem;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.results-actions button {
  min-height: 3.1rem;
  padding: 0.45rem 1rem;
  font-size: 1.05rem;
}

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

.confetti {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

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

@keyframes blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.12);
  }
}

@keyframes cheer {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-5px);
  }
}

@keyframes pop-word {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pad-pop {
  50% {
    transform: scale(1.06);
  }
}

@keyframes judge-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes confetti-fall {
  to {
    transform: translateY(105vh) rotate(420deg);
  }
}

@media (max-width: 700px) {
  .setup-grid,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .practice-room {
    height: 270px;
  }

  .judges {
    grid-template-columns: 1fr;
  }

  .stage-play .amp {
    display: none;
  }
}

@media (max-height: 760px) {
  .stage-play {
    height: 220px;
  }

  .stage-play .player-slot {
    transform: scale(0.72);
  }

  .highway {
    height: 136px;
  }

  body.lex-games-brand button.tap-button:not(.color-dot) {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player.idle,
  .player.celebrate,
  .spot,
  .float-note,
  .crowd.hyped div,
  .eye {
    animation: none;
  }
}
