html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: system-ui, "Segoe UI", sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: none;
}

button, a, input, textarea, select, label,
#pausedHud, #nameGate, #modeMenu, #scoreboard, #noticesPanel,
#scoreboardList, #dock {
  touch-action: manipulation;
}

#stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#game-wrap {
  position: relative;
  width: min(100vw, calc(100vh * 288 / 512));
  height: min(100vh, calc(100vw * 512 / 288));
  aspect-ratio: 288 / 512;
  container-type: size;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

body.full-screen #game-wrap {
  height: min(100vh, calc(100vw * 512 / 288));
  width: min(100vw, calc(min(100vh, calc(100vw * 512 / 288)) * 288 / 512 * 1.1));
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
}

body.full-screen #likeGoalHud {
  top: calc(50vh - 0.328 * min(100vh, 100vw * 512 / 288));
  left: 50%;
  right: auto;
  width: calc(min(100vw, 100vh * 288 / 512) * 0.68);
  transform: translateX(-50%);
}

body.full-screen .likeGoalName {
  font-size: calc(min(100vh, 100vw * 512 / 288) * 0.0185);
}

body.full-screen .likeGoalText {
  font-size: calc(min(100vh, 100vw * 512 / 288) * 0.0215);
}

body.full-screen .likeGoalBar {
  margin-bottom: calc(min(100vh, 100vw * 512 / 288) * 0.0035);
}

#game {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

#tacoLights {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(255, 70, 90, 0.55), transparent 42%),
    radial-gradient(ellipse at 82% 18%, rgba(70, 170, 255, 0.5), transparent 44%),
    radial-gradient(ellipse at 50% 92%, rgba(90, 255, 110, 0.42), transparent 46%),
    radial-gradient(ellipse at 8% 78%, rgba(255, 220, 70, 0.4), transparent 42%),
    radial-gradient(ellipse at 92% 72%, rgba(190, 90, 255, 0.38), transparent 40%);
  mix-blend-mode: screen;
  filter: hue-rotate(0deg);
  transition: opacity 1.1s ease;
}

#tacoLights.on {
  opacity: 0.78;
  animation: tacoHue 8s linear infinite;
}

@keyframes tacoHue {
  to { filter: hue-rotate(360deg); }
}

#ghostHud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.ghostName,
.ghostPing {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

.ghostName[hidden],
.ghostPing[hidden] {
  display: none !important;
}

.ghostName {
  font-weight: 800;
  font-size: 2.05cqh;
  letter-spacing: 0.06em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

.ghostPing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3cqh;
  opacity: 1;
}

.ghostPing i {
  display: block;
  width: 0;
  height: 0;
  border-left: 0.62cqh solid transparent;
  border-right: 0.62cqh solid transparent;
  border-bottom: 1.28cqh solid #ffe14a;
  filter: drop-shadow(0 0.12cqh 0 #000);
  transform-origin: 50% 70%;
}

.ghostPing b {
  font-weight: 800;
  font-size: 1.55cqh;
  letter-spacing: 0.05em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000;
}

body.mode-title #ghostHud,
body.game-over #ghostHud {
  display: none;
}

#birdLayer {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% * 34 / 288);
  height: calc(100% * 24 / 512);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  pointer-events: none;
  z-index: 1;
  transform-origin: center center;
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #fff;
  z-index: 3;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#chickenSizeHud {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 12;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
}

#chickenSizeHud[hidden] {
  display: none;
}

.chickenSizeTitle {
  font-weight: 900;
  font-size: 11px;
  font-size: 2.35cqh;
  letter-spacing: 0.04em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

.chickenSizeTime {
  font-weight: 900;
  font-size: 16px;
  font-size: 3.5cqh;
  line-height: 1;
  color: #fff;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

#chickenSizeHud.small .chickenSizeTitle {
  color: #7ee0ff;
}

#chickenSizeHud.huge .chickenSizeTitle {
  color: #ff8a3d;
}

#chickenSizeHud.god .chickenSizeTitle {
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000,
    0 0 10px #ffd54f;
}

#chickenSizeHud.taco .chickenSizeTitle {
  color: #ffd54f;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000,
    0 0 10px #ff6d00;
}

body.game-paused #tacoLights.on {
  animation-play-state: paused;
}

#playerHud {
  position: absolute;
  top: 1.2%;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  font-size: 2.8cqh;
  letter-spacing: 0.08em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

#worldRecordHud {
  position: absolute;
  top: 5%;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  font-size: 3.1cqh;
  letter-spacing: 0.06em;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

#worldRecordHud span {
  color: #ffe14a;
}

#scoreHud {
  position: absolute;
  top: 8.6%;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 900;
  font-size: 36px;
  font-size: 8.5cqh;
  line-height: 1;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000;
}

#scoreHud.debt {
  color: #ff4a4a;
}

#onlineHud,
.onlineHud {
  position: absolute;
  top: 2.2%;
  left: 3.4%;
  right: auto;
  display: flex;
  align-items: center;
  gap: 0.45cqh;
  z-index: 4;
  pointer-events: none;
  opacity: 0.3;
  animation: none;
}

#onlineHud.in-play,
.onlineHud.in-play {
  opacity: 0.16;
}

#onlineHud[hidden],
.onlineHud[hidden] { display: none; }

#onlineHud svg,
.onlineHud svg {
  width: 2.15cqh;
  height: 2.15cqh;
  overflow: visible;
  fill: #ffe14a;
  stroke: none;
}

#onlineHud b,
.onlineHud b {
  font-weight: 900;
  font-size: 2.25cqh;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: none;
}

#onlineHud b.pop,
.onlineHud b.pop {
  animation: onlinePop 0.28s cubic-bezier(0.12, 1.6, 0.28, 1) both;
}

@keyframes onlinePop {
  0% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

#mapWarn {
  position: absolute;
  top: 20.5%;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 4;
}

#mapWarn[hidden] { display: none; }

#mapWarn .mapWarnTag {
  display: block;
  font-weight: 900;
  font-size: 16px;
  font-size: 3.4cqh;
  letter-spacing: 0.22em;
  color: #ffe14a;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000,
    0 0 12px #ffe14a, 0 0 22px rgba(255, 180, 40, 0.7);
  animation: mapWarnGlow 1.1s ease-in-out infinite;
}

