/* playcard 嵌入适配层：覆盖上游 main.css 的布局，使其塞进 ~480×480 的 iframe。
   只做覆盖不改上游文件；字体换成系统栈，去掉 Clear Sans 字体文件的依赖。 */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body { display: flex; flex-direction: column; background: #faf8ef; }

.container {
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 8px;
  box-sizing: border-box;
}

/* 压缩的页头：标题 + 分数 + 新游戏 同一行 */
.heading { display: flex; align-items: center; gap: 8px; margin: 0; }

.title { font-size: 34px; line-height: 1; margin: 0 8px 0 0; width: auto; }

.scores-container { float: none; position: static; display: flex; gap: 6px; margin: 0; }

.score-container, .best-container {
  position: relative;
  display: inline-block;
  padding: 3px 12px;
  font-size: 19px;
  min-width: 62px;
  line-height: 1.25;
  box-sizing: border-box;
}

.score-container:before { content: "SCORE"; }
.best-container:before { content: "BEST"; }

.score-container:before, .best-container:before {
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  font-size: 9px;
}

.score-addition { font-size: 19px !important; }

/* 新游戏按钮并入页头 */
.above-game { display: contents; }

.game-intro { display: none; }

.restart-button {
  float: none;
  margin: 0 0 0 auto;
  padding: 6px 14px;
  font-size: 14px;
  line-height: 1.4;
}

/* 棋盘视口：吃掉剩余空间，JS 等比缩放内部棋盘 */
.board-viewport {
  flex: 1;
  min-height: 0;
  margin-top: 6px;
  overflow: hidden;
}

.game-container { margin-top: 0; }

/* 嵌入态不需要的说明文字与页脚（版权信息保留在 LICENSE.txt 与源码注释） */
.game-explanation, .container > hr, .container > p { display: none; }

/* 屏上方向键（input-pad.js 注入）：纯点击可玩，不依赖键盘焦点 */
#pc-dpad {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.pc-dpad-row { display: flex; gap: 4px; justify-content: center; }
.pc-dpad-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(143, 122, 102, 0.82);
  color: #f9f6f2;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
}
.pc-dpad-btn:active { background: rgba(110, 92, 76, 0.95); transform: scale(0.92); }
.pc-dpad-gap { visibility: hidden; }
