/* The party kit lobby. Plain on purpose: a game themes it through these variables. */
.pk-lobby {
  --pk-bg: #f4ead2;
  --pk-ink: #1c1410;
  --pk-soft: #6b5a48;
  --pk-line: #cdbb97;
  --pk-accent: #9c2b20;
  --pk-accent-ink: #fff6e2;
  --pk-font: Georgia, "Times New Roman", serif;
  --pk-display: var(--pk-font);
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 12, 20, 0.62);
  font-family: var(--pk-font);
  color: var(--pk-ink);
  overflow: auto;
}
.pk-lobby[hidden] {
  display: none;
}
.pk-card {
  width: min(100%, 460px);
  background: var(--pk-bg);
  border: 1px solid var(--pk-line);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  padding: 22px 22px 18px;
}
.pk-card.pk-screen {
  width: min(100%, 760px);
}
.pk-title {
  margin: 0;
  font: 400 30px/1.1 var(--pk-display);
  letter-spacing: 0.01em;
}
.pk-sub {
  margin: 4px 0 16px;
  color: var(--pk-soft);
}
.pk-form {
  display: grid;
  gap: 12px;
}
.pk-label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  color: var(--pk-soft);
}
.pk-input {
  font: 20px/1.2 var(--pk-font);
  color: var(--pk-ink);
  padding: 12px 12px;
  min-height: 50px;
  border: 1px solid var(--pk-line);
  border-radius: 7px;
  background: #fffaf0;
  width: 100%;
  box-sizing: border-box;
}
.pk-pin-input {
  letter-spacing: 0.4em;
  font-variant-numeric: tabular-nums;
}
.pk-input:focus-visible,
.pk-btn:focus-visible {
  outline: 3px solid var(--pk-accent);
  outline-offset: 2px;
}
.pk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pk-btn {
  flex: 1 1 auto;
  min-height: 50px;
  padding: 10px 18px;
  font: 18px/1.1 var(--pk-font);
  color: var(--pk-ink);
  background: transparent;
  border: 1.5px solid var(--pk-ink);
  border-radius: 7px;
  cursor: pointer;
  touch-action: manipulation;
}
.pk-btn.pk-primary {
  background: var(--pk-accent);
  border-color: var(--pk-accent);
  color: var(--pk-accent-ink);
}
.pk-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.pk-btn.pk-quiet {
  border-color: transparent;
  color: var(--pk-soft);
  font-size: 15px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pk-btn.pk-small {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 14px;
}
.pk-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 7px;
  background: #f6d9cf;
  color: #7a1d12;
  font-size: 15px;
}
.pk-error[hidden] {
  display: none;
}
/* The bot check before making a room. Turnstile draws it only when it needs a click. */
.pk-botcheck {
  display: flex;
  justify-content: center;
}
.pk-botcheck[hidden] {
  display: none;
}
.pk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.pk-pin-label {
  font-size: 14px;
  color: var(--pk-soft);
}
.pk-pin {
  font: 400 64px/1 var(--pk-display);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.pk-screen .pk-pin {
  font-size: 104px;
}
.pk-pin-hint {
  margin-top: 6px;
  font-size: 14px;
  color: var(--pk-soft);
  word-break: break-all;
}
.pk-qr {
  flex: 0 0 auto;
  border-radius: 6px;
  border: 1px solid var(--pk-line);
}
.pk-screen .pk-qr {
  width: 200px;
  height: 200px;
}
.pk-seats {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pk-screen .pk-seats {
  grid-template-columns: 1fr 1fr;
}
.pk-seat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--pk-line);
  border-left: 8px solid var(--pk-seat);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.45);
  min-height: 60px;
  box-sizing: border-box;
}
.pk-seat.pk-empty {
  border-style: dashed;
  border-left-style: dashed;
  border-left-width: 1px;
  color: var(--pk-soft);
  background: transparent;
}
.pk-seat.pk-you {
  box-shadow: inset 0 0 0 1.5px var(--pk-ink);
}
.pk-character {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}
.pk-empty .pk-character {
  flex-basis: 0;
  width: 0;
}
.pk-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pk-seat);
  box-shadow: inset 0 -5px 8px rgba(0, 0, 0, 0.25), inset 0 3px 4px rgba(255, 255, 255, 0.35);
}
.pk-seat-text {
  flex: 1 1 auto;
  min-width: 0;
}
.pk-seat-name {
  font-size: 19px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pk-seat-state {
  font-size: 14px;
  color: var(--pk-soft);
}
.pk-ready .pk-seat-state {
  color: #2c6a3a;
  font-weight: 700;
}
.pk-note {
  margin: 12px 0 4px;
  font-size: 15px;
  color: var(--pk-soft);
}
.pk-toy {
  margin-top: 10px;
}
.pk-toy[hidden] {
  display: none;
}
@media (max-width: 420px) {
  .pk-card {
    padding: 16px 14px 12px;
  }
  .pk-pin {
    font-size: 52px;
  }
  .pk-qr {
    width: 104px;
    height: 104px;
  }
  /* Four seats, the buttons and the way out fit a small upright phone without scrolling. */
  .pk-head {
    margin-bottom: 10px;
  }
  .pk-seats {
    gap: 6px;
    margin-bottom: 10px;
  }
  .pk-seat {
    min-height: 50px;
    padding: 4px 8px;
  }
  .pk-character {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }
  .pk-note {
    margin: 8px 0 0;
  }
}

/* A phone held sideways (a short, wide screen): the door and the waiting room lie down so they
   fit without scrolling. The door puts the two fields side by side; the waiting room puts the
   PIN and the buttons on the left and the seats on the right. */
@media (max-height: 520px) and (orientation: landscape) {
  .pk-lobby {
    padding: 8px 12px;
  }
  .pk-card,
  .pk-card.pk-screen {
    width: min(100%, 720px);
    padding: 12px 16px 8px;
  }
  .pk-title {
    font-size: 22px;
  }
  .pk-sub {
    margin: 2px 0 8px;
    font-size: 14px;
  }
  .pk-form {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .pk-form > .pk-botcheck,
  .pk-form > .pk-error,
  .pk-form > .pk-row {
    grid-column: 1 / -1;
  }
  .pk-label {
    gap: 3px;
    font-size: 13px;
  }
  .pk-input {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 18px;
  }
  .pk-btn {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 16px;
  }
  .pk-btn.pk-quiet {
    min-height: 40px;
    font-size: 14px;
  }
  .pk-room {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: 16px;
    align-items: start;
    align-content: start;
  }
  .pk-room > * {
    grid-column: 1;
  }
  .pk-room > .pk-seats {
    grid-column: 2;
    grid-row: 1 / span 6;
    margin: 0;
    gap: 6px;
    grid-template-columns: 1fr;
  }
  .pk-head {
    margin-bottom: 8px;
    gap: 10px;
  }
  .pk-pin,
  .pk-screen .pk-pin {
    font-size: 44px;
  }
  .pk-pin-label,
  .pk-pin-hint {
    font-size: 12px;
  }
  .pk-pin-hint {
    margin-top: 3px;
  }
  .pk-qr,
  .pk-screen .pk-qr {
    width: 88px;
    height: 88px;
  }
  .pk-seat {
    min-height: 48px;
    padding: 4px 8px;
    gap: 8px;
  }
  .pk-character {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
  .pk-disc {
    width: 26px;
    height: 26px;
  }
  .pk-seat-name {
    font-size: 16px;
  }
  .pk-seat-state {
    font-size: 12.5px;
  }
  .pk-note {
    margin: 6px 0 0;
    font-size: 13px;
  }
}
