/* ============================================================
   中国象棋 · 主样式
   风格：古典水墨 × 现代极简
   ============================================================ */

:root {
  --c-bg: #F5EAD0;
  --c-paper: #EFE0BE;
  --c-paper-2: #E8D6AC;
  --c-ink: #1C1B19;
  --c-ink-soft: #2B2A28;
  --c-ink-mute: #5A5044;
  --c-red: #C0392B;
  --c-red-deep: #8E2418;
  --c-red-soft: #E07A6B;
  --c-accent: #2C5F5D;
  --c-gold: #B8893A;
  --c-line: #3A2A1A;
  --c-border: rgba(58, 42, 26, 0.18);
  --c-shadow: rgba(60, 40, 20, 0.18);

  --f-display: "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  --f-body: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --f-piece: "ZCOOL XiaoWei", "STKaiti", "KaiTi", serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(60, 40, 20, 0.08);
  --shadow-md: 0 8px 28px rgba(60, 40, 20, 0.14);
  --shadow-lg: 0 18px 60px rgba(60, 40, 20, 0.22);

  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: var(--f-body);
  background: var(--c-bg);
  color: var(--c-ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- 背景装饰 ---- */
.cxq-bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cxq-ink-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.cxq-ink-1 {
  width: 520px; height: 520px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.5), transparent 70%);
}

.cxq-ink-2 {
  width: 600px; height: 600px;
  bottom: -240px; left: -160px;
  background: radial-gradient(circle, rgba(44, 95, 93, 0.45), transparent 70%);
}

.cxq-ink-3 {
  width: 380px; height: 380px;
  top: 40%; left: 30%;
  background: radial-gradient(circle, rgba(184, 137, 58, 0.3), transparent 70%);
}

.cxq-paper-grain {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(60, 40, 20, 0.04) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: 0.6;
}

/* ---- 应用容器 ---- */
.cxq-app {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
}

/* ---- 标题栏 ---- */
.cxq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 4px;
  position: relative;
  flex-shrink: 0;
  min-height: 0;
}

.cxq-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-red), transparent);
}

.cxq-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cxq-title {
  font-family: var(--f-display);
  font-size: 48px;
  font-weight: 400;
  color: var(--c-ink);
  letter-spacing: 6px;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(192, 57, 43, 0.12);
}

.cxq-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--c-red);
  color: #fff;
  font-family: var(--f-display);
  font-size: 24px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(192, 57, 43, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
  transform: rotate(-4deg);
}

.cxq-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-ink-mute);
  letter-spacing: 4px;
}

/* ---- 主体布局 ---- */
.cxq-main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 0 4px;
  min-height: 0;
}

/* ---- 棋盘区 ---- */
.cxq-board-area {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex: none;
  padding: 0;
  margin: 0;
}

.cxq-board-frame {
  position: relative;
  padding: 8px;
  background: linear-gradient(145deg, #f3e3c0, #e6d2a8);
  border-radius: 16px;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4),
    inset 0 0 0 2px rgba(120, 80, 30, 0.15);
}

.cxq-board-frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(120, 80, 30, 0.25);
  border-radius: 12px;
  pointer-events: none;
}

.cxq-board-wrap {
  position: relative;
  border-radius: 6px;
  overflow: visible;
}

#cxq-canvas {
  display: block;
  border-radius: 4px;
  cursor: pointer;
}

/* 状态徽章 */
.cxq-status-badge {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.9);
  padding: 6px 18px;
  background: var(--c-red);
  color: #fff;
  font-family: var(--f-display);
  font-size: 18px;
  letter-spacing: 4px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(192, 57, 43, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 5;
  white-space: nowrap;
}

.cxq-status-badge.is-check,
.cxq-status-badge.is-end {
  opacity: 1;
  transform: translateX(-50%) translateY(-50%) scale(1);
  animation: badgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cxq-status-badge.is-end {
  background: var(--c-ink);
  box-shadow: 0 4px 14px rgba(28, 27, 25, 0.5);
}

@keyframes badgePop {
  0% { transform: translateX(-50%) translateY(-50%) scale(0.5); }
  100% { transform: translateX(-50%) translateY(-50%) scale(1); }
}

/* 将军时屏幕边缘红光 */
body:has(.cxq-status-badge.is-check)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(192, 57, 43, 0.35);
  animation: checkPulse 1.2s ease-in-out infinite;
  z-index: 100;
}

