@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400..800&family=Paytone+One&display=swap");

body[data-showdown-play] {
  font-family: "DM Sans", system-ui, sans-serif;
}
body[data-showdown-play] :is(h1, h2, .brand, .title, #winner) {
  font-family: "Paytone One", "DM Sans", system-ui, sans-serif;
}
body[data-showdown-play] :is(button, input, select, textarea) {
  font-family: "DM Sans", system-ui, sans-serif;
}
body[data-showdown-play] a:not(:is(.btn, .join-brand, .join-nav-link)) {
  text-decoration: underline;
  text-decoration-thickness: .085em;
  text-underline-offset: .18em;
}
body:is([data-showdown-play="stage"], [data-showdown-play="caller"]) {
  background: linear-gradient(#122b5ce8, #0e1935f2), url("/tabletop-paper.jpg") center top / cover fixed, #122b5c;
}
body:is([data-showdown-play="join"], [data-showdown-play="solo"], [data-showdown-play="phone"]) {
  color: #14264a;
  background: linear-gradient(#eef7ff53, #eef7ff6b), url("/tabletop-paper.jpg") center top / cover fixed, #eef7ff;
  color-scheme: light;
}
body:is([data-showdown-play="join"], [data-showdown-play="solo"], [data-showdown-play="phone"]) :focus-visible {
  outline: 2px solid #245ac6;
  outline-offset: 3px;
}

body[data-showdown-play="join"] {
  --gold: #244dc4;
  --muted: #445979;
  --good: #244dc4;
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  line-height: 1.5;
}
[data-showdown-play="join"] *, [data-showdown-play="join"] *::before, [data-showdown-play="join"] *::after {
  box-sizing: border-box;
}
.join-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px max(14px, calc((100vw - 1100px) / 2));
  background: #fcfdff;
  border-bottom: 1px solid #c3d8f2;
}
.join-brand, .join-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.join-brand {
  font-family: "Paytone One", system-ui, sans-serif;
  font-size: clamp(1rem, 2.6vw, 1.28rem);
  color: #14264a;
  text-decoration: none;
}
.join-brand img { flex-shrink: 0; }
.join-nav-link, [data-showdown-play="join"] .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid #a4bee3;
  border-radius: 9px;
  background: #fcfdff;
  color: #1f4299;
  font-size: .94rem;
  font-weight: 800;
  text-decoration: none;
}
.join-nav-link:hover { background: #e7f1ff; }
.join-nav-active, [data-showdown-play="join"] .btn-gold {
  background: #244dc4;
  border-color: #193998;
  color: #fcfdff;
}
.join-nav-active:hover, [data-showdown-play="join"] .btn-gold:hover { background: #183790; }
[data-showdown-play="join"] .app {
  width: min(100% - 28px, 460px);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding-block: clamp(26px, 7svh, 72px);
}
.join-intro { text-align: center; }
.join-intro .title { font-size: clamp(2.2rem, 7vw, 3.7rem); line-height: 1.07; margin: 0 0 9px; }
.join-intro .sub { color: #3a4f70; margin: 0; }
[data-showdown-play="join"] .card {
  background: #fcfdff;
  border: 1px solid #a4bee3;
  border-radius: 18px;
  padding: clamp(14px, 4vw, 24px);
  box-shadow: 0 7px 0 #c5d9f4, 0 18px 40px #203e731d;
  min-width: 0;
}
[data-showdown-play="join"] .field { display: grid; gap: 6px; margin-bottom: 12px; min-width: 0; }
[data-showdown-play="join"] label { color: #293f67; font-weight: 750; font-size: .92rem; }
[data-showdown-play="join"] input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #829cc8;
  border-radius: 9px;
  background: #f3f8ff;
  color: #14264a;
  font-size: 1rem;
}
[data-showdown-play="join"] #roomIn {
  min-height: 58px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 1.22rem;
  font-weight: 800;
}
[data-showdown-play="join"] #joinBtn { width: 100%; min-height: 49px; cursor: pointer; }
.join-player-details { margin-top: 12px; }
.join-player-details summary { cursor: pointer; color: #244dc4; font-weight: 700; }
.join-player-details[open] summary { margin-bottom: 10px; }
[data-showdown-play="join"] #joinStatus { margin-bottom: 0; color: #883c2f; font-weight: 700; }
[data-showdown-play="join"] #joinStatus:empty { display: none; }
.join-footer { text-align: center; padding: 14px; font-size: .89rem; }
.join-footer a { color: #244dc4; }
[data-showdown-play="join"] .hidden { display: none !important; }
[data-showdown-play="join"]:has(#joinCard.hidden) .join-intro { display: none; }
[data-showdown-play="join"]:has(#joinCard.hidden) .join-host-discovery { display: none; }
[data-showdown-play="join"] .join-callout {
  background: #e3f2ff;
  border: 1px solid #a6c3ec;
  padding: 12px;
  border-radius: 12px;
  color: #1f4299;
  font-weight: 700;
}
[data-showdown-play="join"] .status-box { text-align: center; color: #244dc4; font-weight: 750; }
[data-showdown-play="join"] .buzzer-btn {
  min-height: clamp(125px, 25vh, 200px);
  background: #2450c7;
  color: #fcfdff;
  border: 3px solid #a7d4ff;
  border-radius: 25px;
  font-size: clamp(1.4rem, 6vw, 2.25rem);
  font-weight: 800;
  cursor: pointer;
}
[data-showdown-play="join"] .buzzer-btn.won { background: #1c378b; border-color: #eec475; }
[data-showdown-play="join"] button:disabled { opacity: .58; cursor: not-allowed; }
@media (max-width: 400px) {
  .join-header { gap: 6px; padding-inline: 10px; }
  .join-brand { gap: 5px; }
  .join-brand img { width: 30px; height: 30px; }
  .join-header nav { gap: 4px; }
  .join-nav-link { font-size: .8rem; padding-inline: 7px; }
}

body[data-showdown-play="solo"] {
  margin: 0;
  min-height: 100dvh;
}
[data-showdown-play="solo"] main {
  width: min(100% - 24px, 680px);
  box-sizing: border-box;
  margin: 24px auto;
  background: #fcfdff;
  border: 1px solid #a4bee3;
  border-radius: 18px;
  padding: clamp(14px, 4vw, 35px);
  box-shadow: 0 6px 0 #cfe2fa;
}
[data-showdown-play="solo"] :is(a, label, strong, summary) { color: #244dc4; }
[data-showdown-play="solo"] :is(button, select) { color: #14264a; background: #eaf4ff; border-color: #8eb0dc; }
[data-showdown-play="solo"] :is(button:hover, button:focus-visible, #start) { color: #fcfdff; background: #244dc4; }

body[data-showdown-play="phone"] {
  --surface: #fcfdff;
  --tile: #edf6ff;
  --text: #14264a;
  --muted: #445979;
  --gold: #244dc4;
  --gold-deep: #183789;
  --coral: #bedfff;
  --win: #2646a2;
}
[data-showdown-play="phone"] :is(.controls, .board, .cell) { border-color: #afc9ed; }
[data-showdown-play="phone"] .board { box-shadow: 0 7px 0 #c5d9f4; }
[data-showdown-play="phone"] h1.title { margin: 0; }
[data-showdown-play="phone"] .cell:focus-visible { outline-offset: -3px; }
[data-showdown-play="phone"] select { background: #f3f8ff; color: #14264a; border-color: #8faad7; }
[data-showdown-play="phone"] .badge { background: #e1f0ff; color: #244dc4; border-color: #a8c5ea; }
[data-showdown-play="phone"] :is(.btn-gold, .cell.on, .cell.win, .banner) { color: #fcfdff; }
[data-showdown-play="phone"] .cols-head span { color: #14264a; }
[data-showdown-play="phone"] .em { position: relative; color: transparent; }
[data-showdown-play="phone"] .em img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.16em;
  height: 1.16em;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}
[data-showdown-play="phone"] #roomInput {
  flex-shrink: 0;
  width: 125px;
  background: #f3f8ff;
  color: #14264a;
  border: 1px solid #617ca9;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}
[data-showdown-play="phone"] #roomInput::placeholder {
  color: #445979;
  font-size: 12px;
  opacity: 1;
  text-transform: none;
}
[data-showdown-play="phone"] #roomJoinBtn {
  min-height: 44px;
  padding-inline: 14px;
  background: #244dc4;
  color: #fcfdff;
  border: 1px solid #183789;
}
[data-showdown-play="phone"] #roomJoinBtn:hover:not(:disabled) { background: #183789; }
[data-showdown-play="phone"] #roomJoinBtn:disabled { opacity: .65; cursor: wait; }
[data-showdown-play="phone"] #liveCallBar {
  background: #244dc4;
  border: 1px solid #183789;
  color: #fcfdff;
  font-size: .9rem;
}
@media (max-width: 370px) {
  [data-showdown-play="phone"] .controls { flex-wrap: wrap; }
  [data-showdown-play="phone"] :is(.grid, .cols-head) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  [data-showdown-play="phone"] .cell .lb { overflow-wrap: anywhere; }
}

@media print {
  body[data-showdown-play] { background: white; color: black; }
  [data-showdown-play="solo"] main { box-shadow: none; border: 0; }
}

@media (max-width: 820px) {
  [data-showdown-play="caller"] .board {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  }
  [data-showdown-play="caller"] .cell {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
[data-showdown-play="stage"] .crowd-room-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  align-self: stretch;
  margin-block-start: 12px;
  padding: 8px 12px;
  background: #132950;
  border: 1px solid #7899cc;
  border-radius: 12px;
  color: #fcfdff;
  font-size: .9rem;
}
[data-showdown-play="stage"] .crowd-room-tools a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: #ffdc93;
}
[data-showdown-play="stage"] .crowd-room-tools p {
  flex-basis: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}
[data-showdown-play="stage"] .crowd-room-tools p:empty { display: none; }
[data-showdown-play="caller"] .bingo-claim-notice:not([hidden]) {
  display: grid;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid #ebc96d;
  border-radius: 12px;
  background: #ffe8a8;
  color: #252016;
  font-size: 1rem;
  font-weight: 800;
}
[data-showdown-play="caller"] .bingo-claim-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 5.5rem;
  overflow-y: auto;
}
[data-showdown-play="caller"] .bingo-claim-actions .btn {
  padding: 5px 9px;
  background: #372e1d;
  color: #fcfdff;
  font-size: .82rem;
}
