.play-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.board-head h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.2;
}

.board-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.play-download {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: -2px 0 14px;
  padding: 7px 10px;
  border: 1px solid #f1d39b;
  border-radius: 7px;
  background: #fff7e6;
  color: #68430d;
}

.play-download span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.play-download a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.action-row,
.mode-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.action-row button,
.action-row a,
.mode-tabs button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.action-row button:first-child,
.mode-tabs button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.action-row button:disabled {
  cursor: not-allowed;
  color: #98a2b3;
  background: #eef2f7;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 16px;
  align-items: start;
}

.board-wrap {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px), #f8fafc;
  background-size: 18px 18px;
}

.info-panel {
  display: grid;
  gap: 10px;
}

.info-panel div {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.info-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-panel strong {
  font-size: 20px;
  line-height: 1.2;
}

@media (max-width: 800px) {
  .board-head,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .info-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .board-wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .play-shell {
    padding: 8px;
    border-radius: 8px;
  }

  .board-head {
    gap: 8px;
    margin-bottom: 8px;
  }

  .board-head h1 {
    font-size: 23px;
  }

  .board-head p {
    min-height: 22px;
    font-size: 13px;
    line-height: 1.45;
  }

  .play-download {
    min-height: 36px;
    gap: 6px;
    margin: 0 0 8px;
    padding: 5px 6px;
  }

  .play-download span {
    font-size: 12px;
  }

  .play-download a {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
  }

  .action-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .action-row button,
  .action-row a,
  .mode-tabs button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .game-layout {
    gap: 8px;
  }

  .board-wrap {
    width: 100%;
    padding: 6px;
    place-items: start;
    border-radius: 7px;
    -webkit-overflow-scrolling: touch;
  }

  .info-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .info-panel div {
    min-height: 48px;
    gap: 2px;
    padding: 7px;
    border-radius: 7px;
  }

  .info-panel span {
    font-size: 11px;
  }

  .info-panel strong {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
    white-space: nowrap;
  }
}
