/* ══════════════════════════════════════════════════════════════════
   quest.css — pp146 新手任务条 / 任务清单弹层
   浅色主题：--card-bg #FFF、--text #3B3557、--kid-line rgba(120,110,170,.22)。
   尺寸一律 rem，跟着「账号设置 → 字号」缩放。
   ══════════════════════════════════════════════════════════════════ */

/* ── 乐园里那条任务条 ──
   ⚠ 高度按「一行」设计：它夹在标题行和乐园之间，乐园本来就矮，
     多占 40px 就等于把小动物活动区又压小一圈。 */
.quest-bar {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 13px;
  /* 虚线边框 + 淡紫底：一眼能看出「这是个待办卡，不是按钮组」 */
  border: 2px dashed #C9BEF5;
  background: linear-gradient(180deg, #FAF8FF, #F3EFFF);
  color: var(--text, #3B3557);
  font: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .1s, background .12s;
}
.quest-bar:active { transform: scale(.99); background: #EFE9FF; }
.qb-ico { flex: none; font-size: .95rem; line-height: 1; }
.qb-main { min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.qb-name { font-size: .8rem; font-weight: 800; }
.qb-prog {
  font-size: .7rem; font-weight: 800; color: #6C5CE7;
  background: #fff; border-radius: 999px; padding: 1px 7px;
  border: 1px solid #D9D0FA;
}
/* 一格一格：填满的念头比「还差 4 个」更有推动力 */
.qb-dots { display: flex; gap: 4px; margin-left: auto; }
.qb-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(120, 110, 170, .26); display: block;
}
.qb-dots i.on { background: #6C5CE7; }
/* 下一个该做的那个微微放大、描个圈，等于在说「先做这个」 */
.qb-dots i.next { background: #FFC94D; box-shadow: 0 0 0 2px rgba(255, 201, 77, .35); }
.qb-more { flex: none; font-size: .74rem; color: #8E86A6; margin-left: 2px; }

/* ── 任务清单弹层 ── */
.quest-mask {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(59, 53, 87, .46);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: qkFadeIn .16s ease-out both;
}
.quest-mask.out { animation: qkFadeOut .18s ease-in both; }
.quest-mask > * { margin-top: auto; margin-bottom: auto; }
@keyframes qkFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qkFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes qkPop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

.qk-card {
  width: min(94vw, 380px);
  max-height: min(88vh, 620px);
  display: flex; flex-direction: column;
  background: var(--card-bg, #fff);
  color: var(--text, #3B3557);
  border: 3px solid #FFDDA6;
  border-radius: 22px;
  padding: 16px 14px 14px;
  box-shadow: 0 18px 46px rgba(59, 53, 87, .28);
  animation: qkPop .2s cubic-bezier(.2, .9, .3, 1.2) both;
  text-align: left;
}
.qk-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.qk-head-txt { min-width: 0; }
.qk-title { font-size: .98rem; font-weight: 800; margin: 0; line-height: 1.35; }
.qk-sub { font-size: .72rem; color: var(--text-dim, #8E86A6); line-height: 1.5; margin: 3px 0 0; }
.qk-x {
  flex: none; margin-left: auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--kid-line, rgba(120, 110, 170, .22));
  background: #F1EDFF; color: var(--text, #3B3557);
  font-size: .72rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.qk-x:active { transform: scale(.92); }

.qk-list { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.qk-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; margin-bottom: 6px;
  border: 2px solid var(--kid-line, rgba(120, 110, 170, .22));
  border-radius: 12px;
  background: #FCFBFF;
}
.qk-row.done { background: #F4F1FF; border-color: #D9D0FA; }
.qk-row.done .qk-name { color: var(--text-dim, #8E86A6); text-decoration: line-through; }
.qk-mark { flex: none; width: 1rem; text-align: center; font-size: .8rem; color: #B9B2CE; }
.qk-ico { flex: none; font-size: .95rem; line-height: 1; }
.qk-txt { min-width: 0; flex: 1 1 auto; display: block; }
.qk-name { display: block; font-size: .82rem; font-weight: 800; line-height: 1.3; }
.qk-hint { display: block; font-size: .64rem; color: var(--text-dim, #8E86A6); line-height: 1.35; margin-top: 1px; }
.qk-rew {
  flex: none; font-size: .7rem; font-weight: 800; color: #B07B00;
  background: #FFF3D6; border-radius: 999px; padding: 2px 8px;
}
.qk-row.done .qk-rew { color: #6C5CE7; background: #fff; }

.qk-card .qk-ok {
  display: block; width: 100%; margin-top: 10px; flex: none;
  font-size: .88rem; font-weight: 800;
  padding: 9px 0; border-radius: 12px;
}

/* 有弹层时把左下角「安装药丸」收起来（和 index.html 里那几条 :has 规则同一套做法） */
body:has(.quest-mask) #pp-install-entry { display: none !important; }
