/* The start screen: layout, controls panel (keycaps, mouse drawings),
   screen-size rules, the main panel (wordmark, colors, weapons, name, buttons).
   Linked from index.html in a fixed order (the order is the cascade). */

/* Everything fits on one screen, no scrolling (only What's new scrolls):
   the panels are compact, and startScreen.js scales the layout down if a
   window is still too small (phones stack it and scroll instead). */
#start-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--edge) var(--edge) calc(var(--edge) + var(--legal-footer-height));
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(5, 6, 10, 0.35), rgba(5, 6, 10, 0.85));
  --legal-footer-height: 34px;
  --social-corner-height: 44px;
}

/* Friends and Mail (logged in), in the top-left corner; the panels make
   room for them below (startScreen.js fits them in). */
#start-screen.with-social-corner {
  padding-top: calc(var(--edge) + var(--social-corner-height));
}

.social-corner {
  position: absolute;
  top: var(--edge);
  left: var(--edge);
  z-index: 1;
  display: flex;
  gap: 8px;
}

/* Logged in: the recovery code, in the top-right corner. */
.recovery-corner {
  left: auto;
  right: var(--edge);
}

.social-corner-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text);
  background: rgba(16, 19, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.social-corner-button:hover,
.social-corner-button:focus-visible {
  color: var(--accent);
  border-color: rgba(255, 201, 77, 0.6);
}

.social-corner-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The shard balance, beside the Shop's name. */
.shards-count {
  padding: 1px 7px;
  font-size: 12px;
  color: #9ad8ff;
  background: rgba(106, 190, 255, 0.12);
  border-radius: 8px;
}

/* Discord: a link styled as a corner button, its logo filled in Discord's
   blurple. */
.discord-button {
  text-decoration: none;
}

.discord-button svg {
  fill: #5865f2;
  stroke: none;
}

.discord-button:hover,
.discord-button:focus-visible {
  color: #fff;
  border-color: rgba(88, 101, 242, 0.8);
  background: rgba(88, 101, 242, 0.25);
}

.social-corner-button .account-badge {
  margin-left: 0;
}

/* Legal links along the bottom of the start screen (Privacy Policy,
   Contact; Terms of Service and other legal pages go here too). Not
   scaled with the panels: startScreen.js fits them above it. */
.legal-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--legal-footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 0 16px;
  box-sizing: border-box;
  font: 500 12px/1.4 system-ui, "Segoe UI", sans-serif;
  color: var(--muted);
  background: rgba(5, 6, 10, 0.55);
  border-top: 1px solid var(--border);
}

.legal-link {
  padding: 2px 0;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-link:hover,
.legal-link:focus-visible {
  color: var(--accent);
}

/* What's new and controls on the left, the main panel in the middle,
   records on the right. */
.start-layout {
  flex: none;
  display: flex;
  gap: 20px;
  align-items: stretch;
  transform-origin: center;
}

.controls-panel {
  width: 380px;
  padding: 24px 26px 20px;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

.controls-title {
  margin: 0 0 10px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--accent);
}

/* The all-time board: as tall as the panels beside it, scrolling inside. */
.records-panel {
  display: flex;
  flex-direction: column;
  width: 410px;
}

/* One line over the board: what it ranks. */
.board-caption {
  flex: none;
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

#hall-of-fame {
  /* Never shorter than its runs (all 25 in view, no scrolling): the
     panels grow to fit it, and fitStartScreen scales them down where a
     window is too small. */
  flex: 1 0 auto;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 0;
  outline: none;
}

#hall-of-fame::-webkit-scrollbar {
  width: 6px;
}

#hall-of-fame::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Keyboard keycaps */
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 3px;
  box-sizing: border-box;
  font: 700 11px/1 system-ui, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(#2a3142, #1c2230);
  border: 1px solid #4a5468;
  border-bottom-width: 2px;
  border-radius: 5px;
}

.key-dots {
  color: var(--muted);
  font-weight: 700;
}

.key-wide {
  min-width: 40px;
  font-size: 9px;
  letter-spacing: 1px;
}

/* Mouse drawing; rows light up the part they use. */
.mouse-icon {
  width: 15px;
  height: 21px;
}

.mouse-body {
  fill: #1c2230;
  stroke: #8d97b3;
  stroke-width: 2;
}

.mouse-left,
.mouse-right {
  fill: #262d3d;
}

.mouse-wheel {
  fill: #4a5468;
}

