html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-color: #0f0f0f;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: sans-serif;
}

#game-container {
  width: 100vw;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.lobby {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 48px 24px;
  color: #fff8e8;
  text-align: center;
  background: radial-gradient(circle at top, #6e3420, #17100d 65%);
}

.logo {
  width: min(220px, 65vw);
  margin-bottom: 8px;
}

#game-back {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 30;
}

h1 {
  margin: 0;
  font-size: 42px;
}

.subtitle {
  color: #f5c778;
}

.panel {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  margin: 32px auto 0;
  padding: 24px;
  box-sizing: border-box;
  border: 1px solid #b66a35;
  border-radius: 16px;
  background: #29150fdd;
}

label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

input, select, button {
  box-sizing: border-box;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d8934d;
  font: inherit;
}

button {
  cursor: pointer;
  color: #2b160d;
  background: #f5c778;
  font-weight: bold;
}

button:hover {
  background: #ffe0a0;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row button {
  flex: 1;
}

.status {
  min-height: 24px;
  color: #f5c778;
}

@media (max-width: 520px) {
  .lobby {
    min-height: 100dvh;
    height: auto;
    padding: 24px 12px 40px;
  }

  h1 {
    font-size: 32px;
  }

  label {
    align-items: stretch;
    flex-direction: column;
  }
}
