/* ============ 识药闯关 · 中药风主题 ============ */
:root {
  --paper: #f6f1e5;
  --paper-2: #efe7d2;
  --card: #fffdf6;
  --ink: #2c3a33;
  --ink-soft: #5c6b62;
  --green: #2f5d4c;
  --green-deep: #1e4234;
  --green-soft: #e7efe8;
  --gold: #c9a227;
  --gold-soft: #f0e6c8;
  --red: #b04040;
  --red-soft: #f7e6e3;
  --ok: #2e7d4f;
  --ok-soft: #e3f1e7;
  --shadow: 0 12px 32px rgba(46, 70, 60, .13);
  --shadow-sm: 0 4px 14px rgba(46, 70, 60, .10);
  --radius: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 12% -8%, rgba(201, 162, 39, .10), transparent 55%),
    radial-gradient(900px 520px at 105% 105%, rgba(47, 93, 76, .12), transparent 50%),
    var(--paper);
  min-height: 100vh;
  line-height: 1.6;
  background-color: var(--paper);
}
.online-topbar {
  position: sticky;
  top: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: 680px;
  margin: 0 auto;
  padding: 10px 16px;
  background: rgba(246, 241, 229, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, .18);
}
.brand-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-deep);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}
.brand-back:hover {
  color: var(--gold);
}
.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(150deg, #b34040, #8e2f2f);
  color: #f8f1e3;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: .85rem;
  transform: rotate(-5deg);
}
.online-version {
  flex: none;
  color: var(--ink-soft);
  font-size: .74rem;
  background: var(--green-soft);
  border-radius: 999px;
  padding: 3px 9px;
  letter-spacing: .08em;
}
img { display: block; max-width: 100%; }
img.img-error { background: #e8e1cf; min-height: 120px; }
button { font-family: inherit; cursor: pointer; }
code { background: var(--green-soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

.app { max-width: 620px; margin: 0 auto; padding: 18px 16px 46px; min-height: calc(100vh - 48px); }
@media (min-width: 1024px) { .app { max-width: 680px; } }

.is-hidden { display: none !important; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: none; border-radius: var(--radius-sm);
  font-size: 1.02rem; font-weight: 600; letter-spacing: .04em;
  padding: 14px 20px; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.btn:active { transform: scale(.97); }
.btn-lg { width: 100%; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.btn-lg .btn-glyph { font-size: 1.6rem; }
.btn-lg .btn-hint { font-size: .78rem; font-weight: 400; color: var(--ink-soft); }
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #fdfaf1;
  box-shadow: 0 8px 22px rgba(30, 66, 52, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 66, 52, .34); }
.btn-ghost {
  background: var(--card); color: var(--green-deep);
  border: 1.5px solid rgba(47, 93, 76, .28);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--green-deep); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }

.icon-btn {
  background: transparent; border: none; color: var(--green-deep);
  font-size: 1.5rem; line-height: 1; padding: 6px 10px; border-radius: 10px;
}
.icon-btn:hover { background: rgba(47, 93, 76, .10); }
.link-btn { background: none; border: none; color: var(--ink-soft); font-size: .86rem; text-decoration: underline; }

/* ---------- 首页 ---------- */
.view-home { text-align: center; }
.home-hero { padding: 34px 8px 24px; }
.seal {
  width: 74px; height: 74px; margin: 0 auto 14px;
  background: linear-gradient(150deg, #b34040, #8e2f2f);
  color: #f8f1e3; font-size: 2.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px; transform: rotate(-5deg);
  box-shadow: 0 10px 22px rgba(142, 47, 47, .30), inset 0 0 0 3px rgba(248, 241, 227, .35);
  font-family: "Songti SC", "STSong", "SimSun", serif;
}
.game-title {
  font-size: clamp(2.2rem, 8vw, 3rem);
  letter-spacing: .18em; color: var(--green-deep);
  font-family: "Songti SC", "STSong", "SimSun", serif; font-weight: 700;
  text-shadow: 0 2px 0 rgba(201, 162, 39, .25);
}
.game-sub { color: var(--ink-soft); margin-top: 4px; letter-spacing: .22em; font-size: .92rem; }
.home-stats { display: flex; gap: 12px; justify-content: center; margin: 26px auto 6px; }
.stat-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 12px 18px; min-width: 96px; border-top: 3px solid var(--gold);
}
.stat-num { display: block; font-size: 1.5rem; font-weight: 700; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .72rem; color: var(--ink-soft); letter-spacing: .1em; }
.home-actions { display: grid; gap: 14px; margin-top: 24px; }
.home-foot { margin-top: 26px; }

/* ---------- 闯关 ---------- */
.view-quiz { padding-top: 4px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.quiz-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-deep); font-size: 1.06rem; }
.quiz-score {
  background: var(--green-deep); color: #f4ecd8; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; font-size: .94rem;
  font-variant-numeric: tabular-nums; transition: transform .2s ease, background .2s ease;
  position: relative;
}
.quiz-score.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.22); background: var(--gold); color: #2d3a32; } 100% { transform: scale(1); } }
.quiz-score .float-plus { position: absolute; right: 12px; top: -22px; color: var(--gold); font-weight: 800; animation: floatUp 1s ease forwards; }
@keyframes floatUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-26px); } }