.mouse-icon.lit-left .mouse-left,
.mouse-icon.lit-wheel .mouse-wheel {
  fill: var(--accent);
  filter: drop-shadow(0 0 4px rgba(255, 201, 77, 0.7));
}

/* The main panel starts at the top, so Play stays in view however tall
   the panels beside it are (the What's new list adds to the left one). */
#start-screen .start-panel {
  justify-content: flex-start;
}

/* Narrow screens and phones held sideways: the main panel first, then
   controls and records, scrolling (shrinking the desktop layout to fit
   would make it too small to read). */
@media (max-width: 830px), (pointer: coarse) and (max-height: 600px) {
  /* (Friends and Mail: first in the column, not in the corner.) */
  #start-screen.with-social-corner {
    padding-top: var(--edge);
  }

  .social-corner {
    position: static;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }

  #start-screen {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-bottom: 0;
    overflow-y: auto;
  }

  /* At the end of the scrolling page. */
  .legal-footer {
    position: static;
    flex: none;
    height: auto;
    min-height: var(--legal-footer-height);
    margin: 16px calc(-1 * var(--edge)) 0;
    padding: 8px 16px;
  }

  .start-layout {
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
  }

  .start-layout > .start-panel {
    order: -1;
  }

  .controls-panel,
  .records-panel {
    width: 100%;
    max-width: 410px;
  }

  /* Stacked, nothing sets the board's height: a fixed one. */
  #hall-of-fame {
    flex: none;
    max-height: 340px;
  }
}

.start-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 360px;
  max-width: 100%;
  padding: 24px 28px 20px;
  box-sizing: border-box;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

.title {
  margin: 0;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(255, 177, 31, 0.35);
}

/* The wordmark image (src/client/assets/wordmark.png, transparent). */
.title-logo {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
  margin: -4px auto 8px;
}

.title span {
  color: var(--text);
}

#start-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Waiting a minute after leaving a run (startScreen.js): Play counts down,
   dimmed, and the Challenge button is disabled with the same countdown
   (challenge.js). */
.play-button:disabled,
.play-button:disabled:hover {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  cursor: not-allowed;
  transform: none;
}

/* Weapon and Look buttons, one under another, each
   showing what's picked (however long its name) and opening its popup
   (startScreen.js). */
.loadout {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.loadout-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 12px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.loadout-button:hover {
  border-color: rgba(255, 201, 77, 0.6);
  background: rgba(255, 201, 77, 0.06);
}

.loadout-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.loadout-label {
  flex: none;
  width: 64px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--muted);
}