#mapWarn b {
  display: block;
  margin-top: 0.35cqh;
  font-weight: 900;
  font-size: 36px;
  font-size: 7.4cqh;
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000,
    0 0 14px #ffe14a, 0 0 28px rgba(255, 170, 40, 0.65);
}

#mapWarn b.punch {
  animation: mapWarnPunch 0.28s cubic-bezier(0.12, 1.5, 0.28, 1) both;
}

#mapWarn.urgent .mapWarnTag,
#mapWarn.urgent b {
  color: #ff4a3a;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000,
    0 0 16px #ff5a4a, 0 0 32px rgba(255, 60, 40, 0.75);
}

@keyframes mapWarnGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes mapWarnPunch {
  0% { transform: scale(1.45) rotate(-8deg); }
  100% { transform: scale(1) rotate(0deg); }
}

#likeGoalHud {
  position: absolute;
  top: 17.2%;
  left: 16%;
  right: 16%;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

#likeGoalHud[hidden] { display: none; }

body.mode-title #likeGoalHud {
  display: none !important;
}

body.game-over #likeGoalHud {
  display: none !important;
}

.likeGoalBar {
  height: 3px;
  max-width: 38%;
  margin: 0 auto 0.35cqh;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid #000;
  border-radius: 2px;
  overflow: hidden;
}

.likeGoalBar > i {
  display: block;
  height: 100%;
  width: 0;
  background: #ff3b3b;
}

.likeGoalName {
  font-size: 10px;
  font-size: 1.85cqh;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffe14a;
  text-shadow: 0 0 4px #000, 1px 1px 0 #000, -1px -1px 0 #000;
  margin-bottom: 0.15cqh;
}

.likeGoalText {
  font-size: 11px;
  font-size: 2.15cqh;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 0 4px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

#likeHearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  overflow: visible;
}

.likeHeart {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 1;
  color: rgba(255, 90, 130, 0.72);
  font-weight: 500;
  text-shadow: 0 0 8px rgba(255, 70, 120, 0.22);
}

#giftCallouts {
  position: absolute;
  left: 50%;
  top: 23%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45cqh;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

#giftBanners {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  height: 0;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
}

#adminShout {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 34%;
  z-index: 9;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#adminShout[hidden] {
  display: none;
}

.adminShoutFrame {
  width: 100%;
  max-width: 100%;
  text-align: center;
  overflow: visible;
}

#adminShout.in .adminShoutFrame {
  animation: adminShoutIn 0.36s cubic-bezier(0.12, 1.4, 0.28, 1) both;
}

#adminShout.out .adminShoutFrame {
  animation: adminShoutOut 0.28s ease both;
}

.adminShoutTag {
  font-weight: 900;
  font-size: 8px;
  font-size: 1.55cqh;
  letter-spacing: 0.22em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
  margin-bottom: 0.4cqh;
}

.adminShoutText {
  font-weight: 900;
  font-size: 14px;
  font-size: 3.1cqh;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #ffe14a;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@keyframes adminShoutIn {
  0% { opacity: 0; transform: scale(0.72); }
  70% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes adminShoutOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.94); }
}

#chatPickHud {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 32%;
  z-index: 9;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

#chatPickHud[hidden] {
  display: none;
}

#chatPickHud.in .adminShoutFrame {
  animation: adminShoutIn 0.36s cubic-bezier(0.12, 1.4, 0.28, 1) both;
}

#chatPickHud.out .adminShoutFrame {
  animation: adminShoutOut 0.28s ease both;
}

.chatPickChoices {
  display: flex;
  justify-content: center;
  gap: 1.6em;
  margin-top: 0.7cqh;
  font-weight: 900;
  font-size: 13px;
  font-size: 2.7cqh;
  letter-spacing: 0.04em;
  color: #ffe14a;
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
}

.chatPickCount {
  margin-top: 0.45cqh;
  font-weight: 900;
  font-size: 28px;
  font-size: 6.2cqh;
  line-height: 1;
  color: #fff;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000;
}

.giftCallout {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 0.45em;
  max-width: 100%;
  overflow: visible;
  line-height: 1;
  white-space: nowrap;
  animation: giftCalloutIn 0.28s cubic-bezier(0.18, 1.35, 0.28, 1) both;
}

.giftCallout.hold {
  animation: none;
  opacity: 1;
  transform: none;
}

.giftCallout.out {
  animation: giftCalloutOut 0.28s ease both;
}

.giftCallout .who {
  display: block;
  flex: 0 0 auto;
  max-width: none;
  font-size: 11px;
  font-size: 2.15cqh;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  overflow: visible;
  white-space: nowrap;
  text-shadow:
    0 0 5px #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
}

.giftCallout .followIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.4cqh;
  height: 2.4cqh;
  color: #8ec8ff;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}

.giftCallout .followIcon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.giftCallout.follow {
  gap: 0.35em;
}

.giftCallout .what {
  display: block;
  font-size: 18px;
  font-size: 3.6cqh;
  font-weight: 900;
  letter-spacing: 0.02em;
  paint-order: stroke fill;
  -webkit-text-stroke: 1px #000;
  text-shadow:
    0 0 6px #000,
    1px 1px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000;
}

.giftCallout .combo {
  display: block;
  font-size: 13px;
  font-size: 2.6cqh;
  font-weight: 900;
  letter-spacing: 0.04em;
  background-image: linear-gradient(
    90deg,
    #ff3b6b,
    #ff9f1a,
    #ffe14a,
    #5dff7a,
    #3ad7ff,
    #b56bff,
    #ff3b6b
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 0 4px #000)
    drop-shadow(1px 1px 0 #000);
  animation: comboRainbow 0.7s linear infinite;
}

.giftCallout .combo.punch {
  animation: comboRainbow 0.7s linear infinite, comboPunch 0.28s cubic-bezier(0.18, 1.45, 0.28, 1);
}

.giftCallout.warm .combo { font-size: 14px; font-size: 2.8cqh; }
.giftCallout.hot .combo {
  font-size: 15px;
  font-size: 3cqh;
  animation: comboRainbow 0.4s linear infinite;
}
.giftCallout.blaze .combo {
  font-size: 16px;
  font-size: 3.2cqh;
  animation: comboRainbow 0.28s linear infinite;
}
.giftCallout.hot .combo.punch {
  animation: comboRainbow 0.4s linear infinite, comboPunch 0.28s cubic-bezier(0.18, 1.45, 0.28, 1);
}
.giftCallout.blaze .combo.punch {
  animation: comboRainbow 0.28s linear infinite, comboPunch 0.28s cubic-bezier(0.18, 1.45, 0.28, 1);
}

.giftCallout.up .what { color: #b8ff64; }
.giftCallout.down .what { color: #ff8a3a; }
.giftCallout.special .what {
  color: #ffe14a;
  text-shadow:
    0 0 10px #ffe14a,
    0 0 6px #000,
    1px 1px 0 #000,
    -1px -1px 0 #000;
}

@keyframes giftCalloutIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.86); }
  100% { opacity: 1; transform: none; }
}

@keyframes giftCalloutOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-8px) scale(0.92); }
}

