/* ==========================================================================
   慢日子 · verify.css — /t 今日心情
   挑选 20 件事 → 前端算分 → 心情卡片
   ========================================================================== */

body.page-verify { padding-bottom: 118px; }

/* 出结果之后，底部的操作栏收起来 */
body.show-result { padding-bottom: 48px; }
body.show-result .actionbar { display: none; }

/* ---------- 1. 页首 ---------- */
.verify-hero {
  position: relative;
  padding-top: clamp(44px, 7vw, 74px);
  padding-bottom: clamp(28px, 4vw, 40px);
  text-align: center;
  overflow: hidden;
}
.verify-hero .hero-glow { opacity: .8; }

.verify-title {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: clamp(27px, 4.8vw, 42px);
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
  line-height: 1.4;
}
.verify-lead {
  margin: 18px auto 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-3);
  letter-spacing: .03em;
}
.verify-lead em {
  font-style: normal;
  color: var(--clay-ink);
  border-bottom: 1px dashed var(--clay-soft);
  padding-bottom: 1px;
}

/* ---------- 2. 任务网格 ---------- */
.tasks-wrap { padding-bottom: clamp(40px, 6vw, 70px); }

.tasks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1000px) { .tasks { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .tasks { grid-template-columns: repeat(2, 1fr); gap: 11px; } }

.task {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px 16px;
  text-align: left;
  border-radius: 15px;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
  transition: transform .38s var(--ease), box-shadow .38s var(--ease),
              border-color .38s var(--ease), background .38s var(--ease);
}
.task:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--line);
}
.task:active { transform: translateY(-1px) scale(.99); }

.task-emoji {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 19px;
  line-height: 1;
  background: var(--paper-3);
  transition: background .38s var(--ease), transform .45s var(--ease);
}
.task-text {
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: .02em;
  color: var(--ink-2);
  transition: color .3s var(--ease);
}

.task-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--clay);
  color: #fff;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.task-check svg { width: 11px; height: 11px; }

.task.is-on {
  background: var(--clay-soft);
  border-color: var(--clay-ink);
  box-shadow: 0 2px 6px rgba(196, 120, 90, .14), 0 12px 30px rgba(196, 120, 90, .14);
}
.task.is-on .task-text { color: var(--ink); }
.task.is-on .task-check { opacity: 1; transform: scale(1); }
.task.is-on .task-emoji {
  background: rgba(255, 255, 255, .6);
  animation: pop .5s var(--ease);
}

@keyframes pop {
  0%   { transform: scale(1); }
  42%  { transform: scale(1.22) rotate(-7deg); }
  100% { transform: scale(1); }
}

:root[data-theme="dark"] .task.is-on .task-emoji { background: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .task.is-on .task-emoji { background: rgba(255, 255, 255, .12); }
}

