/* 对弈页棋盘区域：避开右侧 280px 侧栏 */
.duiyi-board-wrap {
  clear: both;
  margin-right: 280px;
  padding: 8px 0 16px;
}

.duiyi-board-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.duiyi-board-main {
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
}

.duiyi-board-root {
  display: block;
  margin: 0 auto;
  line-height: 0;
  max-width: 100%;
}

.duiyi-board-root > div {
  margin: 0 auto;
}

.duiyi-board-root canvas {
  display: block;
  margin: 0 auto;
}

.duiyi-board-actions {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  box-sizing: border-box;
}

.duiyi-board-actions-top {
  flex: 0 0 auto;
}

.duiyi-board-actions-bottom {
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.duiyi-board-actions .duiyi-board-btn--primary {
  min-height: 64px;
  padding: 18px 8px;
  font-size: 16px;
  line-height: 1.3;
}

.duiyi-board-actions .s-btn {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.duiyi-board-toolbar {
  margin: 12px 0;
  text-align: center;
}

.duiyi-board-btn {
  margin: 0 6px;
}

.duiyi-board-btn--primary {
  font-weight: bold;
}

.duiyi-board-status {
  text-align: center;
  margin: 8px 0;
  color: #5c4033;
  font-size: 14px;
  line-height: 1.4;
}

.duiyi-board-status--err {
  color: #c0392b;
}

.duiyi-count-panel {
  margin-top: 4px;
  padding: 10px;
  background: #faf6ee;
  border: 1px solid #d4c4a8;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.duiyi-count-panel label {
  display: block;
  margin-bottom: 6px;
}

.duiyi-count-panel input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  margin-top: 2px;
}

.duiyi-count-meta {
  color: #666;
  font-size: 12px;
  margin: 6px 0;
}

.duiyi-count-preview {
  font-weight: bold;
  color: #5c4033;
  margin: 8px 0;
}

.duiyi-count-apply-info {
  padding: 10px;
  background: #fff8e8;
  border: 1px solid #e8c87a;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.duiyi-count-apply-info p {
  margin: 0 0 8px;
}

.duiyi-board-fallback {
  padding: 40px;
  text-align: center;
  color: #666;
  background: #f5f0e6;
  border: 1px solid #d4c4a8;
}

.duiyi-play-board-slot {
  clear: both;
}

@media (max-width: 768px) {
  .duiyi-board-wrap {
    margin-right: 0;
  }

  .duiyi-board-layout {
    flex-direction: column;
    align-items: center;
  }

  .duiyi-board-actions {
    width: 100%;
    max-width: 320px;
    height: auto !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .duiyi-board-actions-top,
  .duiyi-board-actions-bottom {
    margin-top: 0;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .duiyi-board-actions .s-btn {
    width: auto;
    min-width: 88px;
  }

  .duiyi-count-panel,
  .duiyi-count-apply-info {
    width: 100%;
  }
}
