/* Shadow Tag: night parks. Indigo night, warm lantern gold, moon-gate cyan, the Shade's red. */
@font-face {
  font-family: "Nunito Sans";
  src: url("/site/brand/NunitoSans-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/site/brand/DMSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --night: #101530;
  --night2: #1a2146;
  --ink: #eef1ff;
  --dim: #a9b1d8;
  --gold: #ffcf6b;
  --cyan: #8ef0ff;
  --red: #ff4d6d;
  --card: rgba(24, 31, 66, 0.86);
  --edge: rgba(255, 255, 255, 0.1);
  --display: "Nunito Sans", ui-rounded, system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --shell-ink: #eef1ff;
  --shell-paper: #1a2146;
  --shell-accent: #ffcf6b;
  --shell-on-accent: #1b2044;
  --shell-font: var(--body);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  background: var(--night);
  color: var(--ink);
  font: 700 16px/1.4 var(--body);
  -webkit-user-select: none;
  user-select: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: block;
  touch-action: none;
}

/* ---------- the kit's dialogs, dressed for the night ---------- */
.sh-layer {
  background: rgba(5, 7, 20, 0.6) !important;
}
.sh-modal {
  background:
    radial-gradient(ellipse at 50% -20%, rgba(142, 240, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #212a58, #161c3e) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 24px 60px rgba(0, 0, 0, 0.55) !important;
  border-radius: 24px !important;
}
.sh-modal h2 {
  font: 900 26px/1.1 var(--display) !important;
  color: var(--ink);
}
.sh-modal b {
  color: var(--gold);
}
.sh-modal a {
  color: var(--cyan);
}
.sh-btn {
  border-radius: 14px !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}
.sh-btn.primary {
  background: linear-gradient(180deg, #ffe08f, var(--gold)) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 0 #b88a2e;
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
}
.sh-field span {
  color: var(--dim);
  font-size: 14px;
}
.sh-field input {
  font: 900 20px/1.2 var(--display) !important;
  background: #0f1430 !important;
  color: var(--ink) !important;
  border-color: rgba(255, 207, 107, 0.5) !important;
  -webkit-user-select: text;
  user-select: text;
}
.sh-field input:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(255, 207, 107, 0.25);
}
.sh-thumb {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ---------- menu button ---------- */
.icon-btn {
  position: fixed;
  z-index: 50;
  top: calc(10px + var(--sat));
  right: calc(10px + var(--sar));
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 0;
  background: rgba(16, 21, 48, 0.72);
  box-shadow: inset 0 0 0 2px var(--edge);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
}
.icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  fill: none;
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}
.hud[hidden] {
  display: none;
}
.top {
  position: absolute;
  top: calc(10px + var(--sat));
  left: calc(10px + var(--sal));
  right: calc(66px + var(--sar));
  display: grid;
  gap: 6px;
  justify-items: start;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pill {
  background: rgba(16, 21, 48, 0.78);
  box-shadow: inset 0 0 0 2px var(--edge);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 12px;
  font: 900 18px/1.2 var(--display);
  font-variant-numeric: tabular-nums;
}
.timer.low {
  color: var(--red);
  animation: tick 1s steps(1) infinite;
}
@keyframes tick {
  50% {
    box-shadow: inset 0 0 0 2px var(--red);
  }
}
.team {
  display: flex;
  gap: 5px;
}
.face {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, white), var(--c) 70%);
  box-shadow: 0 0 0 2px rgba(16, 21, 48, 0.9), 0 3px 8px rgba(0, 0, 0, 0.35);
  font: 900 14px/1 var(--display);
  color: #1b2044;
  transition: transform 0.2s, filter 0.2s, opacity 0.2s;
}
.face .em {
  font-size: 18px;
  animation: pop-in 0.25s ease-out;
}
.face.me {
  box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, 0.35);
}
.face.caged {
  filter: grayscale(0.6) brightness(0.8);
}
.face.caged::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, transparent 0 5px, #d8def5 5px 7px);
}
.face.out {
  opacity: 0.3;
  filter: grayscale(1);
}
.face.escaped::after {
  content: "✓";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  color: #102030;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.goal {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 21, 48, 0.78);
  box-shadow: inset 0 0 0 2px var(--edge);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 5px 12px 5px 8px;
  font-size: 13px;
  color: var(--dim);
}
.goal b {
  color: var(--ink);
}
.goal.open {
  color: #102030;
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(142, 240, 255, 0.5);
}
.goal.open b {
  color: #102030;
}
.lamp {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-radius: 2px;
  background: #3a3f63;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, box-shadow 0.3s;
}
.lamp i {
  position: absolute;
  inset: auto 0 0 0;
  background: #c9a25a;
}
.lamp.team {
  box-shadow: 0 0 0 2px rgba(255, 207, 107, 0.6);
}
.lamp.lit {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.hint {
  position: absolute;
  left: 50%;
  top: calc(96px + var(--sat));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
  background: rgba(255, 207, 107, 0.96);
  color: #1b2044;
  padding: 9px 16px;
  border-radius: 14px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: pop 0.25s ease-out;
}
.hint.danger {
  background: var(--red);
  color: #fff;
}
.hint.good {
  background: var(--cyan);
}
.status {
  position: absolute;
  left: 50%;
  bottom: calc(150px + var(--sab));
  transform: translateX(-50%);
  width: min(340px, calc(100% - 32px));
  text-align: center;
  background: var(--card);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 12px 14px;
  /* A caged runner taps anywhere to rattle, even on this card; only its button takes the tap. */
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--edge), 0 10px 30px rgba(0, 0, 0, 0.4);
}
.status p {
  margin: 0 0 8px;
}
.status button {
  pointer-events: auto;
}
.ability {
  position: absolute;
  right: calc(22px + var(--sar));
  bottom: calc(30px + var(--sab));
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 0;
  pointer-events: auto;
  touch-action: none;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle, #2a3366 58%, transparent 59%),
    conic-gradient(var(--gold) calc(var(--ready, 1) * 360deg), rgba(255, 255, 255, 0.15) 0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font: 900 17px/1 var(--display);
  transition: transform 0.08s;
}
.ability small {
  display: block;
  font: 700 11px/1.4 var(--body);
  color: var(--dim);
  margin-top: 3px;
}
.ability.ready {
  background:
    radial-gradient(circle at 40% 35%, #ffe7a8, #ffcf6b 45%, #f0b048 58%, transparent 59%),
    conic-gradient(#fff 360deg, #fff 0);
  color: #1b2044;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 207, 107, 0.35);
}
.ability.ready small {
  color: #5a4a20;
}
.ability.sync {
  background:
    radial-gradient(circle, #8ef0ff 58%, transparent 59%),
    conic-gradient(#fff 360deg, #fff 0);
  color: #102030;
  animation: throb 0.3s ease-in-out infinite alternate;
}
.ability:active {
  transform: scale(0.92);
}

/* Emotes: a button beside the ability, and a tray of big, easy targets. */
.emote-btn {
  position: absolute;
  right: calc(128px + var(--sar));
  bottom: calc(40px + var(--sab));
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  pointer-events: auto;
  touch-action: manipulation;
  background: rgba(16, 21, 48, 0.8);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 6px 18px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform 0.08s;
}
.emote-btn[hidden] {
  display: none;
}
.emote-btn[aria-expanded="true"] {
  background: #fff;
  box-shadow: 0 0 0 3px var(--gold), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.emote-btn:active {
  transform: scale(0.9);
}
.emote-tray {
  position: absolute;
  right: calc(16px + var(--sar));
  bottom: calc(140px + var(--sab));
  display: grid;
  grid-template-columns: repeat(4, 58px);
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(16, 21, 48, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 14px 36px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  transform-origin: 80% 100%;
  animation: tray-in 0.16s ease-out;
}
.emote-tray[hidden] {
  display: none;
}
.emo {
  position: relative;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 30px;
  line-height: 1;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  transition: transform 0.08s, background 0.12s;
}
.emo:hover {
  background: rgba(255, 255, 255, 0.18);
}
.emo:active {
  transform: scale(0.88);
}
.emo small {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font: 700 11px/1 var(--body);
  color: var(--dim);
}
@keyframes tray-in {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
  }
}
@keyframes pop-in {
  from {
    transform: scale(0.4);
  }
}
@keyframes throb {
  to {
    transform: scale(1.08);
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translate(-50%, -6px);
  }
}

/* ---------- screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  padding: calc(60px + var(--sat)) calc(16px + var(--sar)) calc(24px + var(--sab)) calc(16px + var(--sal));
  background:
    radial-gradient(ellipse at 50% -10%, rgba(142, 240, 255, 0.16), transparent 55%),
    radial-gradient(ellipse at 80% 110%, rgba(255, 77, 109, 0.14), transparent 50%),
    rgba(8, 10, 26, 0.55);
  display: grid;
  justify-items: center;
  align-content: start;
}
.screen:empty {
  display: none;
}
.panel {
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.brand {
  display: grid;
  justify-items: center;
  gap: 6px;
}
.logo {
  position: relative;
  margin: 0;
  font: 900 54px/0.92 var(--display);
  letter-spacing: -1px;
  text-shadow: 0 4px 0 #0a0d1e, 0 0 30px rgba(142, 240, 255, 0.35);
}
.logo span {
  display: block;
  color: var(--gold);
  text-shadow: 0 4px 0 #6a4a14, 0 0 36px rgba(255, 207, 107, 0.45);
}
.moon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffbe8, #f6e7b0 55%, #d9c07a);
  box-shadow: 0 0 60px rgba(255, 240, 190, 0.45);
  position: relative;
  animation: float 5s ease-in-out infinite;
}
.moon::after {
  content: "";
  position: absolute;
  inset: 0 -18px 0 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 45%, #0b0d1a 55%, transparent 57%);
}
.moon b {
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  top: 34px;
  left: 40px;
  animation: blink 6s infinite;
}
.moon b + b {
  left: 57px;
}
@keyframes float {
  50% {
    transform: translateY(-6px);
  }
}
@keyframes blink {
  0%,
  46%,
  50%,
  100% {
    transform: scaleY(1);
  }
  48% {
    transform: scaleY(0.1);
  }
}
.tag {
  margin: 0;
  color: var(--dim);
  max-width: 330px;
  font-weight: 400;
}
.topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  align-items: center;
}
.wallet {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.wallet .pill {
  font-size: 16px;
}
.coin,
.key {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, var(--gold) 60%, #c8912e);
  vertical-align: -1px;
  margin-right: 4px;
}
.key {
  border-radius: 3px 50% 50% 50%;
  background: radial-gradient(circle at 35% 35%, #e9fdff, var(--cyan) 60%, #3fa8c2);
}

/* The player: portrait, name, runner. */
.profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, rgba(40, 50, 100, 0.9), rgba(24, 31, 66, 0.9));
  border-radius: 20px;
  padding: 8px 12px 8px 8px;
  text-align: left;
  box-shadow: inset 0 0 0 2px var(--edge), 0 10px 24px rgba(0, 0, 0, 0.3);
}
.who-pic {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 70%, rgba(255, 207, 107, 0.25), rgba(12, 16, 38, 0.6) 70%);
  box-shadow: inset 0 0 0 2px rgba(255, 207, 107, 0.35);
}
.who-text {
  min-width: 0;
}
.who-text p {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--dim);
  font-weight: 400;
}
.who-text p b {
  color: var(--ink);
  font-weight: 700;
}
.name-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 0;
  background: none;
  padding: 2px 0;
  text-align: left;
}
.name-btn strong {
  font: 900 21px/1.1 var(--display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.name-btn .pen {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 207, 107, 0.18);
  color: var(--gold);
  font-size: 13px;
}
.chev {
  border: 0;
  background: rgba(255, 207, 107, 0.14);
  color: var(--gold);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  white-space: nowrap;
  align-self: center;
}

/* Maps. */
.maps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}
.map {
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  border-radius: 16px;
  padding: 8px 6px 9px;
  background: rgba(24, 31, 66, 0.8);
  box-shadow: inset 0 0 0 2px var(--edge);
  transition: transform 0.12s, box-shadow 0.12s;
}
.map .thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  height: 56px;
  width: 100%;
  display: grid;
  place-items: center;
}
.map .thumb canvas {
  border-radius: 6px;
  transform: rotate(-90deg);
}
.map strong {
  font: 900 13px/1.1 var(--display);
}
.map.on {
  background: linear-gradient(180deg, rgba(255, 207, 107, 0.2), rgba(24, 31, 66, 0.85));
  box-shadow: inset 0 0 0 3px var(--gold), 0 0 18px rgba(255, 207, 107, 0.25);
}
.map[disabled] {
  opacity: 0.4;
  cursor: default;
}
.map:active:not([disabled]) {
  transform: scale(0.96);
}
.map-blurb {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--dim);
  font-weight: 400;
  min-height: 1.4em;
}

