html,
body {
  margin: 0;
  height: 100%;
  background: #1a1c20;
  overflow: hidden;
  touch-action: none;
}

@font-face {
  font-family: "UnifrakturMaguntia";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/UnifrakturMaguntia.woff2") format("woff2");
}

body {
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  color: #fdfbf7;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#overlay[hidden],
[hidden] {
  display: none !important;
}

.card {
  pointer-events: auto;
  width: min(420px, calc(100vw - 36px));
  background: #fdfbf7;
  color: #1a1c20;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  text-align: center;
  padding-bottom: 8px;
}

.wordmark {
  margin: 18px 16px 0;
  color: #004b79;
  font-family: "UnifrakturMaguntia", serif;
  font-size: 28px;
  line-height: 1;
}

.card h1,
.card h2 {
  margin: 8px 24px 8px;
  color: #004b79;
  font-size: 32px;
  font-weight: 700;
}

.card h2 {
  font-size: 28px;
}

.lead,
.note,
.error {
  margin: 0 24px;
  line-height: 1.4;
}

.note {
  margin-top: 16px;
  font-size: 15px;
}

.error {
  margin-top: 8px;
  color: #8d3a34;
  font-size: 14px;
}

label {
  display: block;
  margin: 16px 24px 6px;
  text-align: left;
  font-size: 14px;
  color: #004b79;
}

input {
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px;
  box-sizing: border-box;
  border: 1px solid #004b79;
  background: #fff;
  color: #1a1c20;
  font: 18px Georgia, "Times New Roman", serif;
  padding: 8px 10px;
}

.card button {
  margin: 16px 8px 12px;
  background: #004b79;
  color: #ffffff;
  border: 0;
  font-family: Georgia, "Times New Roman", "Noto Serif", serif;
  font-size: 18px;
  padding: 10px 22px;
  cursor: pointer;
}

.card button.ghost {
  background: transparent;
  color: #004b79;
}

.card button:hover,
.card button:focus-visible {
  background: #00609a;
  color: #ffffff;
}

.card button:focus-visible {
  outline: 2px solid #004b79;
  outline-offset: 3px;
}

.board-card {
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
}

.table-wrap {
  overflow: auto;
  margin: 8px 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th {
  color: #004b79;
  font-weight: 700;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid #004b79;
}

td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 75, 121, 0.15);
}

th:nth-child(1),
td:nth-child(1),
th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  text-align: right;
  width: 4.5rem;
}

tr.is-mine td {
  background: rgba(0, 75, 121, 0.14);
  color: #004b79;
  font-weight: 700;
}

#board-empty {
  margin: 12px 24px 18px;
}