.loadout-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.loadout-value > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* An arrow: it opens the choices. */
.loadout-button::after {
  content: '›';
  flex: none;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.loadout-button:hover::after {
  color: var(--accent);
}

.loadout-value.muted {
  font-weight: 600;
  color: var(--muted);
}

/* The Look button: which kind of skin it is, before its name. */
.loadout-kind {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.loadout-dot.swatch-dot {
  flex: none;
  width: 20px;
  height: 20px;
}

/* The popup's choices. */
.bestiary-panel.picker-panel {
  width: 760px;
}

/* The tower's lobby picker (lobbyPicker.js). */
.bestiary-panel.lobby-panel {
  width: 560px;
}

.lobby-body {
  padding: 6px 24px 24px;
  overflow-y: auto;
}

.lobby-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.lobby-action {
  flex: 1;
}

.lobby-action.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.lobby-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lobby-row {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lobby-row.full {
  opacity: 0.55;
}

.lobby-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lobby-room {
  color: var(--muted);
  font-size: 13px;
}

.lobby-seats {
  margin-left: auto;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 1px;
}

.lobby-join {
  padding: 5px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 201, 77, 0.12);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

.lobby-join:disabled {
  cursor: default;
  border-color: var(--border);
  background: none;
  color: var(--muted);
}

/* Narrow phones: the lobby's room under its name, the seats and JOIN on
   the right. */
@media (max-width: 560px) {
  .lobby-head {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .lobby-room {
    order: 3;
    flex-basis: 100%;
  }

  .lobby-action {
    font-size: 15px;
  }
}

.lobby-names {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.picker-body {
  padding: 6px 24px 24px;
  overflow-y: auto;
}

/* The shop (startScreen.js fillShop): your shards, and each skin with
   its price. */
.shop-balance {
  margin: 0 0 6px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: #9ad8ff;
}

.shop-message {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent);
}

/* The shop's sections: weapons, then legendary skins. */
.shop-section + .shop-section {
  margin-top: 10px;
}

.shop-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.shop-heading::-webkit-details-marker {
  display: none;
}

.shop-heading::before {
  content: "▸";
  transition: transform 0.15s;
}

.shop-section[open] > .shop-heading::before {
  transform: rotate(90deg);
}

.shop-heading:hover {
  background: rgba(255, 255, 255, 0.07);
}

.shop-count {
  margin-left: auto;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.shop-section[open] > .shop-heading {
  margin-bottom: 8px;
}

.shop-weapon-badge {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  font-size: 20px;
  color: #9ad8ff;
  background: rgba(106, 190, 255, 0.1);
  border-radius: 50%;
}

.shop-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.shop-item.legendary {
  border-color: rgba(255, 176, 42, 0.6);
  background: rgba(255, 176, 42, 0.07);
}

.shop-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.shop-info strong {
  color: var(--text);
}

.shop-info .shop-detail {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-detail {
  font-size: 11px;
  color: var(--muted);
}

.shop-item .shop-buy {
  flex: none;
  width: auto;
  padding: 6px 12px;
  font-size: 13px;
}

.shop-buy:disabled {
  opacity: 0.45;
  cursor: default;
}

.shop-owned {
  font-size: 12px;
  font-weight: 700;
  color: #4ade6a;
}

@media (max-width: 560px) {
  .shop-items {
    grid-template-columns: 1fr;
  }
}

.picker-swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.picker-swatches .swatch-dot {
  width: 40px;
  height: 40px;
}

.picker-swatches .swatch.locked::after {
  font-size: 15px;
}

.picker-weapons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.picker-weapons .weapon-option span {
  min-height: 44px;
  font-size: 13px;
}

/* A group's name over its weapons, across the whole row. */
.weapon-group-title {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
}

.weapon-group-title:first-child {
  margin-top: 0;
}

/* A weapon not unlocked yet, among the others: dimmed and dashed, its
   name over ▶ (preview) and its price (buy). */
.weapon-locked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.015);
  border: 2px dashed var(--border);
  border-radius: 8px;
}

.weapon-locked:hover {
  border-color: rgba(106, 190, 255, 0.5);
}

.weapon-locked-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
  opacity: 0.8;
}

.weapon-locked-actions {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.weapon-locked-preview,
.weapon-locked-buy {
  padding: 2px 8px;
  font: 700 11px/1.3 system-ui, "Segoe UI", sans-serif;
  border-radius: 999px;
  cursor: pointer;
}

.weapon-locked-preview {
  color: #ffd27a;
  background: rgba(255, 176, 42, 0.12);
  border: 1px solid rgba(255, 176, 42, 0.45);
}

.weapon-locked-buy {
  color: #9ad8ff;
  background: rgba(106, 190, 255, 0.12);
  border: 1px solid rgba(106, 190, 255, 0.5);
}

.weapon-locked-preview:hover,
.weapon-locked-preview:focus-visible {
  background: rgba(255, 176, 42, 0.25);
}

.weapon-locked-buy:hover,
.weapon-locked-buy:focus-visible {
  background: rgba(106, 190, 255, 0.25);
}

/* Too few shards (or a guest): dimmed, but pressing it says why. */
.weapon-locked-buy.short,
.shop-buy.short {
  opacity: 0.5;
}

/* The Look popup's tabs: one choice, three (or four) kinds of skin. */
.picker-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.picker-tab {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: -1px;
  padding: 8px 14px;
  font: 700 13px/1.2 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}

.picker-tab:hover {
  color: var(--text);
}

.picker-tab[aria-selected="true"] {
  color: var(--accent);
  background: rgba(255, 201, 77, 0.06);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.picker-tab:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

/* How many weapons a Weapon popup tab holds; yours in green. */
.picker-tab-count {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
}

.weapon-tab-owned .picker-tab-count {
  color: #4ade6a;
}

/* The tab holding what's worn. */
.picker-tab-worn {
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  color: #4ade6a;
}

.picker-sale-title {
  margin: 18px 0 6px;
}

.picker-empty {
  margin: 0;
}

@media (max-width: 560px) {
  .picker-tab {
    padding: 8px 9px;
    font-size: 12px;
    letter-spacing: 0;
  }
}

/* Pinned to the bottom of the scrolling list, so what you hover shows
   wherever you've scrolled to (covering the list's bottom padding). */
.picker-description {
  position: sticky;
  bottom: -24px;
  z-index: 1;
  min-height: 2.7em;
  margin: 14px -24px -24px;
  padding: 10px 24px 14px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
  background: #10131a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-description strong {
  color: var(--text);
}

@media (max-width: 560px) {
  .picker-weapons {
    grid-template-columns: repeat(2, 1fr);
  }
}

.swatch {
  position: relative;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch-dot {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--helmet) 0 45%, var(--uniform) 46%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s, box-shadow 0.1s;
}

.swatch:hover .swatch-dot {
  transform: scale(1.12);
}

/* The radiant skin (admins): its colors racing across the swatch, pulsing
   and glowing. */
.swatch-dot.radiant {
  background-size: 300% 300%;
  animation: radiant-flow 1s linear infinite, radiant-pulse 0.4s ease-in-out infinite alternate;
}

.swatch-dot.radiant::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  filter: blur(6px);
  opacity: 0.55;
  z-index: -1;
}

@keyframes radiant-pulse {
  from { filter: brightness(0.8); }
  to { filter: brightness(1.25); }
}

@keyframes radiant-flow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .swatch-dot.radiant {
    animation: none;
  }
}

.swatch input:checked + span {
  box-shadow: 0 0 0 2px #0c0f16, 0 0 0 4px var(--accent);
  transform: scale(1.12);
}

.swatch input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.weapon-option {
  position: relative;
  display: flex;
  cursor: pointer;
}

.weapon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Fills the grid cell so every button in a row is the same height, with
   the label centered even when it wraps. */
.weapon-option span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 3px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.weapon-option:hover span {
  color: var(--text);
}

/* A weapon you own, in the Weapon popup: bright, a green tick in its
   corner (locked ones are dimmed and dashed, .weapon-locked). */
.picker-weapons .weapon-option.owned span {
  color: var(--text);
  background: rgba(74, 222, 106, 0.05);
  border-color: rgba(74, 222, 106, 0.35);
}

.picker-weapons .weapon-option.owned::after {
  content: '✓';
  position: absolute;
  top: 3px;
  right: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #4ade6a;
  pointer-events: none;
}

/* (The one picked stays gold.) */
.picker-weapons .weapon-option.owned input:checked + span {
  color: var(--accent);
  background: rgba(255, 201, 77, 0.08);
  border-color: var(--accent);
}

.picker-weapons .picker-empty {
  grid-column: 1 / -1;
}

.weapon-option input:checked + span {
  color: var(--accent);
  background: rgba(255, 201, 77, 0.08);
  border-color: var(--accent);
}

.weapon-option input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* New game / Continue switch, styled like the weapon buttons. */

#nickname-input:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

/* Why joining didn't work (e.g. the server was full). */
.start-notice {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ffb4a8;
  background: rgba(217, 55, 43, 0.15);
  border: 1px solid rgba(217, 55, 43, 0.45);
  border-radius: 8px;
}

.start-notice[hidden] {
  display: none;
}

#weapon-description {
  min-height: 1.3em;
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

#weapon-description strong {
  color: var(--text);
  font-weight: 700;
}


#nickname-input {
  padding: 14px 16px;
  font: inherit;
  font-size: 17px;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s;
}

#nickname-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

#nickname-input:focus {
  border-color: var(--accent);
}