.btn {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 18px;
  padding: 12px 18px;
  font: 900 20px/1.1 var(--display);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
  transition: transform 0.08s;
}
.btn small {
  display: block;
  font: 700 13px/1.3 var(--body);
  opacity: 0.8;
  margin-top: 2px;
}
.btn.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffe08f, var(--gold));
  color: #1b2044;
  box-shadow: 0 6px 0 #b88a2e, 0 12px 28px rgba(255, 207, 107, 0.25);
  min-height: 72px;
  font-size: 28px;
}
.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 3.5s ease-in-out 1s infinite;
}
@keyframes shine {
  30%,
  100% {
    transform: translateX(100%);
  }
}
.btn.shade {
  background: linear-gradient(180deg, #2a1838, #150b22);
  box-shadow: inset 0 0 0 2px rgba(255, 77, 109, 0.6), 0 0 22px rgba(255, 77, 109, 0.2);
}
.btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.btn.small {
  min-height: 42px;
  font-size: 16px;
  border-radius: 12px;
}
.btn:active:not([disabled]) {
  transform: translateY(2px);
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
h2 {
  margin: 0;
  font: 900 30px/1.1 var(--display);
}
.sub {
  margin: 0;
  color: var(--dim);
  font-weight: 400;
}

/* Roster. */
.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
}
.card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--c) 30%, transparent), transparent 55%),
    var(--card);
  border-radius: 20px;
  padding: 10px 10px 12px;
  display: grid;
  justify-items: center;
  gap: 4px;
  box-shadow: inset 0 0 0 2px var(--edge);
  animation: rise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 50ms);
}
.card.sel {
  box-shadow: inset 0 0 0 3px var(--gold), 0 0 22px rgba(255, 207, 107, 0.2);
}
.card.locked {
  background: var(--card);
}
.card.locked canvas {
  filter: brightness(0.25) saturate(0);
}
.card strong {
  font: 900 19px/1.1 var(--display);
}
.card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--dim);
  font-weight: 400;
  min-height: 50px;
}
.card .btn {
  min-height: 40px;
  font-size: 15px;
  border-radius: 12px;
  padding: 8px;
}
.card .btn.buy {
  background: var(--gold);
  color: #1b2044;
}

