* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #FFF7E6;
  color: #3a2f1b;
}
.topbar {
  background: #FF8A3D; color: #fff; padding: 14px 18px;
  font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.tabs { display: flex; gap: 10px; padding: 14px; overflow-x: auto; }
.tab {
  flex: 0 0 auto; padding: 12px 18px; border-radius: 16px; background: #fff;
  border: 2px solid #FFD8A8; font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tab.active { background: #FF8A3D; color: #fff; border-color: #FF8A3D; }
.board {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px; padding: 8px 18px 40px;
}
.card {
  background: #fff; border-radius: 20px; padding: 18px 10px; text-align: center;
  box-shadow: 0 4px 0 #FFD8A8; cursor: pointer; user-select: none;
}
.card .py { font-size: 42px; font-weight: 700; color: #2f6fed; }
.card .hz { font-size: 18px; color: #888; margin-top: 6px; }
.card .read { margin-top: 10px; font-size: 13px; color: #FF8A3D; font-weight: 600; }
.card:active { transform: translateY(2px); box-shadow: 0 2px 0 #FFD8A8; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  background: #fff; border-radius: 24px; padding: 28px 22px; width: 100%; max-width: 360px; text-align: center;
}
.big-pinyin { font-size: 64px; font-weight: 800; color: #2f6fed; margin-bottom: 10px; }
.status { color: #888; margin-bottom: 18px; font-size: 15px; }
.record-btn {
  width: 100%; padding: 16px; border: none; border-radius: 18px;
  background: #FF8A3D; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
}
.record-btn.recording { background: #e0463b; }
.stars { font-size: 36px; margin: 18px 0 6px; letter-spacing: 4px; }
.feedback { font-size: 18px; color: #3a2f1b; font-weight: 600; margin-bottom: 18px; }
.close-btn {
  width: 100%; padding: 12px; border: 2px solid #FFD8A8; border-radius: 16px;
  background: #fff; color: #FF8A3D; font-size: 16px; font-weight: 700; cursor: pointer;
}
