/* board/board.css —— 棋盘容器与工具条（唯一棋盘实现的显示约束） */
#boardHost{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;              /* 允许 flex 子项收缩 */
  padding:20px;
  overflow:hidden;
  background:#0b0e14;
}
#boardHost svg{
  /* 强制 1:1，居中等比缩放 */
  aspect-ratio:1 / 1;
  width:auto;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}
/* 全屏棋盘：去掉多余 padding，铺满 */
main.fs #boardHost{padding:0}
main.fs #boardHost svg{
  width:100%;
  height:100%;
  max-width:100vh;
  max-height:100vh;
}

.boardTools{display:flex;gap:6px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid #1e2531;background:#0d121a}
.boardTools button{font-family:inherit;font-size:12px;padding:6px 10px;border-radius:7px;border:1px solid #1e2531;
  background:#121a24;color:#9fb0c6;cursor:pointer;min-height:34px}
.boardTools button:hover{background:#18202c;color:#d8e6f8}
.boardTools button.on{background:#1b3350;border-color:#2d5b8e;color:#dbeaff}

/* ===== 3E 图片识别浮层 ===== */
.imgImportOverlay{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.75);display:flex;align-items:center;justify-content:center}
.imgImportModal{background:#0f141d;border:1px solid #1e2531;border-radius:12px;max-width:96vw;max-height:94vh;display:flex;flex-direction:column;overflow:hidden}
.imgImportHeader{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-bottom:1px solid #1e2531;color:#eaf1fb}
.imgImportBody{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:8px;background:#070a10}
.imgImportBody canvas{max-width:88vw;max-height:70vh;display:block;cursor:crosshair}
.imgImportControls{padding:8px 16px 12px;border-top:1px solid #1e2531;color:#9fb0c6;font-size:12px}
.imgImportRow{display:flex;flex-wrap:wrap;gap:12px;margin:6px 0;align-items:center}
.imgImportRow label{display:flex;align-items:center;gap:4px}
.imgImportRow input[type=number]{width:52px}
.imgImportRow input[type=range]{width:100px}
.imgImportActions button{font-family:inherit;font-size:13px;padding:6px 14px;border-radius:7px;border:1px solid #2a3342;background:#121a24;color:#9fb0c6;cursor:pointer}
.imgImportActions #imgImportApply{border-color:#356b3f;background:#1d3a24;color:#bfe8c8}
.imgImportActions #imgImportApply:disabled{opacity:.4;cursor:not-allowed}
.imgImportClose{background:none;border:none;color:#9fb0c6;font-size:18px;cursor:pointer}
.imgImportHint{color:#8fa3bd;font-size:11.5px;line-height:1.6;margin:2px 0 6px;opacity:.9}