@keyframes comboRainbow {
  to { background-position: 240% 0; }
}

@keyframes comboPunch {
  0% { transform: scale(1.55); }
  65% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.giftCallout.hero {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
  width: max-content;
  max-width: none;
  overflow: visible;
  transform: translate(-50%, -50%);
  animation: giftHeroIn 0.42s cubic-bezier(0.18, 1.35, 0.28, 1) both;
}

.giftCallout.hero.hold {
  animation: none;
  opacity: 1;
  transform: translate(-50%, -12%) scale(1);
}

.giftCallout.hero.out {
  animation: giftHeroOut 0.42s ease both;
}

.giftCallout.hero .who {
  max-width: none;
  overflow: visible;
  font-size: 13px;
  font-size: 2.6cqh;
}

.giftCallout.hero .what {
  font-size: 32px;
  font-size: 7.4cqh;
  line-height: 0.95;
  -webkit-text-stroke: 1.3px #000;
  text-shadow:
    0 0 10px #000,
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000;
}

.giftCallout.hero.long .what {
  font-size: 24px;
  font-size: 5.6cqh;
  letter-spacing: 0.01em;
}

.giftCallout.hero .combo {
  font-size: 18px;
  font-size: 4cqh;
}

.giftCallout.hero.warm .combo { font-size: 20px; font-size: 4.6cqh; }
.giftCallout.hero.hot .combo { font-size: 22px; font-size: 5.1cqh; }
.giftCallout.hero.blaze .combo { font-size: 24px; font-size: 5.6cqh; }

@keyframes giftHeroIn {
  0% { opacity: 0; transform: translate(-50%, 22%) scale(0.42); }
  58% { opacity: 1; transform: translate(-50%, -6%) scale(1.12); }
  78% { transform: translate(-50%, -10%) scale(0.97); }
  100% { opacity: 1; transform: translate(-50%, -12%) scale(1); }
}

@keyframes giftHeroOut {
  from { opacity: 1; transform: translate(-50%, -12%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -42%) scale(0.9); }
}

.giftCallout.hero.immortal {
  animation: immortalSlam 0.5s cubic-bezier(0.12, 1.55, 0.28, 1) both;
}

.giftCallout.hero.immortal.out {
  animation: immortalOut 0.32s ease-in both;
}

.giftCallout.hero.immortal .what {
  font-size: 62px;
  font-size: 14cqh;
  color: #ff4a18;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 2.2px #000;
  text-shadow:
    0 0 18px #ff3b00,
    0 0 8px #000,
    3px 3px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000;
}

@keyframes immortalSlam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.6) rotate(-10deg); }
  52% { opacity: 1; transform: translate(-50%, -8%) scale(0.86) rotate(4deg); }
  78% { transform: translate(-50%, -14%) scale(1.08) rotate(-1deg); }
  100% { opacity: 1; transform: translate(-50%, -12%) scale(1) rotate(0deg); }
}

@keyframes immortalOut {
  from { opacity: 1; transform: translate(-50%, -12%) scale(1) rotate(0deg); }
  to { opacity: 0; transform: translate(-50%, -85cqh) scale(0.72) rotate(-10deg); }
}

#centerHud {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  text-align: center;
  font-weight: 900;
  text-shadow: 0 0 6px #000, 2px 2px 0 #000, -1px -1px 0 #000;
  z-index: 4;
}

#centerHud.readyScreen {
  top: 26%;
  bottom: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

#centerHud.readyScreen .credit {
  margin-bottom: 0;
  margin-top: 1.2cqh;
}

#centerHud .title {
  font-size: 26px;
  font-size: 5.6cqh;
  line-height: 1.12;
  margin-bottom: 1.2cqh;
}

#centerHud .credit {
  font-size: 12px;
  font-size: 2.4cqh;
  font-weight: 700;
  color: #ffe14a;
  letter-spacing: 0.04em;
  margin-bottom: 2cqh;
}

#centerHud .ready {
  font-size: 24px;
  font-size: 5.2cqh;
  color: #ffe14a;
}

#centerHud .over {
  font-size: 24px;
  font-size: 5.2cqh;
  color: #ffe14a;
  margin-bottom: 2cqh;
}

#deadHud {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 46%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4cqh;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 0 6px #000, 1px 1px 0 #000;
}

#deadHud[hidden] { display: none; }

#deadHud.timedOut {
  top: 44%;
  bottom: auto;
}

#deadHud.timedOut .countdown,
#deadHud.timedOut .galaxyHint {
  display: none;
}

#deadHud .countdown {
  font-size: 28px;
  font-size: 5.6cqh;
  font-weight: 900;
  color: #fff;
  animation: revivePulse 0.9s ease-in-out infinite;
}

#deadHud .countdown span {
  color: #ffe14a;
}

#deadHud .galaxyHint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1cqh;
}

.deadPromptRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 4cqh 6cqh;
  max-width: 94%;
}

.deadPromptGift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6cqh;
}

.deadPromptGift img,
.deadPromptGift .giftPh {
  width: 20cqh;
  height: 20cqh;
  max-width: 112px;
  max-height: 112px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 0 14px #4cc8ff) drop-shadow(0 0 28px #ff4ad2);
  animation: galaxyPulse 1.1s ease-in-out infinite;
}

.deadPromptRow.one .deadPromptGift img,
.deadPromptRow.one .deadPromptGift .giftPh {
  width: 24cqh;
  height: 24cqh;
  max-width: 128px;
  max-height: 128px;
}

