:root {
  --paper: #f7f3e8;
  --ink: #26262b;
  --soft: #6b6b75;
  --font: 'Patrick Hand', 'Comic Sans MS', cursive;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  user-select: none;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: none;
}

.hidden {
  display: none !important;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(247, 243, 232, 0.55);
}
.overlay.clear {
  background: rgba(247, 243, 232, 0.2);
}

/* hand-drawn boxes */
.card,
button,
#code {
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: rgba(250, 247, 238, 0.95);
}

.card {
  width: min(460px, 100%);
  padding: 20px 28px 22px;
  text-align: center;
  transform: rotate(-1deg);
}
.card h1 {
  margin: 0 0 8px;
  font-size: 54px;
  font-weight: normal;
  line-height: 1.05;
}
.card p {
  font-size: 20px;
  color: var(--soft);
}
.card b {
  color: var(--ink);
  font-weight: normal;
  text-decoration: underline;
}
.small {
  font-size: 16px !important;
  margin: 2px 0;
}
.msg {
  min-height: 1.2em;
  margin: 10px 0 0;
  color: #c0392b !important;
}
#lobby-wait {
  color: var(--soft) !important;
}
.keys {
  font-size: 15px !important;
  margin: 10px 0 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.row {
  display: flex;
  gap: 10px;
}
.row.center {
  justify-content: center;
  margin-top: 14px;
}

input {
  font: inherit;
  color: var(--ink);
  outline: none;
}
#name {
  width: 100%;
  font-size: 24px;
  text-align: center;
  padding: 4px;
  border: none;
  border-bottom: 2px solid var(--ink);
  background: transparent;
}
#code {
  width: 120px;
  font-size: 24px;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  padding: 4px 6px;
}
.row #join {
  flex: 1;
}

button {
  font: inherit;
  font-size: 24px;
  padding: 5px 22px;
  cursor: pointer;
  color: var(--ink);
}
button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.soft {
  font-size: 20px;
  border-style: dashed;
}
button.tiny {
  font-size: 16px;
  padding: 1px 10px;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#lobby-code {
  font-size: 56px;
  letter-spacing: 8px;
  line-height: 1;
}

#lobby-list,
#over-ready {
  list-style: none;
  padding: 0;
  margin: 12px 0 4px;
  font-size: 22px;
  line-height: 1.3;
}