.play-button {
  padding: 14px 16px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  color: #1a1205;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}

.play-button:hover {
  background: var(--accent-strong);
}

.play-button:active {
  transform: scale(0.97);
}

/* A quieter outlined button next to a main one (Continue, New game). */
.secondary-button {
  padding: 12px 16px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(255, 201, 77, 0.06);
  border: 2px solid var(--accent);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}

.bestiary-button {
  width: 100%;
  margin-top: 12px;
  font-size: 14px;
}

.start-extras {
  display: flex;
  gap: 10px;
}


/* A quiet text link under the Bestiary button. */
.credits-link {
  display: block;
  margin: 12px auto 0;
  padding: 2px 6px;
  font: 600 13px/1.4 system-ui, "Segoe UI", sans-serif;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credits-link:hover,
.credits-link:focus-visible {
  color: var(--accent);
}

/* Account bar above the name field: log in / sign up, or who's playing. */
.account-bar {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.account-bar strong {
  color: var(--text);
}

.account-link {
  display: inline;
  margin: 0;
  padding: 0;
}

/* How many friend requests / unread letters wait (account bar). */
.account-badge {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #10131a;
  background: var(--accent);
  border-radius: 8px;
}

/* A logged-in player's name (leaderboards, chat, online list, account
   bar): green, like the online dot. */
.verified-mark {
  color: #4ade6a;
  font-weight: 700;
}

/* "(admin)" after an admin's name (the all-time board, profiles), in the
   admin color (ADMIN_COLOR in adminStyle.js). */
.admin-tag {
  flex: none;
  font-size: 0.85em;
  font-weight: 600;
  white-space: pre;
  color: #ff5c5c;
}

#profile-title .admin-tag {
  font-size: 0.6em;
  letter-spacing: 1px;
}

/* Colors earned with achievements, not yet earned: dimmed with a lock. */
.swatch.locked {
  cursor: not-allowed;
}

.swatch.locked span {
  opacity: 0.35;
}

.swatch.locked:hover span {
  transform: none;
}

/* Logged in: a gold ring around a locked one fills up with progress
   toward its achievement (--progress, 0-1; startScreen.js). */
.swatch.has-progress::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--progress) * 1turn), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  pointer-events: none;
}