.deadPromptGift span {
  font-weight: 900;
  font-size: 14px;
  font-size: 3cqh;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 10px #4cc8ff, 0 0 18px #ff4ad2, 1px 1px 0 #000;
  animation: hypeFlash 0.7s ease-in-out infinite;
}

.deadPromptGift.reset img,
.deadPromptGift.reset .giftPh {
  filter: drop-shadow(0 0 14px #e07018) drop-shadow(0 0 24px #ff4ad2);
}

#deadHud .hype {
  margin: 0;
  font-weight: 900;
  font-size: 18px;
  font-size: 3.6cqh;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 10px #4cc8ff, 0 0 18px #ff4ad2, 1px 1px 0 #000;
  animation: hypeFlash 0.7s ease-in-out infinite;
}

@keyframes galaxyPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px #4cc8ff) drop-shadow(0 0 18px #ff4ad2); }
  50% { transform: scale(1.12); filter: drop-shadow(0 0 22px #7ae0ff) drop-shadow(0 0 36px #ff7ae8); }
}

@keyframes revivePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes hypeFlash {
  0%, 100% { opacity: 1; color: #fff; }
  50% { opacity: 0.85; color: #ffe14a; }
}

#deadHud #restartBtn {
  pointer-events: auto;
  background: #73c02a;
  color: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 8px 22px;
  font: inherit;
  font-size: 16px;
  font-size: 3.2cqh;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 0 #000;
}

#deadHud #deadMenuBtn {
  display: none;
  pointer-events: auto;
  background: #2a1c22;
  color: #f4e6c3;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 7px 22px;
  font: inherit;
  font-size: 14px;
  font-size: 2.8cqh;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 4px 0 #000;
}

#deadHud.timedOut #deadMenuBtn:not([hidden]) {
  display: inline-block;
}

body.overlay #deadMenuBtn {
  display: none !important;
}

#centerHud .stats {
  display: inline-block;
  background: rgba(238, 228, 184, 0.94);
  color: #3a2a20;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 1.2cqh 2.2cqh;
  min-width: 64%;
  text-shadow: none;
  font-size: 13px;
  font-size: 2.55cqh;
  font-weight: 800;
}

#centerHud .stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.6cqh;
  margin: 0.45cqh 0;
}

#centerHud .stats div span:first-child {
  text-align: left;
}

#centerHud .stats div span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#centerHud .stats div span.debt {
  color: #c42a2a;
}

#centerHud .revive {
  margin-top: 2cqh;
  font-size: 13px;
  font-size: 2.6cqh;
  color: #ffe14a;
}

#centerHud .countdown {
  font-size: 28px;
  font-size: 6cqh;
  color: #fff;
  margin: 1.4cqh 0;
}

#centerHud .countdown span {
  color: #ffe14a;
}

#nameGate {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  text-align: center;
}

#nameGate[hidden],
body.overlay #nameGate {
  display: none;
}

#authForm {
  width: 100%;
  max-width: 240px;
  padding: 10px 12px 12px;
  background: rgba(20, 14, 10, 0.92);
  border: 3px solid #543847;
  border-radius: 10px;
  box-shadow: 0 6px 0 #2a1c22, 0 0 0 2px #000;
}

.authBrand {
  font-weight: 900;
  font-size: 22px;
  font-size: 4.6cqh;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 4px #000, 2px 2px 0 #000;
}

.authCredit {
  margin: 6px 0 10px;
  font-size: 10px;
  font-size: 1.9cqh;
  font-weight: 700;
  color: #ffe14a;
  text-shadow: 0 0 4px #000;
}

.authTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}

.authTabs button {
  background: #2a1c22;
  color: #c8b48a;
  border: 2px solid #543847;
  border-radius: 6px;
  padding: 5px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.authTabs button.on {
  background: #73c02a;
  color: #fff;
  border-color: #000;
}

#nameGate label {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 10px;
  font-size: 1.9cqh;
  letter-spacing: 0.08em;
  color: #f4e6c3;
  text-align: left;
  text-shadow: 0 0 4px #000;
}

#nameGate input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 3px;
  padding: 7px 8px;
  border: 2px solid #543847;
  border-radius: 6px;
  background: #140e0c;
  color: #ffe14a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.06em;
}

#nameGate input:focus {
  outline: none;
  border-color: #ffe14a;
}

#confirmRow[hidden] {
  display: none;
}

#authHint {
  margin: 2px 0 6px;
  font-size: 10px;
  font-size: 1.8cqh;
  font-weight: 700;
  color: #8a7a62;
  text-shadow: none;
}

#nameError {
  margin: 0 0 6px;
  color: #ff6b4a;
  font-size: 11px;
  font-size: 2cqh;
  font-weight: 800;
  text-shadow: 0 0 4px #000;
}

#nameError[hidden] { display: none; }

#nameGate button[type="submit"] {
  width: 100%;
  background: #73c02a;
  color: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.authNoticesBtn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  color: #8a7a62;
  font: inherit;
  font-size: 9px;
  font-size: 1.55cqh;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#noticesPanel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.62);
  pointer-events: auto;
}

#noticesPanel[hidden] {
  display: none;
}

.noticesCard {
  width: min(94%, 300px);
  max-height: 74%;
  overflow: auto;
  text-align: left;
  background: rgba(20, 14, 10, 0.96);
  border: 3px solid #543847;
  border-radius: 10px;
  box-shadow: 0 6px 0 #2a1c22, 0 0 0 2px #000;
  padding: 10px 12px 12px;
}

.noticesHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.noticesHead h2 {
  margin: 0;
  font-size: 12px;
  font-size: 2.1cqh;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: #ffe14a;
  text-transform: uppercase;
  text-shadow: 0 0 4px #000;
}

#noticesClose {
  flex: 0 0 auto;
  background: #2a1c22;
  color: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 2px 7px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.noticesBody h3 {
  margin: 10px 0 3px;
  font-size: 10px;
  font-size: 1.7cqh;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #73c02a;
}

.noticesBody p {
  margin: 0 0 6px;
  font-size: 10px;
  font-size: 1.7cqh;
  font-weight: 700;
  line-height: 1.35;
  color: #f4e6c3;
  text-shadow: none;
}

