/* 糖果猜词 - 墨水屏专用样式（抢答节目风格）
 * 布局：反色标题块顶栏 / 左侧字母格主题区 / 右侧选手抢答席 / 底部判定栏
 * 原则：纯黑白高对比 / 无动画无渐变无阴影 / 大字号大按钮 / 兼容老内核(不用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: 1240px; margin: 0 auto; padding: 12px 16px 330px; } /* 底部留白给固定按钮栏 */
.hidden { display: none !important; }
button {
  font-family: inherit; color: #000; background: #fff;
  border: 3px solid #000; border-radius: 8px;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
button:active { background: #000; color: #fff; }
button[disabled] { border-style: dashed; cursor: default; }
button[disabled]:active { background: #fff; color: #000; }

/* ---------- 顶栏：反色标题块 ---------- */
#topbar { display: flex; align-items: center; margin-bottom: 14px; }
#brand {
  background: #000; color: #fff; font-size: 34px; font-weight: bold;
  letter-spacing: 4px; padding: 8px 22px; border-radius: 8px; white-space: nowrap;
}
#qmeta { flex: 1; padding: 0 18px; font-size: 21px; }
#net-status { font-size: 16px; margin-right: 14px; white-space: nowrap; }
#btn-menu { font-size: 24px; font-weight: bold; min-height: 58px; padding: 6px 24px; }

/* ---------- 主题区 + 抢答席 ---------- */
#stage { display: flex; align-items: stretch; }
#main { flex: 1; border: 4px solid #000; border-radius: 12px; padding: 22px 20px 26px; min-height: 480px; }
#meaning { font-size: 46px; font-weight: bold; text-align: center; letter-spacing: 2px; }
#tags { text-align: center; padding: 10px 0 4px; }
.tag { display: inline-block; border: 2px solid #000; border-radius: 6px; font-size: 20px; padding: 2px 14px; margin: 0 5px; }

/* 字母格：实线格=已揭示，虚线空格=待揭示 */
#word { display: flex; flex-wrap: wrap; justify-content: center; margin: 24px 0 12px; }
.cell {
  width: 70px; height: 84px; border: 3px solid #000; border-radius: 6px; margin: 4px;
  font-size: 50px; font-weight: bold; text-align: center; line-height: 78px;
}
.cell-hide { border-style: dashed; }
#word.w-med .cell { width: 54px; height: 66px; font-size: 38px; line-height: 60px; }
#word.w-small .cell { width: 42px; height: 54px; font-size: 30px; line-height: 48px; margin: 3px; }

/* 揭示进度：小方块条 + 文本（只在揭示时重渲染） */
#progress { text-align: center; font-size: 20px; padding: 6px 0; }
.tick { display: inline-block; width: 15px; height: 15px; border: 2px solid #000; margin: 0 2px; vertical-align: middle; }
.tick-on { background: #000; }
#judge-tip { text-align: center; font-size: 28px; font-weight: bold; padding: 14px 0 0; min-height: 48px; }

/* 右侧选手抢答席：名字+积分一体的大按钮 */
#side { width: 264px; margin-left: 16px; }
.player { display: block; width: 100%; min-height: 112px; margin: 0 0 12px; padding: 8px 6px; text-align: center; border-width: 3px; }
.player:last-child { margin-bottom: 0; }
.p-name { display: block; font-size: 26px; font-weight: bold; letter-spacing: 2px; }
.p-score { display: block; font-size: 46px; font-weight: bold; line-height: 1.1; }
.p-tag { display: block; font-size: 18px; font-weight: bold; }
.player-on { background: #000; color: #fff; border-width: 4px; }
.player-on:active { background: #000; color: #fff; }

/* ---------- 底部判定栏（固定） ---------- */
#actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #fff; border-top: 4px solid #000;
  padding: 10px 16px 14px;
}
.btn-row { display: flex; flex-wrap: wrap; max-width: 1240px; margin: 0 auto; }
.big-btn {
  display: block; width: 100%; font-size: 34px; font-weight: bold;
  min-height: 96px; padding: 14px 8px; margin: 6px;
}
.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-sel { background: #000; color: #fff; border-width: 5px; } /* 单选选中：反色高亮 */
.judge-sel:active { background: #000; color: #fff; }
.next-primary { font-size: 40px; min-height: 120px; border-width: 5px; } /* 下一题：主按钮，加大 */

/* ---------- 右上角菜单弹出层 ---------- */
#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: 4px solid #000; border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.sum-title { font-size: 28px; font-weight: bold; text-align: center; padding-bottom: 12px; }
.sum-cards { display: flex; flex-wrap: wrap; }
.sum-card { flex: 1 1 0; border: 3px solid #000; border-radius: 8px; margin: 6px; padding: 12px 6px; text-align: center; min-width: 140px; }
.sc-name { font-size: 24px; font-weight: bold; }
.sc-val { font-size: 48px; font-weight: bold; line-height: 1.2; }
.sc-day { font-size: 18px; }
.sum-note { font-size: 18px; padding-top: 12px; 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: 4px solid #000; padding: 10px 16px 14px;
}
#summary-actions .big-btn { flex: 0 1 1208px; font-size: 30px; min-height: 90px; }

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

/* ---------- 小屏(手机竖屏调试)适配：抢答席改横排 ---------- */
@media (max-width: 900px) {
  body { font-size: 18px; }
  #app { padding-bottom: 300px; }
  #brand { font-size: 26px; letter-spacing: 2px; padding: 6px 14px; }
  #qmeta { font-size: 16px; padding: 0 10px; }
  #net-status { display: none; }
  #btn-menu { font-size: 20px; min-height: 50px; padding: 4px 16px; }
  #stage { display: block; }
  #main { min-height: 300px; padding: 16px 12px 20px; }
  #meaning { font-size: 32px; }
  .tag { font-size: 16px; padding: 1px 10px; }
  .cell { width: 46px; height: 58px; font-size: 34px; line-height: 52px; margin: 3px; }
  #word.w-med .cell { width: 38px; height: 48px; font-size: 28px; line-height: 42px; }
  #word.w-small .cell { width: 30px; height: 40px; font-size: 22px; line-height: 34px; margin: 2px; }
  #judge-tip { font-size: 22px; }
  #side { display: flex; width: auto; margin: 12px 0 0; }
  .player { flex: 1 1 0; min-height: 88px; margin: 0 4px; padding: 6px 2px; }
  .player:last-child { margin-right: 0; }
  .p-name { font-size: 20px; }
  .p-score { font-size: 32px; }
  .p-tag { font-size: 14px; }
  .big-btn { font-size: 26px; min-height: 76px; }
  .judge-btn3 { font-size: 22px; min-height: 76px; }
  .next-primary { font-size: 30px; min-height: 96px; }
  .sc-val { font-size: 36px; }
  #menu-panel { margin: 50px 16px 0; }
}