/* ---------- 3. 底部操作栏 ---------- */
.actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: rgba(var(--paper-rgb), .86);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
  border-top: 1px solid var(--line-2);
  padding-block: 13px;
  padding-bottom: calc(13px + env(safe-area-inset-bottom, 0px));
}
.actionbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ab-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.jar {
  position: relative;
  flex: none;
  width: 34px;
  height: 56px;
  border-radius: 9px 9px 12px 12px;
  background: var(--paper-3);
  border: 1.5px solid var(--line);
  overflow: hidden;
}
.jar::after {
  content: "";
  position: absolute;
  top: 4px; left: 5px;
  width: 6px;
  height: 26px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .5);
  z-index: 2;
  pointer-events: none;
}
.jar-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--gold), var(--clay));
  border-radius: 0 0 11px 11px;
  transition: height .6s var(--ease), background .6s var(--ease);
}
.jar-fill::before {
  content: "";
  position: absolute;
  top: -5px; left: -6px; right: -6px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .75;
  animation: waveShift 4.5s var(--ease-soft) infinite;
}
.jar.is-full .jar-fill { background: linear-gradient(180deg, #E8C06A, var(--sage)); }
.jar.is-over .jar-fill { background: linear-gradient(180deg, #E0A25C, #B06A55); }

@keyframes waveShift {
  0%, 100% { transform: translateX(-2px) scaleY(1); }
  50%      { transform: translateX(2px) scaleY(.8); }
}

.ab-count { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ab-count b {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .04em;
}
.ab-count b i {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 3px;
}
.ab-count span {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-count span.is-warn { color: var(--clay-ink); }

.ab-right { display: flex; align-items: center; gap: 10px; flex: none; }
.ab-right .btn { padding: 10px 20px; font-size: 14px; }

@media (max-width: 760px) {
  .actionbar-inner { flex-direction: column; gap: 11px; align-items: stretch; }
  .ab-left { justify-content: center; }
  .ab-right { justify-content: center; }
  .ab-right .btn { flex: 1; padding: 11px 12px; font-size: 13.5px; }
  #btnRandom { display: none; }   /* 手机上留清空和生成就够了 */
  body.page-verify:not(.show-result) { padding-bottom: 168px; }
}

/* ---------- 4. 结果 ---------- */
.result { padding-bottom: clamp(30px, 5vw, 60px); }

.result-head { text-align: center; }

.score-ring {
  position: relative;
  width: clamp(168px, 24vw, 200px);
  aspect-ratio: 1;
  margin: 0 auto;
}
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .sr-track,
.score-ring .sr-fill { fill: none; stroke-width: 6; stroke-linecap: round; }
.score-ring .sr-track { stroke: var(--line); }
.score-ring .sr-fill {
  stroke: url(#scoreGrad);
  stroke-dasharray: 477.5;
  stroke-dashoffset: 477.5;
  transition: stroke-dashoffset 1.5s var(--ease);
}
.score-ring .sr-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num {
  font-family: var(--latin-serif);
  font-size: clamp(46px, 7vw, 58px);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.score-cap {
  margin-top: 6px;
  font-size: 11.5px;
  letter-spacing: .26em;
  color: var(--ink-3);
}

.result-title {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: clamp(24px, 4.2vw, 34px);
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink);
}
.result-sub {
  margin: 14px auto 0;
  max-width: 40ch;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-3);
}

.result-panel {
  margin: clamp(34px, 5vw, 50px) auto 0;
  max-width: 620px;
  padding: clamp(22px, 3.4vw, 32px);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-1);
}

.panel-title {
  font-size: 12.5px;
  letter-spacing: .22em;
  color: var(--ink-3);
  margin-bottom: 20px;
}

.dims { display: grid; gap: 15px; }
.dim { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 14px; }
.dim-label { font-size: 13.5px; letter-spacing: .1em; color: var(--ink-2); }
.dim-track {
  height: 7px;
  border-radius: 4px;
  background: var(--paper-3);
  overflow: hidden;
}
.dim-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 1.05s var(--ease);
}
.dim-val {
  font-family: var(--latin-serif);
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.eggs {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.eggs .chip { font-size: 12.5px; }
.egg-none { font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }

.calc {
  margin: 24px auto 0;
  max-width: 620px;
  border-radius: var(--r);
  background: var(--paper-3);
  overflow: hidden;
}
.calc summary {
  padding: 14px 20px;
  font-size: 13.5px;
  letter-spacing: .1em;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color .3s;
}
.calc summary::-webkit-details-marker { display: none; }
.calc summary:hover { color: var(--clay-ink); }
.calc summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--ink-3);
  transition: transform .35s var(--ease);
}
.calc[open] summary::after { transform: rotate(180deg); }

.calc-rows { padding: 4px 20px 20px; display: grid; gap: 9px; }
.calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
}
.calc-row span:first-child { flex: none; }
.calc-row span:last-child {
  font-family: var(--latin-serif);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
}
.calc-row.is-plus span:last-child { color: var(--sage-ink); }
.calc-row.is-minus span:last-child { color: var(--clay-ink); }
.calc-row.is-total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
}
.calc-row.is-total span:last-child { color: var(--ink); font-size: 17px; font-weight: 600; }

.result-actions {
  margin-top: clamp(30px, 4vw, 42px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.moodcard {
  margin: clamp(30px, 4vw, 42px) auto 0;
  max-width: 460px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--gold-soft), var(--clay-soft) 60%, var(--sage-soft));
  border: 1px solid var(--line);
  text-align: center;
}
:root[data-theme="dark"] .moodcard {
  background: linear-gradient(150deg, #33291A, #33221C 60%, #232E25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .moodcard {
    background: linear-gradient(150deg, #33291A, #33221C 60%, #232E25);
  }
}
.moodcard-date {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--ink-3);
}
.moodcard-score {
  margin-top: 12px;
  font-family: var(--latin-serif);
  font-size: 54px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.moodcard-score small {
  font-size: 15px;
  color: var(--ink-3);
  margin-left: 6px;
  letter-spacing: .1em;
}
.moodcard-title {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .12em;
  color: var(--ink);
}
.moodcard-list {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.moodcard-list span { letter-spacing: .04em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 130px;
  transform: translate(-50%, 14px);
  z-index: 200;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  letter-spacing: .08em;
  color: var(--paper);
  background: var(--ink);
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.toast.is-on { opacity: .94; transform: translate(-50%, 0); }

.result-enter { animation: resultIn .8s var(--ease) both; }
@keyframes resultIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* 结果页里的空态 */
.pick-none {
  text-align: center;
  font-size: 14px;
  color: var(--ink-3);
  padding: 40px 20px;
  letter-spacing: .06em;
}