.quiz-progress { display: flex; gap: 5px; margin-bottom: 12px; }
.progress-cell { flex: 1; height: 8px; border-radius: 999px; background: rgba(47, 93, 76, .14); transition: background .3s, transform .3s; }
.progress-cell.done { background: var(--green); }
.progress-cell.cur { background: var(--gold); transform: scaleY(1.25); }

.quiz-ques { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.ques-count { font-size: .84rem; color: var(--ink-soft); }
.ques-cat { font-size: .8rem; color: var(--gold); background: var(--gold-soft); padding: 2px 10px; border-radius: 999px; }

.ques-stage { animation: stageIn .35s ease; }
@keyframes stageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ques-img-wrap {
  position: relative;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px; margin-bottom: 16px; border: 1px solid rgba(201, 162, 39, .25);
}
.ques-img-wrap img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px;
  background: #efe9da;
}
.opts { display: grid; gap: 10px; }
@media (min-width: 560px) { .opts { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border: 1.5px solid rgba(47, 93, 76, .20);
  border-radius: var(--radius-sm); padding: 13px 14px; font-size: 1.06rem; font-weight: 600;
  color: var(--ink); transition: all .16s ease; box-shadow: var(--shadow-sm);
}
.opt:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); }
.opt:disabled { cursor: default; }
.opt .opt-key {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--green-soft); color: var(--green-deep);
  display: flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700;
}
.opt.right { border-color: var(--ok); background: var(--ok-soft); color: #1c4a2f; animation: pop .4s ease; }
.opt.right .opt-key { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); color: #7c2525; animation: shake .4s ease; }
.opt.wrong .opt-key { background: var(--red); color: #fff; }
@keyframes pop { 45% { transform: scale(1.035); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.feedback { text-align: center; margin: 12px 0 4px; font-weight: 700; animation: stageIn .3s ease; }
.feedback.ok { color: var(--ok); }
.feedback.no { color: var(--red); }

/* 知识点卡片 */
.know-card {
  margin-top: 14px; background: linear-gradient(160deg, var(--card), #fbf7ea);
  border: 1px solid rgba(201, 162, 39, .35); border-left: 5px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 16px 18px; animation: cardIn .4s ease;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.know-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.know-name { font-size: 1.3rem; font-weight: 800; color: var(--green-deep); font-family: "Songti SC", "STSong", "SimSun", serif; }
.know-head .icon-btn { margin-left: auto; font-size: 1.1rem; }
.chip { background: var(--green-soft); color: var(--green-deep); border-radius: 999px; padding: 2px 10px; font-size: .76rem; }
.know-body { display: grid; gap: 9px; font-size: .93rem; }
.know-body > div { display: grid; grid-template-columns: 84px 1fr; gap: 6px; align-items: start; }
.know-body dt { color: var(--gold); font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.know-body dd { color: var(--ink); }
.know-card .btn { margin-top: 14px; }

/* ---------- 结算 ---------- */
.view-result { padding-top: 10px; }
.result-hero { text-align: center; padding: 8px 0 14px; }
.result-ring {
  position: relative; width: 132px; height: 132px; margin: 0 auto 12px;
  filter: drop-shadow(0 8px 18px rgba(46, 70, 60, .18));
}
.ring-svg { width: 100%; height: 100%; }
.ring-bg { fill: #fdf9ec; stroke: var(--gold-soft); stroke-width: 9; }
.ring-fg {
  fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transform: rotate(-90deg);
  transform-origin: 50% 50%; transition: stroke-dashoffset 1.1s cubic-bezier(.25,.75,.4,1);
}
.ring-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.result-score { font-size: 2.5rem; font-weight: 800; color: var(--green-deep); line-height: 1.1; font-variant-numeric: tabular-nums; }
.result-score-label { font-size: .8rem; color: var(--ink-soft); letter-spacing: .3em; }
.result-title { font-size: 1.5rem; color: var(--green-deep); font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: .12em; }
.result-meta { color: var(--ink-soft); margin-top: 4px; }
.result-rank { color: var(--gold); font-weight: 700; margin-top: 6px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; margin-top: 16px; }
.panel-title { font-size: 1rem; color: var(--green-deep); margin-bottom: 12px; letter-spacing: .1em; }
.wrong-list { display: flex; flex-direction: column; gap: 10px; }
.wrong-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--paper); border: 1px dashed rgba(176, 64, 64, .35); border-radius: var(--radius-sm); padding: 10px;
}
.wrong-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.wrong-item .w-name { font-weight: 700; color: var(--green-deep); }
.wrong-item .w-pick { font-size: .82rem; color: var(--red); }
.wrong-item .w-right { font-size: .82rem; color: var(--ok); }
.ok-line { text-align: center; color: var(--ok); font-weight: 600; padding: 10px 0; }
.result-actions { display: grid; gap: 12px; margin-top: 20px; }

/* ---------- 图鉴 ---------- */
.view-atlas { padding-top: 4px; }
.atlas-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.atlas-title { font-size: 1.3rem; color: var(--green-deep); font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: .14em; margin: 0; }
.atlas-count { margin-left: auto; color: var(--ink-soft); font-size: .84rem; background: var(--card); padding: 4px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.atlas-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chip {
  border: 1px solid rgba(47, 93, 76, .25); background: var(--card); color: var(--green-deep);
  border-radius: 999px; font-size: .82rem; padding: 5px 13px; transition: all .15s;
}
.filter-chip.on { background: var(--green-deep); color: #f4ecd8; border-color: var(--green-deep); }
.atlas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.atlas-card {
  background: var(--card); border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(47, 93, 76, .12);
  transition: transform .18s ease, box-shadow .18s ease; text-align: left; padding: 0; display: block;
}
.atlas-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(201, 162, 39, .5); }
.atlas-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #efe9da; }
.atlas-card .a-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 6px; }
.atlas-card .a-name { font-weight: 700; color: var(--green-deep); font-size: .98rem; letter-spacing: .05em; }
.atlas-card .a-cat { align-self: flex-start; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(24, 34, 29, .55); backdrop-filter: blur(3px); animation: maskIn .25s ease; }
@keyframes maskIn { from { opacity: 0; } }
.modal-panel {
  position: relative; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); max-width: 560px; width: 100%;
  max-height: 88vh; overflow: auto; animation: cardIn .32s ease;
}
.modal-close { position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(255, 253, 246, .9); border-radius: 50%; box-shadow: var(--shadow-sm); }
.modal-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.modal-info { padding: 16px 18px 20px; }
.modal-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-title-row h3 { font-size: 1.5rem; color: var(--green-deep); font-family: "Songti SC", "STSong", "SimSun", serif; }
.pinyin { color: var(--ink-soft); font-size: .88rem; letter-spacing: .08em; }
.modal-source { margin-top: 12px; font-size: .78rem; color: var(--ink-soft); }
.modal-link { font-size: .8rem; color: var(--green); }
.modal-about h3 { color: var(--green-deep); margin-bottom: 10px; margin-top: 4px; }
.modal-about p { font-size: .88rem; margin-bottom: 10px; color: var(--ink); }

/* 首次欢迎提示：给标题左侧留出足够呼吸空间 */
.notice-panel { padding: 30px clamp(28px, 6vw, 68px) 32px; }
.notice-panel h3 {
  margin: 0 0 10px; color: var(--green-deep); font-size: 1.45rem;
  font-family: "Songti SC", "STSong", "SimSun", serif; letter-spacing: .08em;
}
.notice-panel .help-note { margin: 0 0 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: var(--green-deep); color: #f4ecd8; padding: 10px 22px; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow); z-index: 60; animation: stageIn .25s ease;
}

@media (max-width: 480px) {
  .app { padding: 14px 12px 36px; }
  .result-ring { width: 108px; height: 108px; }
  .result-score { font-size: 2.2rem; }
  .home-stats { gap: 8px; }
  .stat-card { padding: 10px 12px; min-width: 84px; }
  .atlas-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
}

/* ---------- 阶段三打磨 ---------- */
/* 安全区（iPhone 刘海/底部条） */
.app { padding-bottom: calc(46px + env(safe-area-inset-bottom)); }
@media (max-width: 480px) { .app { padding-bottom: calc(36px + env(safe-area-inset-bottom)); } }

/* 错题角标 */
.btn-badge {
  position: absolute; top: 10px; right: 16px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: #2d3a32; font-size: .76rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(201, 162, 39, .45); animation: popIn .35s ease;
}
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }
.btn-lg { position: relative; }

/* 图鉴搜索框 */
.atlas-search {
  position: relative; margin-bottom: 12px;
  display: flex; align-items: center;
  background: var(--card); border: 1.5px solid rgba(47, 93, 76, .22);
  border-radius: 999px; padding: 0 16px; box-shadow: var(--shadow-sm);
  transition: border-color .15s;
}
.atlas-search:focus-within { border-color: var(--gold); }
.search-ico { color: var(--gold); font-size: 1.25rem; margin-right: 8px; }
#atlas-q {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: .94rem; color: var(--ink); padding: 11px 0;
}
#atlas-q::placeholder { color: #a99f88; }

/* 回答按钮触摸反馈 & 焦点可见性 */
.opt { min-height: 52px; }
.opt:active:not(:disabled) { transform: scale(.985); }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 进度条当前格脉冲 */
.progress-cell.cur { animation: pulseGold 1.6s ease-in-out infinite; }
@keyframes pulseGold { 50% { background: #e0c163; transform: scaleY(1.3); } }

/* 图片加载占位与淡入 */
.ques-img-wrap img, .modal-img { opacity: 0; transition: opacity .35s ease; }
.ques-img-wrap img.loaded, .modal-img.loaded { opacity: 1; }
.ques-img-wrap.img-loading::after {
  content: ""; position: absolute; inset: 12px; border-radius: 12px;
  background: linear-gradient(100deg, #efe9da 40%, #f7f3e7 50%, #efe9da 60%);
  background-size: 200% 100%; animation: shimmer 1.1s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -80% 0; } }
.atlas-card img { opacity: 0; transition: opacity .3s ease; background: #efe9da; }
.atlas-card img.loaded { opacity: 1; }
.atlas-card img.img-error, .ques-img-wrap img.img-error, .modal-img.img-error { opacity: 1; }
.wrong-item img { opacity: 0; transition: opacity .3s ease; }
.wrong-item img.loaded { opacity: 1; }

/* 结算：错题卡错落入场 */
.wrong-item { animation: cardIn .4s ease both; }
.wrong-item:nth-child(1) { animation-delay: .05s; }
.wrong-item:nth-child(2) { animation-delay: .12s; }
.wrong-item:nth-child(3) { animation-delay: .19s; }
.wrong-item:nth-child(4) { animation-delay: .26s; }
.wrong-item:nth-child(5) { animation-delay: .33s; }
.wrong-item:nth-child(6) { animation-delay: .40s; }
.wrong-item:nth-child(7) { animation-delay: .47s; }
.wrong-item:nth-child(8) { animation-delay: .54s; }
.wrong-item:nth-child(9) { animation-delay: .61s; }
.wrong-item:nth-child(10) { animation-delay: .68s; }

/* 首页印章轻浮动 */
.seal { animation: sealFloat 5s ease-in-out infinite; }
@keyframes sealFloat { 50% { transform: rotate(-5deg) translateY(-5px); } }

/* 图鉴空态 */
.atlas-empty { text-align: center; color: var(--ink-soft); padding: 40px 12px; font-size: .92rem; }

/* 无动画偏好：尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 每日挑战 ---------- */
.btn-daily-done { background: linear-gradient(135deg, #b9932c, #8a6d17) !important; }
#btn-daily .btn-hint.done-hint { color: #f4e6c0 !important; }
.daily-check { display: inline-block; margin-left: 6px; }

/* 连击徽章 */
.combo-chip {
  width: fit-content; margin: 0 0 10px auto;
  background: linear-gradient(135deg, #ffcf5c, #f0a52a);
  color: #4a2f05; font-weight: 800; font-size: .88rem;
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(240, 165, 42, .45);
  animation: comboIn .35s ease;
}
@keyframes comboIn { from { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.12); } }
.combo-chip.grow { animation: comboGrow .3s ease; }
@keyframes comboGrow { 40% { transform: scale(1.18); } }
.quiz-score .float-plus { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.quiz-score .float-plus.bonus { font-size: 1.05rem; }

/* 分类选择弹层 */
.modal-select { padding: 20px 20px 22px; text-align: left; }
.modal-select h3 { color: var(--green-deep); margin-bottom: 6px; margin-top: 2px; }
.select-sub { font-size: .82rem; color: var(--ink-soft); margin-bottom: 14px; }
.select-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; max-height: 300px; overflow: auto; }
.select-chip {
  border: 1.5px solid rgba(47, 93, 76, .25); background: var(--card); color: var(--green-deep);
  border-radius: 999px; font-size: .88rem; font-weight: 600; padding: 7px 15px; transition: all .15s;
}
.select-chip.on { background: var(--green-deep); color: #f4ecd8; border-color: var(--green-deep); }
.select-chip small { opacity: .7; font-weight: 400; }

/* ---------- 音效开关 ---------- */
.home-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sound-chip {
  border: 1.5px solid rgba(47, 93, 76, .3); background: var(--card); color: var(--green-deep);
  border-radius: 999px; font-size: .86rem; padding: 7px 18px; font-weight: 600;
  transition: all .15s; box-shadow: var(--shadow-sm);
}
.sound-chip:hover { border-color: var(--gold); }
.sound-chip.off { background: #efe9da; color: var(--ink-soft); border-color: rgba(92, 107, 98, .35); }
/* 静音时关闭与音效联动的装饰动画（保留信息性视觉反馈） */
body.sound-off .quiz-score.bump, body.sound-off .combo-chip.grow { animation: none !important; }

/* ---------- 兴趣版 v2.3 ---------- */
.today-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1.5px solid rgba(201, 162, 39, .35); overflow: hidden; text-align: left;
  animation: cardIn .35s ease;
}
.today-head { display: flex; align-items: center; padding: 12px 14px 8px; }
.today-chip { background: linear-gradient(135deg, var(--gold), #b9932c); color: #fff; }
.today-date { margin-left: auto; color: var(--ink-soft); font-size: .8rem; }
#today-img { width: 100%; height: 200px; object-fit: cover; background: #efe9da; }
.today-body { padding: 12px 14px 14px; }
.today-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.today-name { font-size: 1.4rem; font-weight: 800; color: var(--green-deep); font-family: "Songti SC","STSong","SimSun",serif; }
.today-fact { margin: 8px 0 12px; color: var(--ink); font-size: .92rem; line-height: 1.7; }
.today-actions { display: grid; gap: 8px; }
.scene-chip {
  border-radius: 999px; font-size: .76rem; padding: 2px 10px;
  background: var(--green-soft); color: var(--green-deep);
}
.scene-chip.sc-k { background: #f7ead9; color: #8a5a17; }
.scene-chip.sc-g { background: #e3efe4; color: #2e6b3c; }
.scene-chip.sc-w { background: #e7ece3; color: #4a6b32; }
.scene-chip.sc-f { background: #f4e3e3; color: #8d4c4c; }
.result-soft { text-align: center; color: var(--ink-soft); font-size: .86rem; margin-top: 4px; }

/* ---------- 猜猜看：局部特写 ---------- */
.guess-wrap { display: grid; gap: 8px; }
#ques-img.guess-view {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .5s ease;
}
#ques-img.guess-view.zoom3 { transform: scale(2.6); transform-origin: 50% 42%; }
#ques-img.guess-view.zoom2 { transform: scale(1.7); transform-origin: 50% 42%; }
.guess-hint-badge { text-align: center; font-size: .8rem; color: var(--gold); font-weight: 700; }

/* ---------- 图鉴收集与成就 ---------- */
.collect-card {
  background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  padding: 12px 14px; margin-bottom: 12px; border: 1px solid rgba(201, 162, 39, .25);
}
.collect-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--green-deep); font-size: .92rem; margin-bottom: 8px; }
.collect-count { color: var(--gold); }
.collect-bar { height: 10px; border-radius: 999px; background: rgba(47, 93, 76, .12); overflow: hidden; }
.collect-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #b9932c); transition: width .6s ease; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.badge-chip {
  border-radius: 999px; font-size: .76rem; padding: 3px 10px; font-weight: 600;
  background: #efe9da; color: #a99f88; transition: all .2s;
}
.badge-chip.on { background: linear-gradient(135deg, #ffd97a, #c9a227); color: #5a3c06; box-shadow: 0 2px 8px rgba(201,162,39,.35); animation: popIn .35s ease; }
.atlas-card.lit { border-color: var(--gold); box-shadow: 0 4px 16px rgba(201, 162, 39, .25); }
.atlas-card .lit-mark {
  position: absolute; top: 6px; right: 6px; background: var(--gold); color: #fff;
  font-size: .68rem; border-radius: 999px; padding: 2px 8px; font-weight: 700;
  animation: popIn .4s ease;
}
.atlas-card { position: relative; }

.modal-share { text-align: center; padding: 18px 16px 20px; }
.modal-share h3 { color: var(--green-deep); margin: 2px 0 12px; }
.share-img { width: 100%; max-width: 340px; border-radius: 10px; box-shadow: var(--shadow); margin: 0 auto; display: block; }
.share-tip { margin-top: 12px; font-size: .84rem; color: var(--ink-soft); }

.speak-btn {
  border: 1px solid rgba(47,93,76,.3); background: var(--card); border-radius: 999px;
  font-size: .85rem; padding: 3px 10px; margin-left: 8px; cursor: pointer; transition: .15s;
}
.speak-btn:hover { border-color: var(--gold); transform: scale(1.06); }

/* ---------- 四季皮肤（春青/夏绿/秋金/冬墨） ---------- */
body[data-theme="spring"] {
  --paper: #eef4e6; --paper-2: #e2ecd8; --card: #f8fcf0;
  --green: #3a7d54; --green-deep: #25583a; --green-soft: #e3f0e0;
  --gold: #8faf4b; --gold-soft: #e8f0d0; --ink: #2b4636; --ink-soft: #5a7460;
  --shadow: 0 12px 32px rgba(48, 78, 44, .13); --shadow-sm: 0 4px 14px rgba(48, 78, 44, .10);
}
body[data-theme="summer"] {
  --paper: #f6f1e5; --paper-2: #efe7d2; --card: #fffdf6;
  --green: #2f5d4c; --green-deep: #1e4234; --green-soft: #e7efe8;
  --gold: #c9a227; --gold-soft: #f0e6c8; --ink: #2c3a33; --ink-soft: #5c6b62;
  --shadow: 0 12px 32px rgba(46, 70, 60, .13); --shadow-sm: 0 4px 14px rgba(46, 70, 60, .10);
}
body[data-theme="autumn"] {
  --paper: #f7eedd; --paper-2: #f0e2c6; --card: #fffaf0;
  --green: #8a6d17; --green-deep: #6b520e; --green-soft: #f2e8cd;
  --gold: #c46a1e; --gold-soft: #f6dcb8; --ink: #4a3a20; --ink-soft: #7a6a4c;
  --shadow: 0 12px 32px rgba(102, 78, 32, .14); --shadow-sm: 0 4px 14px rgba(102, 78, 32, .11);
}
body[data-theme="winter"] {
  --paper: #eef2f0; --paper-2: #dfe7e3; --card: #f9fcfb;
  --green: #234b3f; --green-deep: #122d25; --green-soft: #dde9e5;
  --gold: #8fa3a0; --gold-soft: #e3ecea; --ink: #22332e; --ink-soft: #51655f;
  --shadow: 0 12px 32px rgba(20, 40, 34, .16); --shadow-sm: 0 4px 14px rgba(20, 40, 34, .12);
}
body { transition: background-color .5s ease, color .5s ease; }
@media (prefers-reduced-motion: reduce) { body { transition: none !important; } }

.theme-row { display: flex; gap: 10px; justify-content: center; margin: 12px 0 2px; }
.theme-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(47,93,76,.25);
  cursor: pointer; font-size: .95rem; display: flex; align-items: center; justify-content: center;
  background: var(--card); transition: transform .15s, border-color .15s;
}
.theme-btn.on { border-color: var(--gold); transform: scale(1.12); box-shadow: 0 2px 10px rgba(201,162,39,.3); }
.ambient-chip { border: 1.5px solid rgba(47,93,76,.3); background: var(--card); color: var(--green-deep); border-radius: 999px; font-size: .86rem; padding: 7px 18px; font-weight: 600; }
.ambient-chip.off { background: #efe9da; color: var(--ink-soft); border-color: rgba(92,107,98,.35); }

.share-style-row { display: flex; gap: 8px; justify-content: center; margin: 4px 0 10px; }
.share-style {
  border-radius: 999px; font-size: .8rem; padding: 4px 12px; cursor: pointer;
  border: 1.5px solid rgba(47,93,76,.25); background: var(--card); color: var(--ink-soft); font-weight: 600;
}
.share-style.on { background: var(--green-deep); color: #f6f1e5; border-color: var(--green-deep); }

.help-list { text-align: left; margin: 8px 4px 10px; padding-left: 4px; list-style: none; display: grid; gap: 8px; font-size: .92rem; color: var(--ink); }
.help-note { margin: 10px 2px; color: var(--ink-soft); font-size: .9rem; line-height: 1.7; text-align: left; }

.atlas-tools { display: grid; gap: 8px; margin: 0 0 12px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scene-door-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.scene-door {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--card); box-shadow: var(--shadow-sm); border: 1px solid rgba(201,162,39,.2);
  cursor: pointer; font-weight: 700; color: var(--green-deep); font-size: .92rem;
}
.scene-door .sd-ico { font-size: 1.3rem; }

.journal-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.journal-item { background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 14px; text-align: center; }
.jv-k { color: var(--ink-soft); font-size: .82rem; }
.jv-v { color: var(--green-deep); font-size: 1.15rem; font-weight: 800; margin-top: 4px; }
.fav-star { position: absolute; top: 6px; left: 6px; color: #c9a227; font-size: 1.05rem; z-index: 2; background: rgba(255,253,246,.85); border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.fav-star.fav-on { color: #a52f2f; }