.swatch.locked::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  pointer-events: none;
}

/* "Settings · Credits" under the Bestiary button. */
.start-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.start-links .credits-link {
  margin: 0;
}

/* What's new: the changelog at the top of the left panel; it scrolls. */
/* How to play (newcomers): the game in five lines, above What's new
   (which gets shorter meanwhile, so the screen still fits). */
.how-to-play {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.how-to-play[hidden] {
  display: none;
}

.how-to-play-list {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

.how-to-play-list li + li {
  margin-top: 3px;
}

.how-to-play-list strong {
  color: var(--text);
}

.how-to-play:not([hidden]) + .changelog .changelog-list {
  max-height: 90px;
}

.changelog {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.changelog-list {
  max-height: 190px;
  overflow-y: auto;
  padding-right: 6px;
  outline: none;
}

.changelog-list::-webkit-scrollbar {
  width: 6px;
}

.changelog-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.changelog-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.changelog-date:not(:first-child) {
  margin-top: 12px;
}

.changelog-new {
  padding: 1px 6px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #10131a;
  background: var(--accent);
  border-radius: 999px;
}

.changelog-notes {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.changelog-notes li + li {
  margin-top: 3px;
}

/* The controls: a compact two-column key list (the full explanation is in
   each row's tooltip). */
.control-keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.control-keys li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  cursor: help;
}

.control-keys li.wide {
  grid-column: 1 / -1;
}

.control-keys-art {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 86px;
}

/* Tighter main and records panels on the start screen. */
#start-screen #nickname-input {
  padding: 10px 14px;
  font-size: 16px;
}

#start-screen .play-button {
  padding: 11px 16px;
}

#start-screen .bestiary-button {
  margin-top: 9px;
  padding: 9px 16px;
}

#start-screen .start-links {
  margin-top: 8px;
}

/* The left panel: What's new takes the height the controls leave (the
   panels are as tall as the tallest one) and scrolls inside it. */
#start-screen .controls-panel:not(.records-panel) {
  display: flex;
  flex-direction: column;
}

#start-screen .changelog {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

#start-screen .changelog-list {
  flex: 1 1 0;
  max-height: none;
}

/* One line per run in the records and the all-time top 10, numbered. */
#start-screen .records-runs {
  padding-left: 0;
  counter-reset: run;
  list-style: none;
}

#start-screen .records-runs li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  font-size: 12.5px;
}

#start-screen .records-runs li::before {
  counter-increment: run;
  content: counter(run) '.';
  flex: none;
  min-width: 18px;
  color: var(--muted);
}

#start-screen .records-runs li.records-empty::before {
  content: none;
}

/* (Its numbers are drawn by ::before here, not as list markers.) */
#start-screen #hall-of-fame .records-empty {
  margin-left: 0;
}

#start-screen .records-runs .records-run-name {
  flex: 1;
  min-width: 0;
}

#start-screen .records-run-detail {
  flex: none;
  white-space: nowrap;
}

#start-screen .records-best {
  padding: 6px 10px;
}

#start-screen .records-best strong {
  font-size: 18px;
}

#start-screen .records-totals {
  margin: 6px 0 8px;
}

#start-screen .records-bests {
  gap: 6px;
}

#start-screen .records-best span {
  font-size: 11.5px;
}

#start-screen #hall-of-fame {
  margin-bottom: 16px;
}

/* Touch screens get thumb help instead of the keyboard list. */
.touch-help {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.touch-help strong {
  color: var(--text);
}

.touch .touch-help {
  display: block;
}

.touch .control-keys {
  display: none;
}

/* The controls' tabs (mouse & keys / controller, controlsTabs.js) take
   the title's place; touch screens keep the title and their thumb help. */
.touch-only-title {
  display: none;
}

.touch .touch-only-title {
  display: block;
}

.touch .controls-tabs {
  display: none;
}

.control-keys .pad-note {
  cursor: default;
}

/* All-time board names: the text shortens if it must, the ✓ stays. */
#start-screen #hall-of-fame .records-run-name {
  display: flex;
  min-width: 0;
}