#logoutBtn {
  margin-top: 12px;
  background: #8a6a3a;
  color: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#pausedHud {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  text-shadow: 0 0 8px #000, 2px 2px 0 #000;
}

#pausedHud .pausedTitle {
  font-weight: 900;
  font-size: 28px;
  font-size: 6cqh;
}

#pausedHud .pausedUser {
  margin: 0.8cqh 0 0;
}

#pausedHud .pausedHint {
  margin: 1.2cqh 0 3cqh;
  font-size: 13px;
  font-size: 2.4cqh;
  font-weight: 700;
  color: #ffe14a;
}

#pausedHud .volumeStack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 2.2cqh;
}

#pausedHud .volumeRow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-size: 2.6cqh;
  font-weight: 800;
  background: rgba(20, 14, 10, 0.85);
  border: 3px solid #000;
  border-radius: 10px;
  padding: 10px 14px;
}

#pausedHud .volumeRow input[type="range"] {
  width: 140px;
  accent-color: #73c02a;
  cursor: pointer;
}

#pausedHud #volumeValue,
#pausedHud #gameSoundsValue {
  min-width: 3.2em;
  color: #ffe14a;
  text-align: right;
}

#pausedHud[hidden] { display: none; }

#fullResetHud {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 80, 40, 0.35), rgba(0, 0, 0, 0.55) 70%);
}

#fullResetHud[hidden] { display: none; }

.fullResetTitle {
  font-weight: 900;
  font-size: 42px;
  font-size: 9.2cqh;
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center;
  text-shadow:
    0 0 18px #ff4ad2,
    0 0 28px #e07018,
    3px 3px 0 #000,
    -3px -3px 0 #000,
    3px -3px 0 #000,
    -3px 3px 0 #000;
  animation: fullResetSlam 0.55s cubic-bezier(0.12, 1.4, 0.3, 1) both;
}

@keyframes fullResetSlam {
  0% { transform: scale(0.15) rotate(-12deg); opacity: 0; }
  55% { transform: scale(1.18) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

#modeMenu {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 10%;
  bottom: 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  text-align: center;
  overflow: auto;
}

#modeMenu[hidden] { display: none; }

.modeMenuBrand {
  font-weight: 900;
  font-size: 26px;
  font-size: 5.4cqh;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px #000, 2px 2px 0 #000, -1px -1px 0 #000;
}

.modeMenuCredit {
  margin: 1cqh 0 0.4cqh;
  font-size: 12px;
  font-size: 2.2cqh;
  font-weight: 700;
  color: #ffe14a;
  text-shadow: 0 0 4px #000, 1px 1px 0 #000;
}

.modeMenuUser,
.pausedUser {
  margin: 0 0 2.2cqh;
  font-size: 12px;
  font-size: 2.3cqh;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f0dcc8;
  text-shadow: 0 0 4px #000, 1px 1px 0 #000;
}

.modeMenuUser b,
.pausedUser b {
  color: #ffe14a;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.modeMenuBtn {
  width: 100%;
  max-width: 230px;
  margin: 0 0 1.2cqh;
  background: #73c02a;
  color: #fff;
  border: 3px solid #000;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 900;
  font-size: 14px;
  font-size: 2.8cqh;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 0 4px 0 #2a1c22;
}

/* Show Single Player again: set this to unset, then rename Play Now! back to Multiplayer and add class "multi". */
.modeMenuBtn.solo {
  display: var(--solo-menu-display, none);
}

.modeMenuBtn.streamer {
  background: #8750f5;
}

.modeMenuBtn.multi {
  background: #2f86ff;
}

.modeMenuBtn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.modeMenuBtn.soon,
.modeMenuBtn:disabled {
  background: #3a3236;
  color: #8a8488;
  border-color: #4a4448;
  box-shadow: none;
  cursor: default;
  text-shadow: none;
}

.modeMenuBtn.soon span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-size: 1.8cqh;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a9498;
}

.modeMenuHint {
  width: 100%;
  max-width: 230px;
  margin: 0 0 1.2cqh;
  color: #f0dcc8;
  font-size: 11px;
  font-size: 2cqh;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 1px 1px 0 #000;
}

.modeMenuBtn.pass {
  display: block;
  box-sizing: border-box;
  background: #25F4EE;
  color: #081018;
  text-decoration: none;
  text-shadow: none;
}

.modeMenuBtn.pass[hidden] {
  display: none;
}

.modeMenuBtn.board {
  background: #e6b422;
  color: #1a1208;
  text-shadow: none;
}

.modeMenuBtn.logout {
  background: #8a6a3a;
  color: #fff;
}

#scoreboard {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 7%;
  bottom: 5%;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  background: rgba(16, 10, 12, 0.92);
  border: 3px solid #000;
  border-radius: 12px;
  padding: 8px 8px 6px;
  box-shadow: 0 6px 0 #2a1c22;
  z-index: 4;
}

#scoreboard[hidden] { display: none; }

.scoreboardHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.scoreboardTitle {
  font-weight: 900;
  font-size: 16px;
  font-size: 3.1cqh;
  letter-spacing: 0.08em;
  color: #ffe14a;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000;
}