/* Results. */
.result {
  font: 900 46px/1 var(--display);
  margin: 6px 0 0;
  animation: slam 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes slam {
  from {
    opacity: 0;
    transform: scale(1.5);
  }
}
.result.win {
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(142, 240, 255, 0.45);
}
.result.lose {
  color: var(--red);
  text-shadow: 0 0 24px rgba(255, 77, 109, 0.35);
}
.faces {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.faces figure {
  margin: 0;
  display: grid;
  justify-items: center;
  font-size: 12px;
  color: var(--dim);
  padding: 4px 6px 6px;
  border-radius: 14px;
}
.faces figure.me {
  background: rgba(255, 207, 107, 0.14);
  box-shadow: inset 0 0 0 2px rgba(255, 207, 107, 0.4);
  color: var(--ink);
}
.faces figure.gone canvas {
  filter: grayscale(1) brightness(0.5);
}
.rewards {
  width: 100%;
  background: var(--card);
  border-radius: 18px;
  padding: 12px 16px;
  display: grid;
  gap: 4px;
  text-align: left;
  box-shadow: inset 0 0 0 2px var(--edge);
}
.rewards div {
  display: flex;
  justify-content: space-between;
  font-weight: 400;
  animation: rise 0.3s ease-out both;
  animation-delay: calc(250ms + var(--i, 0) * 90ms);
}
.rewards div span:last-child {
  color: var(--gold);
  font-weight: 700;
}
.rewards .total {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 4px;
  padding-top: 6px;
  font-weight: 700;
  font-size: 18px;
}
.news {
  margin: 0;
  color: var(--gold);
}
@media (min-width: 900px) {
  .logo {
    font-size: 72px;
  }
  .panel.wide {
    width: min(820px, 100%);
  }
  .hint {
    top: calc(24px + var(--sat));
  }
}
@media (max-height: 700px) {
  .moon {
    display: none;
  }
  .logo {
    font-size: 44px;
  }
}

/* ---------- nightly gift, keys, focus ---------- */
.nights {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--dim);
  font-weight: 400;
}
.nights b {
  color: var(--ink);
}
.moons {
  display: flex;
  gap: 4px;
}
.moons i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.moons i.on {
  background: radial-gradient(circle at 36% 34%, #fffbe8, #f6e7b0 60%, #d9c07a);
  box-shadow: 0 0 8px rgba(255, 240, 190, 0.5);
}
.keys-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--dim);
}
kbd {
  font: 700 12px/1 var(--body);
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.15);
  color: var(--ink);
}
button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .hint,
  .ability.sync,
  .panel,
  .card,
  .rewards div,
  .result,
  .moon,
  .moon b,
  .btn.primary::after,
  .emote-tray,
  .face .em,
  .timer.low {
    animation: none;
  }
  .btn:active:not([disabled]),
  .ability:active,
  .emote-btn:active,
  .emo:active,
  .map:active:not([disabled]) {
    transform: none;
  }
}

