html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #05050a;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  /* Mobile browsers (esp. Android Chrome) size 100vh to the viewport with
     the address bar hidden, taller than what's actually visible while it's
     shown - dvh tracks the real visible area instead. Kept vh above as a
     fallback for browsers without dvh support. */
  height: 100dvh;
}

#view {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* Positioned to sit right under the menu logo (20px top margin + 50vw
   square logo + 16px gap) - kept in sync with menu.js's logoRect()/
   contentTop() math rather than duplicating it via JS-set inline styles. */
/* display:none can't be transitioned, and the canvas-based scene transition
   (main.js) can't capture DOM content into its snapshot anyway - so this
   gets its own subtle fade/scale, timed to roughly match main.js's
   TRANSITION_DURATION (1s), instead of a hard show/hide cut. */
#player-bar {
  position: absolute;
  top: calc(36px + 50vw);
  left: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
}

#player-bar.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Color swatch + name field share one border/background now - a single
   combined control instead of two separate-looking elements. */
.player-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 4px;
}

.player-name {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #f5f5f5;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 16px;
  padding: 6px 10px 6px 2px;
  outline: none;
  touch-action: manipulation;
  user-select: text;
}

.color-swatch {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.player-score {
  min-width: 34px;
  flex-shrink: 0;
  text-align: center;
  color: #f5f5f5;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
}