#hall-of-fame .records-run-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#hall-of-fame .verified-mark {
  flex: none;
  white-space: pre;
}

/* The leaderboards' tabs (all-time / challenge), in the title's place. */
.board-tabs {
  display: flex;
  gap: 2px;
  margin: 0 0 10px;
}

.board-tab {
  padding: 4px 6px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

/* The leaderboards' five tabs: a little tighter, wrapping on a narrow
   panel rather than running past it. */
.board-tabs[aria-label="Leaderboards"] {
  flex-wrap: wrap;
}

.board-tabs[aria-label="Leaderboards"] .board-tab {
  padding: 4px 5px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.board-tab:hover {
  color: var(--text);
}

.board-tab.active {
  color: var(--accent);
  border-color: rgba(255, 201, 77, 0.45);
  background: rgba(255, 201, 77, 0.08);
}

/* The challenge, under Play: its own color so it reads as an event. */
.challenge-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  padding: 9px 14px 8px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 1px;
  color: #7ef0dc;
  background: rgba(60, 220, 190, 0.08);
  border: 2px solid #3cdcbe;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.challenge-weapon {
  font: 600 12px/1.2 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.5px;
  color: #b8f7ea;
}

.challenge-button:hover:not(:disabled) {
  background: rgba(60, 220, 190, 0.18);
}

.challenge-button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* A guest's: ready-looking, opening the login (challenge.js). */
.challenge-button.needs-login .challenge-weapon {
  color: var(--muted);
}

.challenge-line {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.challenge-line .legal-link {
  color: #7ef0dc;
}

/* Who's online (onlineList.js), on the far left: as tall as the panels
   beside it, the list scrolling inside; wide enough for a long name with
   its badges and where they are on one line each (fitStartScreen scales
   the whole layout down to fit the window). */
.online-panel {
  display: flex;
  flex-direction: column;
  width: 300px;
  padding-left: 18px;
  padding-right: 16px;
}

.online-count {
  margin-left: 4px;
  font-size: 15px;
  color: var(--muted);
}

/* Online players, then the offline accounts: one list that scrolls. */
.online-scroll {
  flex: 1 1 0;
  min-height: 0;
  padding-right: 4px;
  overflow-y: auto;
}

.online-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.online-subtitle {
  margin: 16px 0 4px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--muted);
}

/* Find a player: over the list. */
.online-search {
  flex: none;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 14px;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 8px;
}

/* OFFLINE: a header that opens and closes the offline accounts. */
.offline-toggle {
  display: flex;
  align-items: baseline;
  gap: 4px;
  width: 100%;
  padding: 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.offline-toggle:hover {
  color: var(--text);
}

.offline-toggle .offline-arrow {
  display: inline-block;
  transition: transform 0.15s;
}

.offline-toggle.open .offline-arrow {
  transform: rotate(90deg);
}

#offline-list .online-name {
  color: #c4cad6;
}

.online-row {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.online-name {
  display: flex;
  min-width: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  white-space: nowrap;
}

button.online-name {
  cursor: pointer;
}

button.online-name:hover .online-name-text {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.online-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-name .verified-mark {
  flex: none;
  white-space: pre;
}

.online-where {
  font-size: 11.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.online-row.in-menu .online-name {
  color: var(--muted);
}

.online-guests {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Stacked (phones): after the rest. */
@media (max-width: 830px), (pointer: coarse) and (max-height: 600px) {
  .start-layout > .online-panel {
    order: 1;
    width: 100%;
    max-width: 410px;
  }

  .online-scroll {
    flex: none;
    max-height: 360px;
  }
}

.online-dead {
  font-weight: 800;
  color: #ff5a4a;
}

.online-row.dead .online-name-text {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 90, 74, 0.8);
}

/* (A thin, dark scrollbar, like the leaderboard's.) */
.online-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.online-scroll::-webkit-scrollbar {
  width: 6px;
}

.online-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Online vs offline at a glance: online rows have a glowing green dot
   (red if dead) and a faint green wash, under a green ONLINE; offline
   ones a hollow grey ring and a dimmed name, under a grey OFFLINE. */
.online-title,
.online-title .online-count {
  color: #4ade6a;
}

.offline-title,
.offline-title .online-count {
  color: #6b7280;
}

.online-dot {
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  box-sizing: border-box;
  border-radius: 50%;
}

.online-row.is-online {
  margin: 2px 0;
  padding: 5px 6px;
  border-bottom: none;
  border-radius: 6px;
  background: rgba(74, 222, 106, 0.08);
}

.online-row.is-online .online-dot {
  background: #4ade6a;
  box-shadow: 0 0 6px rgba(74, 222, 106, 0.8);
}

.online-row.is-online.dead {
  background: rgba(255, 74, 58, 0.08);
}

.online-row.is-online.dead .online-dot {
  background: #ff4a3a;
  box-shadow: 0 0 6px rgba(255, 74, 58, 0.8);
}

.online-row.is-online .online-where {
  padding-left: 15px;
}

/* Where they play, by mode. */
.online-row.is-online .online-where.mode-dungeon {
  color: #8fb8e8;
}

.online-row.is-online .online-where.mode-daily {
  color: #ffc94a;
  font-weight: 700;
}

.online-row.is-online .online-where.mode-pvp {
  color: #ff8a7a;
}

.online-row.is-online .online-where.mode-test {
  color: #b48cff;
}

.online-row.is-offline .online-dot {
  border: 1.5px solid #6b7280;
}

.online-row.is-offline .online-name-text,
.online-row.is-offline .verified-mark {
  opacity: 0.6;
}

.online-row.is-offline .online-where {
  padding-left: 15px;
  color: #6b7280;
}

/* The dungeon (PLAY, co-op) and PvP side by side, each with a line under
   its name (the Tower's counts down while a cooldown runs). */
.mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* "Choose lobby…" under PLAY (PLAY itself is Quick Play). */
#start-screen .lobby-link {
  grid-column: 1 / -1;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  white-space: nowrap;
}

#start-screen .lobby-link:hover:not(:disabled) {
  background: rgba(255, 201, 77, 0.14);
}

#start-screen .lobby-link:disabled {
  opacity: 0.45;
  cursor: default;
}

.mode-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.mode-sub {
  font: 600 11px/1.2 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.3px;
  opacity: 0.75;
  white-space: nowrap;
}

.arena-button {
  color: #fff;
  background: #e0473d;
}

.arena-button:hover:not(:disabled) {
  background: #f05a4f;
}


/* Not open yet: a dimmed red, not the grey of a Play on cooldown. */
.arena-button:disabled,
.arena-button:disabled:hover {
  color: #f3a49d;
  background: rgba(224, 71, 61, 0.16);
  cursor: default;
  transform: none;
}

/* A skin's or weapon's live preview (preview.js), over the Shop. */
.preview-window {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 6, 10, 0.75);
}