/* ---------- one thumb (touch screens): the stick does everything ---------- */
.one-thumb .ability {
  display: none;
}
.one-thumb .emote-btn {
  right: calc(18px + var(--sar));
  bottom: calc(26px + var(--sab));
}
.one-thumb .emote-tray {
  bottom: calc(100px + var(--sab));
}
.one-thumb .status {
  bottom: calc(110px + var(--sab));
}

/* ---------- rooms: play with friends ---------- */
.btn.friends {
  background: linear-gradient(180deg, #1d3d52, #132a3c);
  box-shadow: inset 0 0 0 2px rgba(142, 240, 255, 0.55), 0 0 22px rgba(142, 240, 255, 0.15);
}
.join {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
  background: var(--card);
  border-radius: 18px;
  padding: 12px;
  box-shadow: inset 0 0 0 2px var(--edge);
}
.join label {
  color: var(--dim);
  font-size: 14px;
}
.join-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.join input {
  min-width: 0;
  font: 900 26px/1 var(--display);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px;
  border-radius: 14px;
  border: 2px solid rgba(142, 240, 255, 0.45);
  background: #0f1430;
  color: var(--ink);
  -webkit-user-select: text;
  user-select: text;
}
.join input:focus {
  outline: none;
  border-color: var(--cyan);
}
.join .btn {
  width: auto;
  min-height: 52px;
  padding: 0 20px;
  background: var(--cyan);
  color: #102030;
}
.lobby .code {
  display: flex;
  gap: 8px;
  margin-top: -6px;
}
.lobby .code b {
  display: grid;
  place-items: center;
  width: 56px;
  height: 66px;
  border-radius: 14px;
  background: linear-gradient(180deg, #232c5c, #171d40);
  box-shadow: inset 0 0 0 2px rgba(255, 207, 107, 0.5), 0 6px 0 #0b0f24;
  font: 900 38px/1 var(--display);
  color: var(--gold);
}
.lobby .invite {
  width: auto;
  padding: 0 22px;
  background: var(--gold);
  color: #1b2044;
}
.seats {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 2px var(--edge);
  text-align: left;
  min-width: 0;
}
.seat.shade {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, rgba(60, 20, 50, 0.9), var(--card));
  box-shadow: inset 0 0 0 2px rgba(255, 77, 109, 0.45);
}
.seat.bot {
  opacity: 0.6;
}
.seat.me {
  box-shadow: inset 0 0 0 3px var(--gold);
}
.seat .pic {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.seat .who {
  display: grid;
  min-width: 0;
}
.seat strong {
  font: 900 16px/1.15 var(--display);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seat small {
  font-size: 12px;
  color: var(--dim);
  font-weight: 400;
}
.lobby .wait {
  margin: 0;
  color: var(--cyan);
}

/* In a room: friends stand out in the top bar and the results; bots wear a little robot. */
.face.friend {
  box-shadow: 0 0 0 2px #fff, 0 0 10px var(--c), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.face.bot {
  filter: saturate(0.55) brightness(0.85);
}
.face.bot::before {
  content: "🤖";
  position: absolute;
  left: -5px;
  bottom: -5px;
  font-size: 12px;
  line-height: 1;
}
.faces figure.friend {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

/* ---------- the title: everything on one screen ---------- */
.controls {
  display: grid;
  gap: 12px;
  width: 100%;
  justify-items: center;
}
.modes {
  display: grid;
  gap: 10px;
  width: 100%;
}
.modes.two {
  grid-template-columns: 1fr 1fr;
}
.modes.two .btn {
  font-size: 17px;
  min-height: 60px;
  padding: 10px 8px;
}
.modes.two .btn small {
  font-size: 12px;
}
.screen:has(.panel.title) {
  align-content: safe center;
}
/* A computer: brand on the left, the choices on the right, no scrolling. */
@media (min-width: 900px) {
  .panel.title {
    width: min(960px, 100%);
    grid-template-columns: 1fr minmax(0, 460px);
    align-items: center;
    column-gap: 56px;
  }
  .panel.title .brand {
    gap: 14px;
  }
  .panel.title .moon {
    display: block;
  }
  .panel.title .topline {
    flex-direction: column;
  }
}
@media (min-width: 900px) and (max-height: 640px) {
  .panel.title .moon {
    display: none;
  }
}
@media (max-width: 899px) and (max-height: 700px) {
  .panel.title .tag {
    display: none;
  }
}

.btn.bots {
  background: linear-gradient(180deg, #2c3670, #1d2450);
  box-shadow: inset 0 0 0 2px rgba(255, 207, 107, 0.5);
}

/* The Shade's Howl, above Pounce (computers; touch screens double-tap). */
.ability.power {
  bottom: calc(140px + var(--sab));
  right: calc(34px + var(--sar));
  width: 72px;
  height: 72px;
  font-size: 15px;
}
.ability.power[hidden] {
  display: none;
}
.ability.power.ready {
  background:
    radial-gradient(circle at 40% 35%, #ff9aae, #ff4d6d 50%, #c02c4a 58%, transparent 59%),
    conic-gradient(#fff 360deg, #fff 0);
  color: #fff;
}
.ability.power.ready small {
  color: #ffe0e6;
}

/* The Shade's paint, left of Pounce (computers; touch screens tap where to throw). */
.ability.paint {
  bottom: calc(224px + var(--sab));
  right: calc(34px + var(--sar));
  width: 72px;
  height: 72px;
  font-size: 15px;
}
.ability.paint[hidden] {
  display: none;
}
.ability.paint.ready {
  background:
    radial-gradient(circle at 40% 35%, #e6c8ff, #b06cff 50%, #7a3cff 58%, transparent 59%),
    conic-gradient(#fff 360deg, #fff 0);
  color: #fff;
}
.ability.paint.ready small {
  color: #f0e4ff;
}

/* Small phones (under 375 px): six runner faces fit beside the timer, clear of the menu button. */
@media (max-width: 374px) {
  .team {
    gap: 3px;
  }
  .face {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .face .em {
    font-size: 15px;
  }
}
/* Landscape phones: the status card sits low, so it doesn't cover your own runner in the middle. */
@media (max-height: 500px) {
  .status,
  .one-thumb .status {
    bottom: calc(12px + var(--sab));
  }
}
/* The Shade on a computer: the emote tray opens left of the Howl and Paint buttons, not under them. */
.hud:has(#power:not([hidden])) .emote-tray {
  right: calc(118px + var(--sar));
}
/* What's new card. */
.news-list {
  list-style: none;
  padding: 0 !important;
  margin: 0 0 4px !important;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.35;
}

/* Results: each runner's night. */
.faces figure {
  position: relative;
}
.faces .badge {
  margin-top: -8px;
  padding: 1px 7px;
  border-radius: 999px;
  font: 700 11px/1.5 var(--body);
  background: rgba(16, 21, 48, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  color: var(--dim);
  white-space: nowrap;
}
.faces figure.hero .badge {
  background: var(--gold);
  color: #1b2044;
  box-shadow: 0 0 12px rgba(255, 207, 107, 0.6);
}
.faces figure.out .badge {
  background: var(--cyan);
  color: #102030;
}
