html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  color: #222;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, PingFang SC, Microsoft YaHei, Noto Sans SC, sans-serif;
}

#board {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: crosshair;
}

/* 语言切换按钮 */
.language-toggle {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 10;
}

.lang-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #ccc;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #555;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.95);
  border-color: #999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

#ui {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 6px;
  cursor: pointer;
}
button:hover { background: #f0f0f0; }

#fileInput {
  height: 30px;
}

.help {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.55;
}

/* Export dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: min(440px, 92vw);
  padding: 14px 14px 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.modal-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.field-row { margin: 10px 0 6px 0; }
.field-row label { display: block; font-size: 12px; color: #555; margin-bottom: 6px; }

.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.input-suffix input {
  flex: 1;
  height: 32px;
  border: 0;
  outline: none;
  padding: 0 10px;
  font-size: 14px;
}

.input-suffix .suffix {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #f5f5f5;
  border-left: 1px solid #ddd;
  color: #555;
}

.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* removed custom path row */


