/* Store, runde brikker og et bræt der passer i telefonens bredde. */
.dam-page {
  max-width: 1060px;
}
.dam-setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.dam-forms {
  display: grid;
  gap: 18px;
}
.dam-forms form {
  display: grid;
  gap: 12px;
}
.dam-forms input {
  width: 100%;
  box-sizing: border-box;
}
.dam-forms h3 {
  margin: 0;
}
#dam-play {
  max-width: 570px;
  margin: 0 auto;
}
.dam-room {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}
.dam-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dam-player {
  padding: 10px 12px;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  background: #123b2e;
}
.dam-player.active {
  border-color: #f1d58f;
}
.dam-player small {
  display: block;
  color: #bbd2c4;
  margin-top: 3px;
}
#dam-status {
  min-height: 42px;
  margin: 12px 0;
  font-size: 15px;
  line-height: 1.4;
}
.dam-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 8px solid #5e4932;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 28px #0004;
  aspect-ratio: 1;
}
.abc-game--dam .dam-cell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 5%;
  background: #eeddb9;
  box-shadow: none;
  position: relative;
  cursor: default;
  touch-action: manipulation;
}
.abc-game--dam .dam-cell.dark {
  background: #345449;
}
.abc-game--dam .dam-cell.selected {
  background: #9b7b32;
}
.abc-game--dam .dam-cell.target:after {
  content: "";
  height: 28%;
  width: 28%;
  border-radius: 50%;
  background: #f6db91;
  box-shadow: 0 0 0 4px #f6db9138;
}
.abc-game--dam .dam-cell.movable {
  cursor: pointer;
}
.abc-game--dam .dam-cell:focus-visible {
  outline: 3px solid #fff0ac;
  outline-offset: -4px;
  z-index: 1;
}
.dam-piece {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  border: 2px solid #fffa;
  box-shadow:
    inset 0 0 0 4px #0002,
    0 3px 0 #0005,
    0 4px 6px #0006;
  color: #fff6cd;
  font-size: clamp(18px, 4vw, 36px);
  pointer-events: none;
}
.dam-piece.red {
  background: radial-gradient(circle at 35% 30%, #df8371, #9d2e35);
}
.dam-piece.white {
  background: radial-gradient(circle at 35% 30%, #fff9e9, #c5b995);
  color: #3d4237;
}
.dam-hint {
  font-size: 12px;
  color: #bbd2c4;
  line-height: 1.4;
}
#dam-error {
  color: #ffe1ae;
}
#dam-rules {
  background: #153c2f;
  color: #edf4ef;
  border: 1px solid #f1d58f;
  border-radius: 16px;
  max-width: 620px;
  width: calc(100% - 50px);
  padding: 22px;
  font: 15px/1.5 system-ui;
}
#dam-rules::backdrop {
  background: #0009;
}
#dam-rules li {
  margin-bottom: 9px;
}
@media (max-width: 800px) {
  .dam-setup {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .dam-setup p {
    margin: 8px 0;
  }
  .dam-board {
    border-width: 5px;
  }
  .dam-player {
    padding: 8px;
    font-size: 13px;
  }
  #dam-status {
    font-size: 13px;
    min-height: 36px;
    margin: 8px 0;
  }
  .dam-hint {
    margin: 10px 0;
  }
  .dam-room {
    margin-bottom: 8px;
  }
  .abc-game--dam .dam-cell {
    padding: 6%;
  }
}
[hidden]#dam-play,
[hidden]#dam-result,
[hidden]#dam-error {
  display: none !important;
}
