body {
  margin: 0;
  background: #fff;
  color: #222;
  color-scheme: light;
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

h2 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
}

.intro,
#player {
  margin: 0 0 24px;
  color: #444;
}

#name-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#name-form[hidden] {
  display: none;
}

#name-form label {
  width: 100%;
}

input {
  font: inherit;
  padding: 8px 10px;
  color: #222;
  background: #fff;
  border: 1px solid #222;
  border-radius: 4px;
}

.player {
  margin-top: 28px;
}

.player h2,
.player p {
  margin: 0 0 8px;
}

.player button {
  margin-top: 12px;
}

#dice {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.slot {
  flex: 1;
  text-align: center;
}

.label {
  margin-bottom: 8px;
  font-size: 14px;
}

.die {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 7px;
  padding: 14px;
  background: #fff;
  border: 1px solid #222;
  border-radius: 6px;
  box-sizing: border-box;
}

.die i {
  display: block;
  border-radius: 50%;
  background: transparent;
}

.die i.on {
  background: #222;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

button {
  font: inherit;
  padding: 8px 14px;
  background: #fff;
  color: #222;
  border: 1px solid #222;
  border-radius: 4px;
  cursor: pointer;
}

#roll {
  background: #222;
  color: #fff;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 10px;
  text-align: center;
  background: #f6f6f6;
  border: 1px solid #fff;
}

th {
  font-size: 14px;
  font-weight: 600;
  background: #e6e6e6;
}

td.hit {
  background: #cfcfcf;
}

.guess {
  display: flex;
  gap: 8px;
}

.guess button {
  flex: 1;
}

#outcome {
  min-height: 1.5em;
  margin: 14px 0 8px;
}

@media (max-width: 520px) {
  .die {
    width: 76px;
    height: 76px;
    padding: 11px;
    gap: 5px;
  }
}
