/* 所有页面共用的一点样式：配色、返回按钮、按钮 */
:root { --bg: #f6f1e7; --ink: #1d1b18; --accent: #ff5a36; --card: #fffaf0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
.back {
  position: fixed; top: 14px; left: 14px; z-index: 10;
  font-weight: 800; font-size: 14px; text-decoration: none;
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 999px;
  padding: 6px 14px; box-shadow: 3px 3px 0 var(--ink);
}
.back .v { color: var(--accent); }
.back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn {
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink);
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 12px;
  padding: 7px 14px; box-shadow: 3px 3px 0 var(--ink);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.on { background: var(--accent); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.page-title { font-size: clamp(30px, 6vw, 52px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.hint { font-size: 13px; opacity: .55; text-align: center; line-height: 1.7; }
kbd { font-family: inherit; border: 1.5px solid currentColor; border-radius: 5px; padding: 0 5px; font-size: 12px; }

/* ---------- 手机端 ---------- */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; } /* 防止双击放大 */
canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } /* 长按不弹系统菜单 */
.touch-only { display: none; }
@media (hover: none) and (pointer: coarse) {
  .kbd-only { display: none !important; }   /* 手机上没有键盘，隐藏按键提示 */
  .touch-only { display: inline; }
}
@media (max-width: 520px) {
  .back { top: 10px; left: 10px; font-size: 13px; padding: 5px 12px; box-shadow: 2px 2px 0 var(--ink); }
  .page-title { font-size: 30px; }
  .btn { font-size: 13px; padding: 6px 11px; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
  .hint { font-size: 12px; }
}