#scoreboardClose {
  width: 32px;
  height: 32px;
  border: 3px solid #000;
  border-radius: 8px;
  background: #2a1c22;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.scoreboardTabs {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.scoreboardTabs button {
  flex: 1;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 6px 4px;
  background: #3a3236;
  color: #c8c0c4;
  font: inherit;
  font-weight: 800;
  font-size: 10px;
  font-size: 1.7cqh;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.scoreboardTabs button.on {
  background: #73c02a;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

.scoreboardTabs button[data-board-mode="streamer"].on {
  background: #8750f5;
}

#scoreboardList {
  flex: 1;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scoreboardRow {
  display: grid;
  grid-template-columns: 2.4em 1fr 3.6em;
  gap: 4px;
  align-items: center;
  padding: 0.55cqh 0.45cqh;
  font-weight: 800;
  font-size: 11px;
  font-size: 2.05cqh;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scoreboardRow span:first-child {
  font-variant-numeric: tabular-nums;
  opacity: 0.88;
}

.scoreboardRow span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scoreboardRow span:last-child {
  text-align: right;
  color: #ffe14a;
  font-variant-numeric: tabular-nums;
}

.scoreboardRow.gold { color: #ffe14a; }
.scoreboardRow.gold span:first-child { opacity: 1; }
.scoreboardRow.silver { color: #e8e8e8; }
.scoreboardRow.bronze { color: #e0a070; }
.scoreboardRow.me {
  background: rgba(255, 225, 74, 0.16);
  border-radius: 4px;
}

#scoreboardEmpty {
  margin: 12px 4px 0;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  font-size: 2.2cqh;
  color: #c8c0c4;
  text-shadow: 1px 1px 0 #000;
}

#scoreboardEmpty[hidden] { display: none; }

#menuBtn {
  margin-top: 12px;
  background: #2a1c22;
  color: #f4e6c3;
  border: 3px solid #543847;
  border-radius: 8px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

body:not(.play-streamer) #dock,
body:not(.play-streamer) #giftOverlayLayer,
body:not(.play-streamer) #likeGoalHud,
body:not(.play-streamer) #giftEditor,
body.play-solo #deadHud .countdown,
body.play-solo #deadHud .galaxyHint {
  display: none !important;
}

body.mode-title #worldRecordHud,
body.mode-title #playerHud,
body.mode-title #scoreHud,
body.mode-title #onlineHud,
body.overlay #onlineHud {
  display: none;
}

#dock {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  width: 300px;
  box-sizing: border-box;
  max-height: calc(100vh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(20, 14, 10, 0.92);
  color: #f4e6c3;
  border: 3px solid #543847;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 0 #2a1c22;
  pointer-events: auto;
}

#dock::-webkit-scrollbar {
  width: 8px;
}

#dock::-webkit-scrollbar-track {
  background: #1a1014;
}

#dock::-webkit-scrollbar-thumb {
  background: #8a6a3a;
  border-radius: 4px;
}

#dock.hidden,
body.overlay #dock,
body:not(.overlay):not(.logged-in) #dock {
  display: none;
}

#dock h1 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #f8e14a;
}

.dockToggles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 6px;
  margin-bottom: 6px;
}

.dockToggleCell {
  display: grid;
  gap: 3px;
  align-content: start;
}

.dockToggleCell[hidden],
#pilotMode,
#pilotMode + .dockKeyHint {
  display: none !important;
}

.dockToggleWide {
  grid-column: 1 / -1;
}

#dock .dockToggle {
  margin: 0;
  flex: 1;
  background: #2a1c22;
  color: #c8b48a;
  border: 2px solid #543847;
  border-radius: 8px;
  padding: 8px 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1.2;
}

#dock .dockToggle.on {
  background: #73c02a;
  color: #fff;
  border-color: #000;
}

.dockToggleHint {
  margin: 0 0 10px;
}

#pilotMode,
#immortalMode,
#fullScreenMode {
  margin: 0;
}

#dock label {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}

#dock input {
  width: 100%;
  box-sizing: border-box;
  background: #2a1c22;
  color: #f4e6c3;
  border: 2px solid #543847;
  padding: 6px 8px;
  font: inherit;
}

#dock .row {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

#dock button {
  flex: 1;
  background: #73c02a;
  color: #fff;
  border: 2px solid #543847;
  padding: 6px 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#dock button.ghost {
  background: #8a6a3a;
}

#dock button:disabled {
  opacity: 0.45;
  cursor: default;
}

#status {
  font-size: 11px;
  min-height: 2.4em;
  color: #c8b48a;
}

#status.connected { color: #9ae04a; }
#status.error { color: #e07018; }

#adminUnlock {
  margin-top: 8px;
}

#adminUnlock button {
  width: 100%;
  background: #8a6a3a;
}

#adminError {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #e07018;
}

#adminError[hidden],
#adminUnlock[hidden],
.debug[hidden] {
  display: none;
}

.debug {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 8px;
}

.debugTroll {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(84, 56, 71, 0.6);
}

.debugTroll p {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #f0dcc8;
}

.debugTroll label {
  margin: 0;
  font-size: 10px;
}

.debugTroll select,
.debugTroll input {
  width: 100%;
  margin-top: 2px;
  background: #1a1014;
  color: #f0dcc8;
  border: 2px solid #543847;
  border-radius: 4px;
  padding: 4px;
  font-size: 11px;
}

.debugShoutActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

#trollRefreshBtn {
  background: #8a6a3a;
}

#reloadPlayersBtn {
  background: #8750f5;
  color: #fff;
}

#adminShoutPlayerBtn {
  background: #ffe14a;
  color: #2a1c22;
}

#adminShoutAllBtn {
  background: #ff4ad2;
  color: #fff;
}

.debugChatPick {
  display: grid;
  gap: 4px;
}

#chatPickBtn {
  background: #e07018;
  color: #fff;
}

.debug button {
  background: #4ec0ca;
  font-size: 10px;
  padding: 4px;
}

#worldRecordBtn {
  background: #ffe14a;
  color: #2a1c22;
}

#worldRecordBtn.on {
  background: #f8c42c;
}

.debugRecords {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(84, 56, 71, 0.6);
}

.debugRecords[hidden] {
  display: none;
}

.debugRecords p {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: #f0dcc8;
}

.debugRecordTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.debugRecordTabs button {
  background: #2a1c22;
  color: #c8b48a;
}

.debugRecordTabs button.on {
  background: #ffe14a;
  color: #2a1c22;
}

.debugRecords label {
  margin: 0;
  font-size: 10px;
}

.debugRecords select,
.debugRecords input {
  width: 100%;
  margin-top: 2px;
  background: #1a1014;
  color: #f0dcc8;
  border: 2px solid #543847;
  border-radius: 4px;
  padding: 4px;
  font-size: 11px;
}

.debugRecordActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

#wrSaveBtn {
  background: #4ec0ca;
}

#wrDeleteBtn,
#wipeRecordBtn {
  background: #c44b2b;
}

#wipeRecordBtn {
  grid-column: 1 / -1;
}

#adminLockBtn {
  grid-column: 1 / -1;
  background: #8a6a3a;
}

#giftEditorBtn {
  width: 100%;
  margin: 8px 0 0;
  background: #8750f5;
  color: #fff;
  border: 2px solid #543847;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#dock .dockGiftHint,
