* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #222;
}
.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.brand { font-size: 18px; font-weight: 600; color: #c0392b; }
.book-select {
  font-size: 15px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  max-width: 60%;
}
.study-view {
  flex: 1;
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}
.study-inner {
  width: 100%;
  max-width: 520px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.progress-wrap { width: 100%; margin-bottom: 18px; }
.progress-text { font-size: 14px; color: #888; margin-bottom: 6px; text-align: center; }
.progress-bar { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #c0392b; width: 0; transition: width .2s; }
.card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.word-line { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.speaker {
  flex: none;
  border: none;
  background: #eef3fb;
  color: #2b6cb0;
  font-size: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.speaker:hover { background: #e2ecf9; }
.speaker:active { background: #dbe7f7; }
.word { font-size: 42px; font-weight: 600; color: #222; margin-bottom: 12px; }
.phon { font-size: 20px; color: #2b6cb0; margin-bottom: 16px; }
.mean { font-size: 22px; color: #444; margin-bottom: 18px; }
.example { background: #faf7f2; border-radius: 10px; padding: 14px; text-align: left; }
.ex-en { font-size: 16px; color: #333; margin-bottom: 6px; }
.ex-zh { font-size: 15px; color: #888; }
.actions { display: flex; gap: 16px; width: 100%; }
.btn {
  flex: 1;
  font-size: 18px;
  padding: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  background: #c0392b;
  color: #fff;
}
.btn-known { background: #2ecc71; color: #fff; }
.btn-unknown { background: #e67e22; color: #fff; }
.hint { font-size: 13px; color: #aaa; text-align: center; }
.done-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.done-title { font-size: 26px; font-weight: 600; margin-bottom: 16px; }
.done-stat { font-size: 18px; color: #555; margin-bottom: 28px; }
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(192,57,43,.3);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.close { cursor: pointer; color: #999; font-size: 20px; }
.modal-body { padding: 12px 20px; overflow-y: auto; }
.urow { padding: 12px 0; border-bottom: 1px solid #f3f3f3; }
.uw { font-size: 18px; font-weight: 600; }
.um { font-size: 14px; color: #777; margin-top: 4px; }
.empty { padding: 30px; text-align: center; color: #aaa; }
.hidden { display: none !important; }