.preview-window[hidden] {
  display: none;
}

.preview-panel {
  width: 588px;
}

.preview-canvas {
  display: flex;
  justify-content: center;
  padding: 0 24px 24px;
}

.preview-canvas canvas {
  max-width: 100%;
  height: auto !important;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.shop-preview {
  align-self: flex-start;
  margin-top: 6px;
  padding: 4px 10px;
  font: 700 12px/1.2 system-ui, "Segoe UI", sans-serif;
  color: #ffd27a;
  background: rgba(255, 176, 42, 0.12);
  border: 1px solid rgba(255, 176, 42, 0.45);
  border-radius: 999px;
  cursor: pointer;
}

.shop-preview:hover,
.shop-preview:focus-visible {
  background: rgba(255, 176, 42, 0.25);
}

.shop-previewable {
  cursor: pointer;
}

/* New players (startScreen.js setSimpleView): only the logo, the name and
   one big PLAY, with the game showing through; More options shows the rest. */
.more-options {
  display: none;
}

#start-screen.first-visit {
  background: radial-gradient(ellipse at center, rgba(5, 6, 10, 0.2), rgba(5, 6, 10, 0.6));
}

#start-screen.first-visit .controls-panel,
#start-screen.first-visit .social-corner,
#start-screen.first-visit .loadout,
#start-screen.first-visit #weapon-description,
#start-screen.first-visit #pvp-button,
#start-screen.first-visit #dungeon-button,
#start-screen.first-visit #challenge-button,
#start-screen.first-visit #challenge-line,
#start-screen.first-visit #deal-banner,
#start-screen.first-visit .start-extras,
#start-screen.first-visit #credits-button {
  display: none;
}

#start-screen.first-visit .more-options {
  display: block;
}

#start-screen.first-visit .mode-buttons {
  grid-template-columns: 1fr;
}

