/* 考公上岸 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* hidden属性必须真正隐藏（防止被 display 样式覆盖导致透明罩子挡住页面） */
[hidden] { display: none !important; }
:root {
  --blue: #3b5bfd;
  --blue-dark: #2f46c9;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1c2333;
  --text2: #6b7488;
  --line: #e6e9f2;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #ea870e;
  --radius: 14px;
}
html { font-size: 16px; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 78px;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
}
#topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #3b5bfd, #6a5bff);
  color: #fff;
  padding: 16px 18px;
  font-size: 1.15rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 0 0 18px 18px;
}
#topbar .btn-ghost {
  background: rgba(255,255,255,.18); color: #fff; border: none;
  padding: 6px 12px; border-radius: 999px; font-size: .85rem; cursor: pointer;
}
main { padding: 14px 14px 20px; }
.page { animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; } }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(28,35,51,.06);
}
.card h2 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.muted { color: var(--text2); font-size: .85rem; }
.small { font-size: .8rem; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--blue); color: #fff; border: none;
  padding: 12px 18px; border-radius: 12px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
}
.btn:active { background: var(--blue-dark); }
.btn.block { display: flex; width: 100%; }
.btn.gray { background: #eef0f7; color: var(--text); }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.btn.sm { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .5; }

/* 标签栏 */
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  max-width: 560px; margin: 0 auto;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text2); font-size: .72rem; padding: 4px 0; border-radius: 10px;
}
.tab .tab-ico { font-size: 1.3rem; filter: grayscale(1) opacity(.75); }
.tab.active { color: var(--blue); font-weight: 600; }
.tab.active .tab-ico { filter: none; }

/* 列表 */
.item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
  cursor: pointer; text-align: left; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; font-size: .92rem; color: var(--text);
}
.item:last-child { border-bottom: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .meta { font-size: .78rem; color: var(--text2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: .72rem; padding: 2px 8px; border-radius: 999px;
  background: #eef0f7; color: var(--text2); white-space: nowrap;
}
.tag.blue { background: #e3eaff; color: var(--blue); }
.tag.green { background: #e2f6e9; color: var(--green); }
.tag.red { background: #fde8e8; color: var(--red); }
.tag.orange { background: #fdf0dd; color: var(--orange); }

/* 题目 */
.q-stem { font-size: 1rem; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.q-stem p { margin: 6px 0; }
.q-opt {
  display: block; width: 100%; text-align: left;
  background: #f7f8fc; border: 1.5px solid var(--line);
  padding: 12px 14px; border-radius: 12px; margin-top: 10px;
  font-size: .93rem; line-height: 1.6; cursor: pointer;
}
.q-opt.sel { border-color: var(--blue); background: #eef1ff; }
.q-opt.ok { border-color: var(--green); background: #e8f8ee; }
.q-opt.bad { border-color: var(--red); background: #fdeeee; }
.q-opt .lbl { font-weight: 700; margin-right: 6px; }
.verdict { font-size: .95rem; font-weight: 600; margin: 12px 0 6px; }
.verdict.ok { color: var(--green); }
.verdict.bad { color: var(--red); }
.analysis { background: #f7f8fc; border-radius: 12px; padding: 12px 14px; font-size: .88rem; line-height: 1.7; }
.analysis p { margin: 6px 0; }

/* 进度条 */
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--blue); transition: width .25s; }

/* 底部弹层 */
#sheet {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,20,35,.5);
  display: flex; align-items: flex-end;
}
#sheet .panel {
  background: var(--card); width: 100%; max-width: 560px; margin: 0 auto;
  border-radius: 20px 20px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  animation: slideup .2s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
#sheet h3 { margin-bottom: 12px; font-size: 1.05rem; }

/* 表单 */
label.f { display: block; font-size: .85rem; color: var(--text2); margin: 12px 0 6px; }
input[type=text], textarea, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: .92rem; font-family: inherit; background: #fafbfe;
}
textarea { min-height: 90px; line-height: 1.6; }
select { background: #fff; }

/* 语音区 */
.voice-box {
  background: #f0f4ff; border-radius: 14px; padding: 16px;
  text-align: center;
}
.voice-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); margin-right: 8px; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.voice-text { margin-top: 12px; text-align: left; font-size: .9rem; line-height: 1.7; background: #fff; border-radius: 10px; padding: 12px; min-height: 60px; white-space: pre-wrap; }

/* 弹窗提示 */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: rgba(28,35,51,.92); color: #fff; padding: 10px 18px;
  border-radius: 999px; font-size: .88rem; z-index: 200;
  animation: fadein .2s ease;
}
.hero-num { font-size: 2rem; font-weight: 700; color: var(--blue); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: #f7f8fc; border-radius: 12px; padding: 12px; text-align: center; }
.stat-box .n { font-size: 1.3rem; font-weight: 700; }
.stat-box .l { font-size: .78rem; color: var(--text2); margin-top: 2px; }