#dock .dockKeyHint {
  margin: 0;
  text-align: center;
  color: #f4e6c3;
}

#dock .dockGiftHint {
  margin: 4px 0 8px;
}

#dock .dockGiftHint strong,
#dock .dockKeyHint strong {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hint {
  margin: 8px 0 0;
  font-size: 10px;
  color: #8a7a62;
}

#giftOverlayLayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  --gift-scale: 1.85;
}

#giftOverlayLayer[hidden] { display: none; }

body:not(.overlay):not(.logged-in) #giftOverlayLayer {
  display: none !important;
}

.giftPanel {
  position: absolute;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: calc(8px * var(--gift-scale));
  width: max-content;
  min-width: calc(32px * var(--gift-scale));
  max-width: 46%;
  padding: 0;
  background: none;
  border: none;
  pointer-events: none;
  overflow: visible;
}

.giftPanel.show { display: flex; }

body:not(.overlay).giftDragging .giftPanel.show {
  pointer-events: auto;
  cursor: grab;
}

body:not(.overlay).giftDragging .giftPanel.show:active {
  cursor: grabbing;
}

.giftPanelItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  overflow: visible;
  gap: 1px;
  color: #fff;
  font-weight: 900;
  font-size: calc(13px * var(--gift-scale));
  line-height: 1.1;
  letter-spacing: 0.02em;
  paint-order: stroke fill;
  -webkit-text-stroke: 1.4px #000;
  text-shadow:
    0 0 6px #000,
    2px 2px 0 #000,
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    0 2px 0 #000,
    0 -2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000;
}

.giftPanelText {
  color: #fff;
  display: block;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  width: 100%;
  margin: 0 auto;
  line-height: 1.05;
}

.giftPanelItem img,
.giftPanelItem .giftPh {
  width: calc(32px * var(--gift-scale));
  height: calc(32px * var(--gift-scale));
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px #000);
}

.giftPh {
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 6px;
  font-size: 16px;
}

#giftEditor[hidden] { display: none; }

#giftEditor {
  position: fixed;
  left: 8px;
  top: 8px;
  bottom: 8px;
  z-index: 20;
  width: calc((100vw - min(100vw, 100vh * 288 / 512)) / 2 - 72px);
  background: none;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  color-scheme: dark;
  cursor: default;
  pointer-events: none;
}

#giftEditor input,
#giftEditor select {
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #ffe14a;
  user-select: text;
  -webkit-user-select: text;
}

.giftEditorCard {
  pointer-events: auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(20, 14, 10, 0.92);
  color: #f4e6c3;
  border: 3px solid #543847;
  border-radius: 8px;
  box-shadow: 0 8px 0 #2a1c22;
  cursor: default;
}

.giftEditorCard header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #2a2230;
}

.giftEditorCard h2 {
  margin: 0;
  color: #ffe14a;
  font-size: 15px;
}

.giftEditorCard header p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8a7a62;
}

.giftEditorHeadActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#giftEditorClose {
  background: #2a1c22;
  color: #f4e6c3;
  border: 2px solid #543847;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-weight: 900;
  cursor: pointer;
}

#giftEditorClose:hover {
  background: #8a6a3a;
  color: #fff;
  border-color: #000;
}

.giftEditorTopBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-bottom: 1px solid #2a2230;
  background: #100e14;
}

.giftEditorTopBar .hint {
  margin: 0;
  font-size: 11px;
}

.giftEditorTopBar .giftOnOff {
  background: #73c02a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-weight: 900;
  cursor: pointer;
  min-width: 46px;
}

.giftEditorTopBar .giftOnOff.off {
  background: #543847;
  color: #c8b48a;
}

.giftPaneHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.giftPaneHeadTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.giftPaneHeadTitle h3 { margin: 0; }

#loadDefaultGifts {
  background: #2a1c22;
  color: #f4e6c3;
  border: 2px solid #543847;
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

#loadDefaultGifts:hover {
  background: #3a2a30;
  color: #ffe14a;
}

.giftPaneHead .giftToggle {
  font-size: 11px;
  color: #f4e6c3;
  white-space: nowrap;
}

.giftEditorToolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.giftEditorToolbar input {
  flex: 1;
  min-width: 0;
  background: #140e0c;
  color: #ffe14a;
  border: 2px solid #543847;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

#giftSyncBtn {
  background: #73c02a;
  color: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

#giftCatalogPill, #giftSaveStatus {
  font-size: 12px;
  font-weight: 800;
  color: #9ae04a;
}

#giftSaveStatus.busy { color: #ffe14a; }
#giftSaveStatus.err { color: #e07018; }

.giftEditorBody {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.giftEditorBody::-webkit-scrollbar {
  width: 8px;
}

.giftEditorBody::-webkit-scrollbar-track {
  background: #1a1014;
}

.giftEditorBody::-webkit-scrollbar-thumb {
  background: #8a6a3a;
  border-radius: 4px;
}

.giftCatalogPane, .giftMapPane {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 0;
  background: #0c0c10;
  border: 1px solid #2a2230;
  border-radius: 8px;
  padding: 8px;
}

.giftEditorBody h3 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c8b48a;
}

#giftCatalogGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  flex: 0 0 auto;
  max-height: 280px;
  min-height: 96px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
}

.giftCatItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #15151c;
  border: 2px solid #2a2230;
  border-radius: 8px;
  padding: 8px 4px 6px;
  cursor: pointer;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.giftCatItem:hover, .giftCatItem.on {
  border-color: #8750f5;
}

.giftCatItem img, .giftCatItem .giftPh {
  width: 36px;
  height: 36px;
}

.giftCatName {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.15;
  max-width: 100%;
}

.giftCatCoins {
  color: #ffe14a;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.giftManualRow {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-shrink: 0;
}

.giftManualRow input {
  flex: 1;
  background: #140e0c;
  color: #fff;
  border: 2px solid #543847;
  border-radius: 6px;
  padding: 6px;
  font: inherit;
}

.giftEditorTabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.giftEditorTabs button {
  background: #2a1c22;
  color: #c8b48a;
  border: 2px solid #543847;
  border-radius: 6px;
  padding: 6px;
  font-weight: 800;
  cursor: pointer;
}

.giftEditorTabs button.on {
  background: #73c02a;
  color: #fff;
  border-color: #000;
}