@keyframes checkPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---- 侧边栏 ---- */
.cxq-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 100%;
}

.cxq-sidebar::-webkit-scrollbar { width: 4px; }
.cxq-sidebar::-webkit-scrollbar-track { background: transparent; }
.cxq-sidebar::-webkit-scrollbar-thumb { background: rgba(120, 80, 30, 0.3); border-radius: 2px; }

/* 轮次卡 */
.cxq-turn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff8e8, #f5e6c4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(120, 80, 30, 0.12);
  position: relative;
  overflow: hidden;
}

.cxq-turn::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c-red);
  transition: var(--transition);
}

.cxq-turn.is-black::before { background: var(--c-ink); }

.cxq-turn-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--c-red);
  box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.2), 0 0 12px rgba(192, 57, 43, 0.5);
  flex-shrink: 0;
  animation: dotPulse 2s ease-in-out infinite;
}

.cxq-turn.is-black .cxq-turn-dot {
  background: var(--c-ink);
  box-shadow: 0 0 0 4px rgba(28, 27, 25, 0.2), 0 0 12px rgba(28, 27, 25, 0.5);
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.cxq-turn-info { flex: 1; }

.cxq-turn-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: 2px;
}

.cxq-turn.is-red .cxq-turn-label { color: var(--c-red-deep); }
.cxq-turn.is-black .cxq-turn-label { color: var(--c-ink); }

.cxq-turn-sub {
  font-size: 12px;
  color: var(--c-ink-mute);
  margin-top: 2px;
  letter-spacing: 1px;
}

.cxq-ai-status {
  font-size: 12px;
  color: var(--c-accent);
  font-weight: 500;
  min-height: 14px;
}

.cxq-ai-status.active::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--c-accent);
  border-radius: 50%;
  margin-left: 4px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* 面板 */
.cxq-panel {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(255, 248, 232, 0.7), rgba(245, 230, 196, 0.7));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(120, 80, 30, 0.1);
  backdrop-filter: blur(4px);
}

.cxq-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-ink-mute);
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cxq-panel-title::before {
  content: "";
  width: 3px; height: 12px;
  background: var(--c-red);
  border-radius: 2px;
}

.cxq-panel-subtitle {
  font-size: 12px;
  color: var(--c-ink-mute);
  letter-spacing: 2px;
  margin: 14px 0 8px;
}

.cxq-ai-only {
  transition: var(--transition);
}

.cxq-ai-only.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* 分段按钮 */
.cxq-seg {
  display: flex;
  background: rgba(120, 80, 30, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}

.cxq-seg-3 .cxq-seg-btn { flex: 1; }
.cxq-seg-2 .cxq-seg-btn { flex: 1; }

.cxq-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--c-ink-mute);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 1px;
}

.cxq-seg-btn:hover {
  color: var(--c-ink);
  background: rgba(255, 255, 255, 0.5);
}

.cxq-seg-btn.active {
  background: var(--c-ink);
  color: var(--c-bg);
  box-shadow: 0 2px 8px rgba(28, 27, 25, 0.3);
}

/* 被吃区 */
.cxq-captured-row {
  margin-bottom: 10px;
}

.cxq-captured-row:last-child { margin-bottom: 0; }

.cxq-captured-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-ink-mute);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.cxq-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.cxq-dot.is-red { background: var(--c-red); }
.cxq-dot.is-black { background: var(--c-ink); }

.cxq-captured-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--c-ink);
  background: rgba(120, 80, 30, 0.1);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.cxq-captured-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 24px;
}

.cxq-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-family: var(--f-piece);
  font-size: 13px;
  font-weight: 700;
  background: #f3e3c0;
  box-shadow: 0 1px 3px rgba(60, 40, 20, 0.2);
  animation: chipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cxq-chip.is-red { color: var(--c-red-deep); border: 1px solid var(--c-red); }
