/* 咖啡飞花令 - 墨水屏专用样式
 * 原则：纯黑白高对比 / 无动画无渐变无阴影 / 大字号大按钮 / 兼容老内核(不用grid、CSS变量)
 */
* { 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: 12px 16px 280px; } /* 底部留白给固定按钮栏 */
.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; }

/* ---------- 顶栏 ---------- */
#topbar { position: relative; }
#brand { font-size: 42px; font-weight: bold; padding: 4px 140px 10px 0; letter-spacing: 2px; }
#net-status { font-size: 16px; font-weight: normal; margin-left: 12px; letter-spacing: 0; }
#btn-menu {
  position: absolute; right: 0; top: 0;
  font-size: 26px; font-weight: bold; min-height: 64px; padding: 8px 26px;
}
#scorebar { display: flex; border: 3px solid #000; border-radius: 10px; overflow: hidden; }
.score-cell { flex: 1; text-align: center; padding: 8px 2px; border-left: 2px solid #000; }
.score-cell:first-child { border-left: none; }
.score-name { font-size: 20px; font-weight: bold; }
.score-day { font-size: 34px; font-weight: bold; line-height: 1.2; }
.score-round { font-size: 15px; }

/* ---------- 题目区（大字号大显示范围） ---------- */
#qmeta { padding: 12px 2px 6px; font-size: 22px; }
#qcard { border: 3px solid #000; border-radius: 12px; padding: 24px 24px 30px; min-height: 420px; }
#qtitle { font-size: 34px; font-weight: bold; text-align: center; }
#qhint { font-size: 26px; text-align: center; padding: 8px 0 18px; }
#qline, #qblank, #qanswer { text-align: center; font-size: 58px; font-weight: bold; padding: 12px 0; letter-spacing: 3px; line-height: 1.4; }
#qblank { border-bottom: 3px dashed #000; margin: 0 30px; }
#qanswer { border: 3px solid #000; border-radius: 10px; margin: 10px 12px 0; padding: 14px; }
.ans-line { text-decoration: underline; }
#judge-tip { text-align: center; font-size: 30px; font-weight: bold; padding: 14px 0 0; min-height: 52px; }

/* ---------- 按钮区（固定在页面底部） ---------- */
#actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; border-top: 3px solid #000;
  padding: 10px 16px 14px;
}
.btn-row { display: flex; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; }
.big-btn {
  display: block; width: 100%; font-size: 34px; font-weight: bold;
  min-height: 96px; padding: 14px 8px; margin: 6px;
}
.name-btn { width: 46%; flex: 1 1 46%; }
.judge-btn { width: 46%; flex: 1 1 46%; min-height: 100px; }
.judge-btn3 { width: 30%; flex: 1 1 30%; min-height: 96px; font-size: 30px; }
.judge-yes { border-width: 5px; }
#qfull { font-size: 38px; line-height: 1.9; padding: 12px 8px; text-align: justify; }

/* ---------- 右上角菜单弹出层 ---------- */
#menu-overlay {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(0,0,0,0.5);
}
#menu-panel {
  max-width: 560px; margin: 90px auto 0; background: #fff;
  border: 4px solid #000; border-radius: 12px; padding: 20px 22px 24px;
}
#menu-title { font-size: 32px; font-weight: bold; text-align: center; padding-bottom: 14px; }
.menu-item { font-size: 32px; min-height: 96px; margin: 8px 0; }

/* ---------- 结算 / 历史 ---------- */
#summary-box, #history-box { border: 3px solid #000; border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.sum-title { font-size: 26px; font-weight: bold; text-align: center; padding-bottom: 10px; }
.sum-table { width: 100%; border-collapse: collapse; }
.sum-table th, .sum-table td { border: 2px solid #000; padding: 8px 6px; text-align: center; font-size: 22px; }
.sum-table th { font-size: 18px; }
.sum-note { font-size: 17px; padding-top: 10px; text-align: center; }
.hist-item { border-bottom: 2px solid #000; padding: 10px 2px; font-size: 18px; }
.hist-item:last-child { border-bottom: none; }
.hist-date { font-weight: bold; font-size: 20px; }
#summary-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: #fff; border-top: 3px solid #000; padding: 10px 16px 14px;
}
#summary-actions .big-btn { flex: 0 1 968px; font-size: 30px; min-height: 90px; }

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

/* ---------- 小屏(手机调试)适配 ---------- */
@media (max-width: 480px) {
  body { font-size: 18px; }
  #app { padding-bottom: 230px; }
  #brand { font-size: 32px; padding-right: 110px; }
  #btn-menu { font-size: 20px; min-height: 52px; padding: 6px 18px; }
  .score-day { font-size: 26px; }
  #qline, #qblank, #qanswer { font-size: 38px; }
  .big-btn { font-size: 26px; min-height: 76px; }
  .judge-btn3 { font-size: 22px; min-height: 76px; }
  #qfull { font-size: 28px; }
  #qcard { min-height: 300px; }
  #menu-panel { margin: 50px 16px 0; }
}