/* 老叔之家象棋 — 墨水屏高对比样式 css/style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: none !important;
  animation: none !important;
}

html, body {
  background: #ffffff;
  color: #000000;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 17px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

#app {
  max-width: 940px;
  margin: 0 auto;
  padding: 10px 8px 14px;
}

header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 2px solid #000000;
}

#logo {
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 2px;
}

.bar {
  display: -webkit-flex;
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.btn {
  -webkit-flex: 1;
  flex: 1;
  min-height: 48px;
  border: 2px solid #000000;
  background: #ffffff;
  color: #000000;
  font-size: 19px;
  font-weight: bold;
  padding: 6px 4px;
  outline: none;
  font-family: inherit;
  touch-action: manipulation;
}

.btn.on {
  background: #000000;
  color: #ffffff;
}

.btn[disabled] {
  border-color: #999999;
  color: #999999;
  background: #ffffff;
}

button[hidden] {
  display: none;
}

#status {
  font-size: 15px;
  font-weight: bold;
  line-height: 1.2;
  text-align: right;
  -webkit-flex: 1;
  flex: 1;
  margin-left: 12px;
}

#boardWrap {
  text-align: center;
  margin: 2px 0 4px;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

canvas#board {
  display: block;
  margin: 0 auto;
  background: #ffffff;
  touch-action: none;
}

.capLine {
  font-size: 15px;
  min-height: 0;
  padding: 0;
  line-height: 1.3;
}

#captured {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: baseline;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 0;
}

#actionBar .btn {
  font-size: 17px;
  min-height: 46px;
}

#debugBox {
  font-family: Consolas, Menlo, monospace;
  font-size: 12px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  padding: 6px;
  margin-top: 8px;
  max-height: 28vh;
  overflow-y: auto;
  white-space: pre-wrap;
  touch-action: auto;
}

/* 设置模态框 */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.modalBackdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modalPanel {
  position: relative;
  width: 92%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  color: #000000;
  border: 3px solid #000000;
  padding: 14px;
  z-index: 1;
  -webkit-user-select: none;
  user-select: none;
}

.modalPanel h2 {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 5px;
  margin-bottom: 10px;
}

.mGroup {
  margin: 12px 0;
}

.mGroup.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.mLabel {
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 6px;
}

.mBtns {
  display: -webkit-flex;
  display: flex;
  gap: 8px;
}

.mBtns .mSel {
  -webkit-flex: 1;
  flex: 1;
  min-height: 44px;
  font-size: 16px;
}

.mHint {
  font-size: 13px;
  color: #333333;
  margin-top: 5px;
}

.mClose {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  font-size: 20px;
}
