@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #202e32;
  background: #f6f5ef;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 28px 36px;
}
header {
  border-bottom: 1px solid #d9ded7;
  padding-bottom: 22px;
  margin-bottom: 24px;
}
h1 {
  font:
    600 30px "Space Grotesk",
    sans-serif;
  letter-spacing: -1px;
  margin: 0;
}
[hidden] {
  display: none !important;
}
aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.play-area {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 52px;
  align-items: start;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
select {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid #d2d9d1;
  border-radius: 7px;
  background: #fffefa;
  color: #283c35;
  font: inherit;
  font-size: 13px;
}
.players {
  display: grid;
  gap: 12px;
  margin: 0;
  font-size: 12px;
}
.players span {
  display: flex;
  align-items: center;
  gap: 10px;
}
i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.red {
  background: #e87558;
}
.gold {
  background: #efbe58;
}
.reset {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid #cbd4cb;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  color: #30483b;
  cursor: pointer;
}
.hint {
  font-size: 11px;
  color: #79877e;
  line-height: 1.8;
  margin: 0;
}
.game {
  max-width: 620px;
}
.game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-heading p {
  font-size: 16px;
  font-weight: 600;
}
.game-heading span {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #829087;
}
.columns {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 14px;
  gap: 9px;
}
.columns button {
  border: 0;
  background: transparent;
  color: #5b7d68;
  font-size: 21px;
  cursor: pointer;
  height: 34px;
  border-radius: 8px;
}
.columns button:hover,
.columns button:focus-visible {
  background: #dfe9dc;
}
.columns button:disabled {
  opacity: 0.25;
  cursor: default;
}
.board {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
  background: #355c4d;
  border-radius: 16px;
  padding: 17px;
  box-shadow:
    0 8px 0 #27493c,
    0 15px 30px #284b3618;
}
.cell {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0f1e8;
  box-shadow: inset 0 4px 5px #173c3330;
  transition: background 0.18s;
}
.cell.p1 {
  background: #e87558;
  box-shadow: inset 0 -4px 0 #c65d44;
}
.cell.p2 {
  background: #efbe58;
  box-shadow: inset 0 -4px 0 #d49e3c;
}
#error {
  font-size: 13px;
  color: #aa3d30;
  min-height: 18px;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid #d99535;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  main {
    padding: 20px;
  }
  .play-area {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .field {
    min-width: 0;
  }
  select {
    min-width: 0;
  }
  .players {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
  }
  aside .reset {
    align-self: end;
  }
  .hint {
    grid-column: 1/-1;
  }
  .board {
    gap: 6px;
    padding: 12px;
    border-radius: 12px;
  }
  .columns {
    gap: 6px;
    padding: 0 12px;
  }
}
