* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #080d12; }
body { position: relative; font-family: Inter, "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #f4f7fb; }
/* Author styles like .lobby{display:grid} and #roomActions{display:flex} beat the UA [hidden] rule; restore it. */
[hidden] { display: none !important; }
canvas { position: absolute; display: block; image-rendering: pixelated; }
.lobby { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; background: rgba(8, 13, 18, .94); }
.lobby-panel { width: min(560px, calc(100% - 32px)); padding: 36px; border: 1px solid #344452; background: #121a24; box-shadow: 0 18px 60px rgba(0,0,0,.45); }
.lobby { overflow-y: auto; padding: 16px; }
.lobby-panel { width: min(560px, 100%); margin: auto; }
.skin-picker { min-width: 0; padding: 0; margin: 0 0 20px; border: 0; }
.skin-picker legend { margin-bottom: 8px; padding: 0; color: #c7d0db; font-size: 13px; }
.skin-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #465765; border-radius: 4px; overflow: hidden; }
.skin-option { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin: 0; padding: 8px 4px; background: #0b1117; cursor: pointer; border-right: 1px solid #465765; }
.skin-option:last-child { border-right: 0; }
.skin-option input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; margin: 0; }
.skin-option img { flex: 0 0 32px; image-rendering: pixelated; }
.skin-option:has(input:checked) { background: #17382f; box-shadow: inset 0 -3px #32d583; color: #fff; }
.skin-option:has(input:focus-visible) { outline: 2px solid #ffd166; outline-offset: -3px; }
.skin-option.unavailable { color: #8996a2; cursor: not-allowed; }
.skin-status { display: block; margin-top: 3px; font-size: 11px; }
@media (max-width: 480px) {
  .lobby-panel { padding: 20px; }
  .skin-option { gap: 4px; }
  .skin-option img { width: 24px; height: 24px; flex-basis: 24px; }
}
.eyebrow { color: #32d583; font: 700 12px/1.2 "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; letter-spacing: 1px; }
h1 { margin: 14px 0 8px; font-size: clamp(30px, 5vw, 52px); }
.lede { color: #a9b4c0; line-height: 1.5; }
label { display: grid; gap: 8px; margin: 20px 0; color: #c7d0db; font-size: 13px; }
input { width: 100%; border: 1px solid #465765; background: #0b1117; color: #fff; padding: 11px 12px; font: inherit; }
.actions, #roomActions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button, .actions a { border: 0; background: #32d583; color: #07110c; padding: 11px 15px; font: 700 13px "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; cursor: pointer; text-decoration: none; }
button.secondary, .actions a { background: #293744; color: #e7edf3; }
button:hover, .actions a:hover { filter: brightness(1.12); }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.roster-title { margin: 16px 0 8px; color: #c7d0db; font-size: 13px; }
#playerSlots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#playerSlots li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #344452; background: #0b1117; font-size: 13px; }
#playerSlots .empty { color: #8c98a6; }
#playerSlots .ready { color: #32d583; }
#preconnectStatus, #lobbyStatus { min-height: 24px; margin: 0; color: #ffd166; font-size: 12px; line-height: 1.35; word-break: break-word; }
#onlineChrome { position: absolute; z-index: 4; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 8px; background: rgba(18, 26, 36, .92); border: 1px solid #344452; overflow: hidden; pointer-events: auto; }
#onlineChrome.compact { padding: 6px; gap: 6px; }
#onlineChrome.compact #lobbyStatus { font-size: 11px; }
#onlineChrome.compact button { padding: 7px 8px; font-size: 10px; line-height: 1.2; white-space: normal; text-align: center; }
#onlineChrome #roomActions { flex-direction: column; align-items: stretch; width: 100%; }
#onlineChrome #roomActions button { width: 100%; }
