.screen { padding: 18px 0 28px; }
.hero-block { text-align: center; margin-bottom: 16px; }
.title-block { padding-top: 18px; }
.title-icon { font-size: 3rem; line-height: 1; margin-bottom: 8px; }
.title-credit { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 18px; }
.hero-block h1 { font-size: 2.2rem; margin: 0 0 8px; }
.hero-block h2 { font-size: 1.6rem; margin: 0 0 8px; }
.hero-block p { color: var(--text-muted); }

.lobby-card { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.lobby-card h3 { margin: 0 0 6px; }
.lobby-card input {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.95rem;
}
.error-text { color: #e5484d; text-align: center; margin-top: 16px; min-height: 1.2em; }
.room-code { font-family: var(--mono); letter-spacing: 0.1em; color: var(--accent); }

#waiting-players { display: flex; flex-direction: column; gap: 8px; }
.waiting-player { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 0.92rem; display: flex; justify-content: space-between; }

.turn-banner {
  text-align: center; font-weight: 800; font-size: 1.05rem;
  padding: 12px 16px; border-radius: 12px; margin: 0 0 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.turn-banner.mine { background: var(--accent-grad); color: #fff; }
.turn-banner.theirs { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.turn-banner.locked { background: var(--border); color: var(--text-muted); }

.players-strip { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.player-chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elevated); font-size: 0.9rem; display: flex; gap: 8px; align-items: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.player-chip.active-turn {
  background: var(--accent-grad); color: #fff; border-color: transparent;
  font-weight: 700; transform: scale(1.05);
}
.group-icon { font-size: 1.15rem; line-height: 1; display: inline-flex; align-items: center; }
.group-tag { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.player-chip.active-turn .group-tag { color: rgba(255, 255, 255, 0.85); }

.foul-banner {
  text-align: center; color: #e5484d; font-weight: 700; margin: 0 0 12px;
  padding: 8px; border-radius: 10px; background: color-mix(in srgb, #e5484d 12%, transparent);
}

.abandoned-banner {
  text-align: center; margin: 0 0 16px; padding: 16px; border-radius: 12px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.abandoned-banner p { margin: 0; color: var(--text-muted); font-weight: 600; }

.power-meter {
  max-width: 600px; margin: 0 auto 10px; height: 10px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.power-meter-fill { height: 100%; width: 0%; background: var(--accent-grad); transition: width 0.05s linear; }

.pool-table-wrap { display: flex; justify-content: center; }
#table {
  /* Wider cap than the logical 600x300 physics/coordinate space so the
     table actually fills a laptop screen instead of sitting in a fixed
     600px box — draw() rescales the canvas backing store to match
     (devicePixelRatio-aware), so this stays crisp instead of blurry. */
  width: 100%; max-width: 900px; aspect-ratio: 600 / 300; border-radius: 8px;
  box-shadow: var(--shadow); touch-action: none; cursor: pointer;
}

#result-title { font-size: 1.8rem; }