.cxq-chip.is-black { color: var(--c-ink); border: 1px solid var(--c-ink); }

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.3) rotate(-180deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* 棋谱 */
.cxq-history-panel {
  display: flex;
  flex-direction: column;
  max-height: 240px;
}

.cxq-history {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cxq-history::-webkit-scrollbar { width: 5px; }
.cxq-history::-webkit-scrollbar-track { background: transparent; }
.cxq-history::-webkit-scrollbar-thumb {
  background: rgba(120, 80, 30, 0.3);
  border-radius: 3px;
}

.cxq-hist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  font-size: 13px;
  border-radius: 4px;
  animation: histIn 0.3s ease;
}

.cxq-hist-item:hover { background: rgba(120, 80, 30, 0.06); }

@keyframes histIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.cxq-hist-num {
  color: var(--c-ink-mute);
  font-size: 11px;
  width: 24px;
  flex-shrink: 0;
}

.cxq-hist-text {
  font-family: var(--f-piece);
  font-weight: 500;
  letter-spacing: 1px;
}

.cxq-hist-text.is-red { color: var(--c-red-deep); }
.cxq-hist-text.is-black { color: var(--c-ink); }

.cxq-hist-cap {
  margin-left: auto;
  font-size: 11px;
  color: var(--c-gold);
  background: rgba(184, 137, 58, 0.12);
  padding: 1px 6px;
  border-radius: 8px;
}

.cxq-hist-empty {
  text-align: center;
  color: var(--c-ink-mute);
  font-size: 12px;
  padding: 16px 0;
  letter-spacing: 2px;
}

/* 操作按钮 */
.cxq-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cxq-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 2px;
}

.cxq-btn svg { flex-shrink: 0; }

.cxq-btn-ghost {
  background: rgba(255, 248, 232, 0.7);
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 30, 0.25);
}

.cxq-btn-ghost:hover {
  background: #fff8e8;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 30, 0.4), var(--shadow-sm);
}

.cxq-btn-ghost:active { transform: translateY(0); }

.cxq-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.cxq-btn-primary {
  background: linear-gradient(145deg, var(--c-red), var(--c-red-deep));
  color: #fff;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  grid-column: span 2;
}

.cxq-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cxq-btn-primary:active { transform: translateY(0); }

.cxq-sound-btn.is-muted { opacity: 0.5; }
.cxq-sound-btn.is-muted .cxq-icon-sound-on { display: none; }
.cxq-sound-btn .cxq-icon-sound-off { display: none; }
.cxq-sound-btn.is-muted .cxq-icon-sound-off { display: block; }

/* ---- 页脚 ---- */
.cxq-footer {
  text-align: center;
  margin-top: 4px;
  padding: 4px 16px;
  font-size: 11px;
  color: var(--c-ink-mute);
  flex-shrink: 0;
  letter-spacing: 3px;
}