#giftMapList {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.giftMapRow {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #15151c;
  border: 1px solid #2a2230;
  border-radius: 8px;
  padding: 6px 8px;
}

.giftMapHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.giftMapHead .giftMapName {
  flex: 0 1 auto;
  width: 6ch;
  min-width: 6ch;
  max-width: 100%;
  field-sizing: content;
  background: #0b0908;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #ffe14a;
  border: 2px solid #8750f5;
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
}

.giftDragHandle {
  flex: 0 0 auto;
  width: 16px;
  color: #8a7a62;
  font-size: 14px;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  line-height: 1;
}

.giftDragHandle:active {
  cursor: grabbing;
}

.giftMapRow.dragging {
  opacity: 0.45;
}

.giftMapRow.dragover {
  border-color: #ffe14a;
  box-shadow: 0 0 0 1px #ffe14a;
}

.giftMapPreview {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  color: #ffe14a;
  padding: 4px 6px;
  border: 2px solid #543847;
  border-radius: 6px;
  background: #140e0c;
  min-width: 3ch;
}

.giftMapMeta {
  flex: 1 1 auto;
  font-size: 11px;
  font-weight: 800;
  color: #c4b48a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.giftMapFields {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: end;
  justify-content: flex-start;
}

.giftMapFields .giftTextField {
  width: auto;
  flex: 0 0 auto;
}

.giftMapFields select {
  width: 10.8em;
}

.giftMapFields .giftAmountField input {
  width: 4.8em;
}

.giftMapRow img, .giftMapRow .giftPh {
  width: 36px;
  height: 36px;
}

.giftMapRow select, .giftMapRow input[type="text"], .giftMapRow input[type="number"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #140e0c;
  color: #fff;
  border: 2px solid #543847;
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
  font-weight: 800;
}

.giftMapFields select {
  width: 10.8em;
}

.giftMapFields .giftAmountField input[type="number"] {
  width: 4.8em;
}

.giftMapRow:not(.needsAmount) .giftAmountField {
  display: none;
}

.giftMapRow:not(.needsAmount) .giftMapFields {
  display: flex;
}

.giftTextField {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4b48a;
}

.giftTextField input[type="text"],
.giftTextField input[type="number"],
.giftTextField select {
  width: 100%;
  min-width: 0;
  background: #0b0908;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #ffe14a;
  border: 2px solid #8750f5;
  font-size: 13px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  padding: 4px 6px;
}

.giftTextField input:focus,
.giftTextField select:focus {
  outline: none;
  border-color: #b8ff64;
}

.deathTitleField {
  margin-top: 10px;
}

.deathSlots {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #2a2230;
  flex-shrink: 0;
}

.deathSlots h3 {
  margin-bottom: 4px;
}

.deathSlots .hint {
  margin: 0 0 8px;
}

.deathSlot {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  background: #15151c;
  border: 2px solid #2a2230;
  border-radius: 10px;
  padding: 8px;
}

.deathSlotBody {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.deathSlot.picking {
  border-color: #ffe14a;
  box-shadow: 0 0 0 1px #ffe14a;
}

.deathSlot strong {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffe14a;
}

.deathSlotPreview {
  display: grid;
  place-items: center;
  min-height: 64px;
  height: 64px;
  background: #0b0908;
  border-radius: 8px;
}

.deathSlotPreview img,
.deathSlotPreview .giftPh {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.deathSlotPreview .empty {
  font-size: 11px;
  color: #8a7a62;
}

.deathSlotBtns {
  display: flex;
  gap: 6px;
}

.deathSlotBtns button {
  flex: 1;
  background: #8750f5;
  color: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 6px 8px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
}

.deathSlotBtns .ghostSlot {
  background: #2a1c22;
  color: #c8b48a;
  border-color: #543847;
}

.giftAddOption {
  width: 100%;
  margin-top: 4px;
  background: #8750f5;
  color: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.giftAddOption:hover {
  background: #9a68ff;
}

.giftAddOption.on {
  background: #ffe14a;
  color: #000;
}

body.giftAdding #giftCatalogGrid,
body.giftPicking #giftCatalogGrid,
body.giftReplacing #giftCatalogGrid {
  outline: 2px dashed #ffe14a;
  outline-offset: 4px;
  border-radius: 8px;
}

.giftCatItem.pick {
  box-shadow: 0 0 0 2px #ffe14a;
}

.giftMapRow.replacing {
  border-color: #ffe14a;
  box-shadow: 0 0 0 1px #ffe14a;
}

.giftMapRow.off {
  opacity: 0.48;
}

.giftMapRow.streamOff:not(.off) {
  opacity: 0.72;
}

.giftMapRow .giftOnOff {
  background: #73c02a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 8px;
  font-weight: 900;
  cursor: pointer;
  min-width: 42px;
}

.giftMapRow .giftShowBtn {
  background: #3d9adf;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 8px;
  font-weight: 900;
  cursor: pointer;
  min-width: 58px;
}

.giftMapRow .giftEditBtn {
  background: #8750f5;
  color: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 5px 8px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.giftMapRow .giftEditBtn.on {
  background: #ffe14a;
  color: #000;
}

.giftMapRow .giftOnOff.off {
  background: #543847;
  color: #c8b48a;
}

.giftMapRow .giftShowBtn.off {
  background: #543847;
  color: #c8b48a;
}

.giftMapSettings {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  flex-shrink: 0;
}

.likeGoalEditor {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
  border: 1px solid #2a2230;
  border-radius: 12px;
  background: #0c0c10;
  flex-shrink: 0;
}

.likeGoalEditor h3 { margin-bottom: 4px; }

.likeGoalEditor .hint { margin: 0 0 8px; }

.likeGoalFields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.likeGoalFields label,
.likeGoalEditorFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}

.likeGoalFields input,
.likeGoalFields select {
  width: 100%;
  max-width: 220px;
  background: #101018;
  color: #fff;
  border: 2px solid #2a2230;
  border-radius: 8px;
  padding: 6px 8px;
  font-weight: 800;
}

.likeGoalEditorFoot { margin-top: 8px; }

.likeGoalEditorFoot .hint { margin: 0; }

.giftToggle, .giftScaleRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}

.giftScaleRow input { flex: 1; }
