:root {
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #edf6ff;
  background: #061729;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 20% 0%, #12385a 0, transparent 55%),
    radial-gradient(ellipse at 100% 80%, #192950 0, transparent 50%);
}
main {
  max-width: 720px;
  padding: 72px 24px 36px;
  margin: auto;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: 11px;
  color: #61d8ee;
  margin: 0 0 14px;
}
h1 {
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0 0 14px;
}
.intro {
  color: #b7cada;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 auto 28px;
  max-width: 410px;
}
.game {
  max-width: 344px;
  margin: auto;
  padding: 18px;
  background: #10263bcc;
  border: 1px solid #294962;
  border-radius: 24px;
  box-shadow: 0 24px 60px #0003;
}
.players {
  display: flex;
  gap: 12px;
}
.player {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px;
  background: #0b1d2e;
  display: grid;
  grid-template-columns: 28px 1fr;
  text-align: left;
  align-items: center;
}
.player[data-active='true'] {
  border-color: #497999;
  background: #18394f;
}
.player strong {
  grid-row: span 2;
  font-size: 29px;
}
.player span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
}
.player small {
  font-size: 10px;
  color: #93afc4;
  margin-top: 2px;
}
.status {
  font-size: 16px;
  font-weight: 600;
  min-height: 24px;
  margin: 24px 0 18px;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.board button {
  aspect-ratio: 1;
  border: 1px solid #36556c;
  border-radius: 14px;
  background: #18364d;
  font:
    400 clamp(48px, 14vw, 70px)/1 ui-sans-serif,
    system-ui;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 0.12s,
    transform 0.12s;
}
.board button:enabled:hover {
  background: #254e69;
  transform: translateY(-2px);
}
.board button:focus-visible,
.back:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.board button:disabled {
  cursor: default;
  opacity: 1;
}
.board button[data-mark='0']:disabled {
  background: #122c41;
}
[data-mark='1'] {
  color: #61d8ee;
}
[data-mark='2'] {
  color: #b999ff;
}
.hint {
  font-size: 11px;
  color: #93afc4;
  margin: 19px 0 0;
}
.rules {
  color: #93afc4;
  max-width: 390px;
  font-size: 12px;
  line-height: 1.7;
  margin: 24px auto 0;
}
.back {
  font: 600 14px inherit;
  background: #1477ed;
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 13px 24px;
  margin-top: 20px;
  cursor: pointer;
}
.back[hidden] {
  display: none;
}
@media (max-width: 480px) {
  main {
    padding: 70px 18px 26px;
  }
  .intro {
    margin-bottom: 20px;
  }
  .game {
    padding: 16px;
    border-radius: 20px;
  }
  .status {
    margin: 18px 0 15px;
  }
  .board {
    gap: 8px;
  }
  .board button {
    border-radius: 12px;
  }
  .rules {
    margin-top: 20px;
  }
}
@media (max-height: 700px) and (min-width: 600px) {
  main {
    padding-top: 24px;
  }
  .intro {
    margin-bottom: 16px;
  }
  .game {
    max-width: 330px;
    padding: 16px;
  }
  .board button {
    font-size: 52px;
  }
  .status {
    margin: 12px 0;
  }
  .rules {
    margin-top: 12px;
  }
}