/* ---- 结算弹窗 ---- */
.cxq-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 27, 25, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cxq-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cxq-modal-card {
  position: relative;
  background: linear-gradient(145deg, #fff8e8, #f0e0bc);
  border-radius: 18px;
  padding: 48px 56px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(120, 80, 30, 0.2);
  min-width: 320px;
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cxq-modal.is-visible .cxq-modal-card {
  transform: scale(1) translateY(0);
}

.cxq-modal-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(120, 80, 30, 0.2);
  border-radius: 12px;
  pointer-events: none;
}

.cxq-modal-seal {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 56px; height: 56px;
  background: var(--c-red);
  color: #fff;
  font-family: var(--f-display);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.cxq-result-title {
  font-family: var(--f-display);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 12px;
  margin-bottom: 12px;
  color: var(--c-red-deep);
}

.cxq-result-title.is-black { color: var(--c-ink); }

.cxq-result-desc {
  font-size: 14px;
  color: var(--c-ink-mute);
  letter-spacing: 2px;
  margin-bottom: 28px;
}

.cxq-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cxq-modal-actions .cxq-btn {
  padding: 10px 22px;
  grid-column: auto;
}

/* ---- 响应式 ---- */
@media (max-width: 1024px) {
  .cxq-main {
    flex-direction: column;
    gap: 12px;
  }
  .cxq-sidebar {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    overflow-y: visible;
  }
  .cxq-board-area {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .cxq-title { font-size: 32px; letter-spacing: 4px; }
  .cxq-seal { width: 32px; height: 32px; font-size: 20px; }
  .cxq-subtitle { font-size: 11px; letter-spacing: 3px; }
  .cxq-board-frame { padding: 6px; }
  .cxq-modal-card {
    padding: 32px 24px 24px;
    min-width: 260px;
  }
  .cxq-result-title { font-size: 30px; letter-spacing: 6px; }
  
  .cxq-board-wrap {
    --piece-size: 44px;
  }
}

@media (max-width: 480px) {
  :root {
    --radius: 8px;
    --radius-sm: 4px;
  }
  
  .cxq-app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .cxq-header {
    padding: 1px 2px;
    flex-shrink: 0;
    min-height: 0;
  }
  
  .cxq-header::after {
    display: none;
  }
  
  .cxq-title-wrap { gap: 6px; }
  .cxq-title { font-size: 16px; letter-spacing: 1px; }
  .cxq-seal { width: 20px; height: 20px; font-size: 12px; }
  .cxq-subtitle { font-size: 8px; letter-spacing: 1px; margin-top: 2px; }
  
  .cxq-main {
    padding: 0;
    gap: 2px;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cxq-board-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: none;
    min-height: 0;
    padding: 0;
  }
  
  .cxq-board-frame {
    padding: 1px;
    border-radius: 6px;
    flex-shrink: 0;
    margin: 0;
  }
  
  .cxq-board-wrap {
    --piece-size: 38px;
  }
  
  .cxq-sidebar {
    width: 100%;
    max-width: none;
    margin: 0;
    gap: 2px;
    /*max-height: 140px;*/
    overflow-y: auto;
    padding-right: 2px;
  }
  
  .cxq-sidebar::-webkit-scrollbar { width: 2px; }
  .cxq-sidebar::-webkit-scrollbar-track { background: transparent; }
  .cxq-sidebar::-webkit-scrollbar-thumb { background: rgba(120, 80, 30, 0.3); border-radius: 1px; }
  
  .cxq-turn {
    padding: 6px 8px;
    gap: 6px;
  }
  
  .cxq-turn-label {
    font-size: 12px;
  }
  
  .cxq-turn-sub {
    font-size: 9px;
  }
  
  .cxq-panel {
    padding: 6px 8px;
  }
  
  .cxq-panel-title {
    font-size: 10px;
    margin-bottom: 4px;
  }
  
  .cxq-panel-subtitle {
    font-size: 9px;
    margin: 4px 0 3px;
  }
  
  .cxq-seg-btn {
    font-size: 10px;
    padding: 3px 2px;
    letter-spacing: 0;
  }
  
  .cxq-captured-label {
    font-size: 9px;
  }
  
  .cxq-chip {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  
  .cxq-history-panel {
    max-height: 40px;
  }
  
  .cxq-hist-item {
    font-size: 10px;
    padding: 1px 2px;
  }
  
  .cxq-actions {
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
  }
  
  .cxq-btn {
    font-size: 10px;
    padding: 4px 2px;
    gap: 2px;
  }
  
  .cxq-btn svg {
    width: 12px;
    height: 12px;
  }
  
  .cxq-btn-primary {
    grid-column: span 5;
  }
  
  .cxq-footer {
    display: none;
  }
  
  .cxq-modal-card {
    padding: 24px 16px 20px;
    min-width: 240px;
    border-radius: 14px;
  }
  
  .cxq-result-title {
    font-size: 24px;
    letter-spacing: 4px;
  }
  
  .cxq-modal-seal {
    width: 44px;
    height: 44px;
    font-size: 26px;
    top: -18px;
  }
  
  .cxq-modal-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .cxq-modal-actions .cxq-btn {
    padding: 10px 16px;
  }
  
  .cxq-status-badge {
    font-size: 14px;
    padding: 4px 14px;
  }
}

@media (max-width: 360px) {
  .cxq-board-wrap {
    --piece-size: 34px;
  }
  
  .cxq-actions {
    grid-template-columns: 1fr 1fr;
  }
  
  .cxq-btn-primary {
    grid-column: span 2;
  }
  
  .cxq-turn {
    flex-wrap: wrap;
  }
  
  .cxq-turn-info {
    flex: 1;
    min-width: 0;
  }
}

/* AI 思考时禁用棋盘光标 */
body.is-ai-thinking #cxq-canvas { cursor: wait; }
body.is-modal-open { overflow: hidden; }