/* 刨冰围棋 - 墨水屏专用样式（单一适配墨案 W7：10.3寸 1404x1872 / Android 8.1 老内核）
 * 原则：纯黑白高对比 / 无动画无渐变无阴影 / 大字号大按钮 / 不用 grid、CSS变量、flex gap
 * 尺寸约定沿用 KaFei 在 W7 上验证过的体系：max-width 1000px / 正文 22px / 大按钮 96px
 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); }
html, body { background: #fff; color: #000; }
body {
  font-family: "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
#app { max-width: 1000px; margin: 0 auto; padding: 10px 14px 320px; }
.hidden { display: none !important; }
button {
  font-family: inherit; color: #000; background: #fff;
  border: 3px solid #000; border-radius: 10px;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
button:active { background: #000; color: #fff; }
button:disabled { border-color: #999; color: #999; }

/* ---------- 顶栏 ---------- */
#topbar { position: relative; min-height: 64px; }
#brand { font-size: 38px; font-weight: bold; padding: 2px 0 8px; letter-spacing: 2px; }
#net-status { font-size: 16px; font-weight: normal; margin-left: 12px; letter-spacing: 0; }
#btn-back {
  position: absolute; right: 0; top: 0;
  font-size: 24px; font-weight: bold; min-height: 60px; padding: 6px 24px;
}

/* ---------- 通用 ---------- */
.field-label { font-size: 20px; font-weight: bold; padding: 12px 2px 6px; }
.seg { display: flex; flex-wrap: wrap; border: 3px solid #000; border-radius: 10px; overflow: hidden; }
.seg button {
  flex: 1 1 0; border: none; border-left: 2px solid #000; border-radius: 0;
  font-size: 22px; font-weight: bold; min-height: 64px; padding: 6px 2px;
  white-space: nowrap;
}
.seg button:first-child { border-left: none; }
.seg .seg-sel { background: #000; color: #fff; }
.big-btn {
  display: block; width: 100%; font-size: 32px; font-weight: bold;
  min-height: 96px; padding: 12px 8px; margin: 6px 0;
}
.btn-row { display: flex; flex-wrap: wrap; }
.btn-row .big-btn { flex: 1 1 0; width: auto; margin: 6px; }
.primary-btn { font-size: 38px; min-height: 116px; border-width: 5px; }

/* ---------- 首页 ---------- */
#today-card { border: 3px solid #000; border-radius: 12px; padding: 16px 18px; margin-top: 6px; }
#today-line { font-size: 28px; font-weight: bold; }
#goal-bar { border: 2px solid #000; border-radius: 6px; height: 26px; margin: 10px 0; overflow: hidden; }
#goal-fill { background: #000; height: 100%; width: 0; }
#total-line { font-size: 20px; }

/* ---------- 题库列表 ---------- */
#list-meta { font-size: 20px; padding: 10px 2px 6px; }
.prob-row {
  display: block; width: 100%; text-align: left;
  border: 3px solid #000; border-radius: 10px;
  font-size: 24px; min-height: 84px; padding: 10px 14px; margin: 8px 0;
}
.prob-row .prob-name { font-weight: bold; }
.prob-row .prob-sub { font-size: 18px; font-weight: normal; }
.prob-mark { float: right; font-weight: bold; font-size: 26px; }
#list-pager { display: flex; margin-top: 10px; }
#list-pager button { flex: 1 1 0; font-size: 24px; font-weight: bold; min-height: 72px; margin: 0 6px; }
#list-pager .page-info { flex: 1 1 0; text-align: center; font-size: 22px; line-height: 72px; }

/* ---------- 做题 ---------- */
#solve-meta { font-size: 22px; font-weight: bold; padding: 2px; }
#solve-goal { font-size: 24px; padding: 2px 2px 8px; }
#board-wrap, #board-wrap2 { border: 3px solid #000; border-radius: 8px; padding: 6px; }
#judge-tip { text-align: center; font-size: 30px; font-weight: bold; padding: 12px 0 0; min-height: 58px; }
#solve-sub { text-align: center; font-size: 19px; min-height: 30px; padding-bottom: 4px; }

/* ---------- 棋盘（board.js 生成 DOM） ---------- */
.bb-board { position: relative; background: #fff; }
.bb-line-h, .bb-line-v { position: absolute; background: #000; }
.bb-star { position: absolute; background: #000; border-radius: 50%; }
.bb-stone { position: absolute; border-radius: 50%; }
.bb-stone-B { background: #000; }
.bb-stone-W { background: #fff; border: 3px solid #000; }
.bb-hit { position: absolute; z-index: 5; }
.bb-last { position: absolute; border-radius: 50%; z-index: 3; }
.bb-last-on-B { background: #fff; }
.bb-last-on-W { background: #000; }
.bb-mark {
  position: absolute; z-index: 4; text-align: center; font-weight: bold;
  line-height: 1;
}
.bb-mark-x { color: #000; }
.bb-mark-num-on-B { color: #fff; }
.bb-mark-num-on-W { color: #000; }
.bb-hint { position: absolute; z-index: 4; border: 4px dashed #000; border-radius: 50%; }
.bb-terr { position: absolute; z-index: 2; }
.bb-terr-B { background: #000; }
.bb-terr-W { background: #fff; border: 2px solid #000; }

/* ---------- 结算 / 统计 ---------- */
#summary-box, #stats-box { border: 3px solid #000; border-radius: 12px; padding: 16px 18px; margin-top: 8px; }
.sum-title { font-size: 30px; font-weight: bold; text-align: center; padding-bottom: 10px; }
.sum-big { font-size: 52px; font-weight: bold; text-align: center; padding: 8px 0; }
.sum-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.sum-table th, .sum-table td { border: 2px solid #000; padding: 8px 6px; text-align: center; font-size: 21px; }
.sum-table th { font-size: 18px; }
.sum-note { font-size: 18px; padding-top: 10px; text-align: center; }

/* ---------- 双人 ---------- */
#game-status { text-align: center; font-size: 28px; font-weight: bold; padding: 12px 0 0; min-height: 52px; }
#game-score { text-align: center; font-size: 22px; padding: 4px 0; }

/* ---------- 底部固定操作栏 ---------- */
#actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; border-top: 3px solid #000;
  padding: 8px 14px 12px;
}
#actions .btn-row { max-width: 1000px; margin: 0 auto; }
.act-btn { font-size: 27px; min-height: 88px; }
.act-primary { font-size: 34px; min-height: 104px; border-width: 5px; }

/* ---------- 加载 ---------- */
#view-loading { padding: 60px 0; text-align: center; }
#loading-text { font-size: 26px; padding-bottom: 24px; }
#btn-retry { max-width: 400px; margin: 0 auto; }