#start-screen.first-visit #play-button {
  padding-top: 16px;
  padding-bottom: 16px;
}

#start-screen.first-visit #play-button .mode-name {
  font-size: 1.6em;
}

/* The simple view's How to play, under PLAY: three short lines (the
   mouse or the touch one). Only in the simple view. */
.first-steps {
  display: none;
  margin: 12px 0 0;
  padding: 10px 14px;
  text-align: left;
  background: rgba(10, 12, 18, 0.72);
  border: 1px solid var(--border);
  border-radius: 10px;
}

#start-screen.first-visit .first-steps {
  display: block;
}

.first-steps-title {
  margin: 0 0 4px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--accent);
}

.first-steps-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.first-steps-list strong {
  color: var(--text);
}

.first-steps-list .touch-only,
.touch .first-steps-list .mouse-only {
  display: none;
}

.touch .first-steps-list .touch-only {
  display: list-item;
}

/* The daily deal (startScreen.js): a banner under the challenge, glowing
   gold and pulsing so it's seen; a SALE tag on the Shop button; the deal
   weapon first in the Shop with a ribbon and its old price struck
   through; a badge in the Weapon list. */
.deal-banner {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
  padding: 3px 10px;
  font-size: 12px;
  overflow: hidden;
  color: #fff3d0;
  background: linear-gradient(135deg, rgba(255, 90, 40, 0.28), rgba(255, 200, 60, 0.22));
  border: 1px solid #ffb02a;
  border-radius: 8px;
  cursor: pointer;
  animation: deal-glow-small 1.8s ease-in-out infinite alternate;
}

@keyframes deal-glow-small {
  0% { box-shadow: 0 0 2px rgba(255, 176, 42, 0.25); }
  100% { box-shadow: 0 0 8px rgba(255, 140, 42, 0.5); }
}

.deal-banner[hidden] {
  display: none;
}

.deal-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: deal-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

.deal-banner:hover {
  border-color: #ffd84a;
  background: linear-gradient(135deg, rgba(255, 90, 40, 0.38), rgba(255, 200, 60, 0.3));
}

.deal-top {
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #ff8a4a;
}

.deal-name {
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: #ffd84a;
}

.deal-price s,
.deal-was {
  color: rgba(255, 255, 255, 0.5);
  text-decoration-thickness: 2px;
  text-decoration-color: #ff4a3a;
}

.deal-price b {
  font-size: 12px;
  color: #ffffff;
}

.deal-ends {
  font-size: 11px;
  color: rgba(255, 240, 210, 0.75);
}

@keyframes deal-glow {
  0% { box-shadow: 0 0 6px rgba(255, 176, 42, 0.35); }
  100% { box-shadow: 0 0 20px rgba(255, 140, 42, 0.75); }
}

@keyframes deal-shine {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.shop-sale {
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  background: #ff3a2a;
  border-radius: 6px;
  animation: deal-pulse 1.1s ease-in-out infinite alternate;
}

.shop-sale[hidden] {
  display: none;
}

@keyframes deal-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 58, 42, 0); }
  100% { transform: scale(1.08); box-shadow: 0 0 10px rgba(255, 58, 42, 0.8); }
}

.shop-item.deal {
  position: relative;
  border-color: #ffb02a;
  box-shadow: 0 0 14px rgba(255, 176, 42, 0.45);
  animation: deal-glow 1.6s ease-in-out infinite alternate;
}

.deal-ribbon {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 8px;
  font-family: "Russo One", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  color: #ffffff;
  background: #ff3a2a;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.deal-badge {
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: #ff3a2a;
  border-radius: 5px;
}

.weapon-locked.deal {
  background: rgba(255, 176, 42, 0.12);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 176, 42, 0.6);
}

/* The admin test lobby (lobbyPicker.js, admins only). */
.lobby-test {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 196, 80, 0.5);
  border-radius: 8px;
  font-size: 13px;
}

.lobby-test-title {
  font-weight: 700;
  color: #ffc450;
}

.lobby-test-floors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
}

.lobby-test-floor {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 196, 80, 0.35);
  border-radius: 6px;
  background: rgba(255, 196, 80, 0.06);
  color: #e8e2d4;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.lobby-test-floor strong {
  font-size: 13px;
  color: #ffc450;
}

.lobby-test-floor:hover,
.lobby-test-floor:focus-visible {
  background: rgba(255, 196, 80, 0.18);
  border-color: #ffc450;
}

.lobby-test-boss {
  color: #c99;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
