/* ═══════════════════════════════════════════
   不抽了 · extra.css —— v6 新增：肺 / SOS 工具箱 / 小游戏 / 日记 / 复吸 / 动效
   ═══════════════════════════════════════════ */

@keyframes popIn { 0% { opacity: 0; transform: scale(.92) translateY(6px); } 60% { opacity: 1; transform: scale(1.02); } 100% { transform: none; } }
.pop-in { animation: popIn .5s cubic-bezier(.22,1.2,.36,1) both; }
.tapfx { animation: tapfx .32s ease; }
@keyframes tapfx { 0% { transform: scale(1); } 35% { transform: scale(.94); } 70% { transform: scale(1.03); } 100% { transform: scale(1); } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 400; }

/* 首页大按钮：呼吸光晕 */
.urge-btn { position: relative; overflow: visible; }
.urge-btn::after { content: ""; position: absolute; inset: -4px; border-radius: calc(var(--r) + 4px); border: 2px solid var(--accent-2); opacity: 0; animation: urgeGlow 2.6s ease-out infinite; pointer-events: none; }
@keyframes urgeGlow { 0% { opacity: .55; transform: scale(.98); } 100% { opacity: 0; transform: scale(1.06); } }
.won-dot { animation: dotBeat 1.8s ease-in-out infinite; }
@keyframes dotBeat { 0%,100% { box-shadow: 0 0 0 3px var(--green-soft); } 50% { box-shadow: 0 0 0 6px var(--green-soft); } }

/* ── 卡通肺 ── */
.lung { width: 100%; height: auto; overflow: visible; }
.lung .lg-breath { transform-box: fill-box; transform-origin: 50% 40%; animation: lungBreath var(--bdur, 4s) ease-in-out infinite; }
.lung.coughy .lg-wobble { transform-box: fill-box; transform-origin: 50% 50%; animation: cough 5s ease-in-out infinite; }
@keyframes lungBreath { 0%,100% { transform: scale(1); } 45% { transform: scale(var(--amp, 1.04)); } }
@keyframes cough { 0%,80%,100% { transform: none; } 83% { transform: translate(-2px,1px) rotate(-1.4deg); } 86% { transform: translate(2px,-1px) rotate(1.4deg); } 89% { transform: translate(-2px,1px); } 92% { transform: none; } }
.lung .lg-drip { animation: drip 2.8s ease-in infinite; }
@keyframes drip { 0% { transform: translateY(-6px) scale(.6); opacity: 0; } 25% { opacity: 1; } 80% { transform: translateY(10px) scale(1); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
.lung .lg-smoke .s1, .lung .lg-smoke .s2, .lung .lg-smoke .s3 { animation: smokeUp 4s ease-in-out infinite; }
.lung .lg-smoke .s2 { animation-delay: 1.3s; }
.lung .lg-smoke .s3 { animation-delay: 2.4s; }
@keyframes smokeUp { 0% { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.lung .lg-spark { transform-box: fill-box; transform-origin: center; animation: twinkle 2.2s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { transform: scale(.5) rotate(0); opacity: .4; } 50% { transform: scale(1.15) rotate(20deg); opacity: 1; } }
.lung .lg-heart { transform-box: fill-box; transform-origin: center; animation: heartB 1.4s ease-in-out infinite; }
@keyframes heartB { 0%,100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
.lung .lg-sweat { animation: sweat 2.4s ease-in infinite; }
@keyframes sweat { 0%,40% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
.lung .lg-bubble { transform-box: fill-box; transform-origin: 80% 100%; animation: bubblePop 3s ease-in-out infinite; }
@keyframes bubblePop { 0%,100% { transform: scale(1); } 8% { transform: scale(1.08) rotate(-2deg); } 16% { transform: scale(1); } }
.lung.no-anim * { animation: none !important; }

.lung-card {
  margin-top: 6px; padding: 16px 16px 18px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.lung-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lung-k { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.lung-name { font-family: var(--serif); font-size: 22px; font-weight: 800; margin-top: 2px; }
.lung-art { width: min(78vw, 300px); margin: 6px auto 2px; }
.lung-line { text-align: center; font-size: 13.5px; color: var(--ink2); font-weight: 600; line-height: 1.6; }
.lung-meter { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; font-weight: 800; color: var(--ink3); }
.lung-meter b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.lm-bar { position: relative; flex: 1; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #6E6158, #B9A79A 45%, #FFB3C4); opacity: .95; }
.lm-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: transparent; box-shadow: none; }
.lm-bar i::after { content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid #FF7D93; box-shadow: 0 2px 6px rgba(0,0,0,.15); animation: knob 1.6s ease-in-out infinite; }
@keyframes knob { 50% { transform: scale(1.18); } }
.lm-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: .45; border-radius: 2px; }
.lung-meta { font-size: 11.5px; color: var(--ink3); margin-top: 8px; text-align: center; }
.lung-next { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 7px 12px; font-weight: 700; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--line-2); gap: 2px; flex: 0 0 auto; }
.seg button { font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; color: var(--ink3); transition: background .2s, color .2s; }
.seg button.on { background: var(--card); color: var(--accent-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.vs-row { display: flex; align-items: center; gap: 8px; }
.vs-row.slim { margin: 4px 0; }
.vs-cell { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 6px 12px; }
.vs-cell.now { border-color: #F5C3CF; background: #FFF6F8; }
.vs-art { width: 100%; max-width: 150px; margin: 0 auto; }
.vs-k { font-size: 11.5px; font-weight: 800; color: var(--ink3); letter-spacing: .08em; margin-top: 4px; }
.vs-v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vs-arrow { font-size: 20px; color: var(--accent-2); animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

.future-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.fu-cell { flex: 0 0 31%; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 4px 10px; text-align: center; }
.fu-cell:first-child { border-color: var(--accent-2); }
.fu-k { font-size: 11px; font-weight: 800; color: var(--ink3); }
.fu-v { font-size: 15px; font-weight: 800; }

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sg-cell { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 13px 12px; }
.sg-cell b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sg-cell span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 3px; line-height: 1.5; font-weight: 600; }

/* 首页的小肺卡片 */
.home-lung {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 10px 14px 10px 8px; margin-bottom: 14px; border-radius: var(--r);
  background: linear-gradient(120deg, #FFF6F8, var(--card)); border: 1px solid #F3D6DD; box-shadow: var(--shadow);
  transition: transform .15s;
}
.home-lung:active { transform: scale(.98); }
.hl-art { flex: 0 0 104px; }
.hl-txt { flex: 1; min-width: 0; }
.hl-k { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.hl-n { font-family: var(--serif); font-size: 19px; font-weight: 800; margin: 2px 0 8px; }
.hl-bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.hl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #D98A4F, #FF7D93); transition: width .8s cubic-bezier(.22,.9,.28,1); }
.hl-s { font-size: 11.5px; color: var(--ink2); margin-top: 6px; font-weight: 700; }

.home-mot { margin: 14px 0 0; padding: 14px 16px 12px; border-radius: var(--r-sm); background: var(--gold-soft); border: 1px dashed #E6D3A8; text-align: center; cursor: pointer; position: relative; }
.home-mot .hm-q { position: absolute; left: 10px; top: -6px; font-family: var(--serif); font-size: 42px; color: var(--gold); opacity: .5; line-height: 1; }
.home-mot .hm-t { display: block; font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.home-mot .hm-h { display: block; font-size: 10.5px; color: var(--ink3); margin-top: 6px; font-weight: 600; }
.flip { animation: flipIn .45s cubic-bezier(.22,1.2,.36,1); }
@keyframes flipIn { 0% { transform: rotateX(80deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ── SOS ── */
.rescue.sos { background: radial-gradient(120% 70% at 50% 0%, #FFF4EA 0%, #F7EFE6 55%, #EFE7F3 100%); }
.sos-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.sos-tbar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sos-tbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #D98A4F, #7FD1AE); border-radius: 999px; transition: width .25s linear; }
#sosLeft, .sos-top span { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink2); min-width: 46px; text-align: right; }

.sos-ring { position: relative; width: min(58vw, 220px); aspect-ratio: 1; flex: 0 0 auto; }
.sos-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sr-bg { fill: none; stroke: var(--line); stroke-width: 12; }
.sr-p { fill: none; stroke: #7FD1AE; stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.sr-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sr-k { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--ink3); }
.sr-t { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.sr-wave { display: flex; gap: 5px; margin-top: 6px; }
.sr-wave i { width: 22px; height: 6px; border-radius: 6px; background: #A6D1FF; animation: wave 1.6s ease-in-out infinite; }
.sr-wave i:nth-child(2) { animation-delay: .2s; } .sr-wave i:nth-child(3) { animation-delay: .4s; }
@keyframes wave { 50% { transform: translateY(-5px); background: #7FD1AE; } }
.sos-wave-msg { font-size: 13px; font-weight: 700; color: var(--ink2); max-width: 320px; line-height: 1.6; }

.mot-card { position: relative; width: 100%; padding: 16px 16px 10px; border-radius: var(--r-sm); background: #FFFDF6; border: 1.5px solid #EAD9AE; box-shadow: var(--shadow); }
.mot-card .mc-q { position: absolute; left: 10px; top: -8px; font-family: var(--serif); font-size: 44px; color: var(--gold); opacity: .55; line-height: 1; }
.mot-card #sosMotT { display: block; font-family: var(--serif); font-size: 17px; font-weight: 800; line-height: 1.55; }
.mc-act { display: flex; justify-content: center; gap: 16px; margin-top: 8px; }
.mc-act button { font-size: 12px; font-weight: 800; color: var(--gold); padding: 4px 6px; }
.plan-chip { width: 100%; font-size: 12.5px; color: var(--accent-ink); background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.6; }

.sos-hold { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px 8px 6px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-2); text-align: left; }
.sh-art { flex: 0 0 84px; }
.sh-k { font-size: 11px; font-weight: 800; color: var(--ink3); letter-spacing: .1em; }
.sh-v { font-size: 30px; font-weight: 800; line-height: 1.1; }
.sh-v small { font-size: 14px; color: var(--ink3); margin-left: 2px; }
.sh-s { font-size: 12px; color: var(--green); font-weight: 700; margin-top: 2px; }

.tool-sec { width: 100%; text-align: left; }
.ts-t { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--ink2); margin: 4px 2px 8px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px 10px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line);
  transition: transform .12s cubic-bezier(.3,1.5,.6,1), box-shadow .12s;
}
.tool-btn:active { transform: translateY(2px) scale(.96); box-shadow: 0 0 0 var(--line); }
.tool-btn.used { border-color: #BFE3CF; background: #F4FBF6; }
.tool-btn.used::after { content: "✓ 用过"; font-size: 9.5px; color: var(--green); font-weight: 800; }
.tb-e { font-size: 28px; line-height: 1.1; }
.tb-n { font-size: 13px; font-weight: 800; }
.tb-s { font-size: 10.5px; color: var(--ink3); font-weight: 600; }

.tool-head { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 0 !important; }
.back-chip { font-size: 13px; font-weight: 800; color: var(--ink2); padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.th-n { font-size: 16px; font-weight: 800; }
.tool-head > span:last-child { width: 70px; }
.tool-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* 小游戏通用 */
.game-hud { width: 100%; display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink2); }
.game-hud b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 戳泡泡 */
.bub-field { position: relative; width: 100%; height: min(56vh, 420px); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #E8F4FF, #F6EFFF); border: 1px solid var(--line-2); touch-action: none; }
.bub-tip { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 13px; color: var(--ink3); font-weight: 700; }
.bub { position: absolute; bottom: -90px; border-radius: 50%; font-size: 13px; font-weight: 800; color: rgba(60,40,60,.7);
  background: radial-gradient(circle at 32% 28%, #fff 0 12%, transparent 13%), radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c) 40%, transparent), var(--c));
  border: 2px solid rgba(255,255,255,.8); box-shadow: inset -4px -6px 10px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.06);
  animation-name: rise; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes rise { 0% { transform: translateY(0) translateX(0); } 50% { transform: translateY(calc(-1 * min(28vh, 255px))) translateX(14px); } 100% { transform: translateY(calc(-1 * min(56vh, 420px) - 100px)) translateX(-6px); } }
.bub.pop { animation: popB .26s ease-out forwards !important; }
@keyframes popB { to { transform: scale(1.6); opacity: 0; } }
.bub-dot { position: absolute; width: 9px; height: 9px; margin: -4px; border-radius: 50%; animation: dotFly .5s ease-out forwards; pointer-events: none; }
@keyframes dotFly { to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* 翻牌 */
.mem-grid { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; perspective: 800px; }
.mem { aspect-ratio: 3/4; }
.mem-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .38s cubic-bezier(.3,1.3,.5,1); transform-style: preserve-3d; }
.mem.on .mem-in, .mem.ok .mem-in { transform: rotateY(180deg); }
.mem-f, .mem-b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mem-f { background: linear-gradient(150deg, var(--accent-2), var(--accent)); color: #FFF3E8; font-size: 26px; font-weight: 900; box-shadow: 0 3px 0 #9B4C1B; }
.mem-b { background: var(--card); border: 2px solid var(--line); font-size: 34px; transform: rotateY(180deg); }
.mem.ok .mem-b { border-color: #7FD1AE; background: #F0FBF5; animation: okPulse .5s ease; }
@keyframes okPulse { 50% { transform: rotateY(180deg) scale(1.1); } }

/* 擦掉烟雾 */
.smoke-field { position: relative; width: 100%; height: min(54vh, 400px); border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #DDF2FF, #FFF0F4); touch-action: none; }
.smoke-under { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.smoke-under .lung { width: 70%; max-width: 260px; }
.su-t { font-size: 14px; font-weight: 800; color: #E0566F; margin-top: 4px; }
.smoke-field canvas { position: absolute; inset: 0; touch-action: none; }
.smoke-field.clean .smoke-under { animation: popIn .6s ease; }
.smoke-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.smoke-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #A6D1FF, #FF9EB5); transition: width .3s; }

/* 行动 */
.act-art { position: relative; width: 170px; height: 150px; display: grid; place-items: center; }
.aa-face { font-size: 76px; transition: transform .5s; }
.act-drops.run .aa-face { animation: faceRelax 4s ease-in-out infinite; }
@keyframes faceRelax { 50% { transform: scale(1.06); filter: saturate(.6) hue-rotate(160deg); } }
.drop { position: absolute; top: 0; left: calc(20% + var(--i) * 12%); width: 10px; height: 14px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #7AB8FF; opacity: 0; }
.act-drops.run .drop { animation: fall 1.2s ease-in infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes fall { 0% { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(120px); opacity: 0; } }
.aa-glass { position: relative; width: 84px; height: 120px; border: 4px solid #B7D7F0; border-top: none; border-radius: 0 0 18px 18px; overflow: hidden; background: rgba(255,255,255,.5); }
.aa-water { position: absolute; left: 0; right: 0; bottom: 0; height: 86%; background: linear-gradient(180deg, #CDEBFF, #8FCBF5); transition: height 60s linear; }
.act-ice.run .aa-water { height: 6%; }
.cube { position: absolute; width: 24px; height: 24px; border-radius: 6px; background: rgba(255,255,255,.85); border: 2px solid #B7D7F0; left: calc(8px + var(--i) * 22px); top: calc(26px + var(--i) * 14px); animation: bob 2s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes bob { 50% { transform: translateY(5px) rotate(10deg); } }
.aa-walker { font-size: 64px; }
.act-walk.run .aa-walker { animation: walkB .6s ease-in-out infinite; }
@keyframes walkB { 50% { transform: translateY(-5px) rotate(4deg); } }
.aa-road { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: space-around; }
.foot { font-style: normal; font-size: 16px; opacity: .15; }
.act-walk.run .foot { animation: footS 1.8s linear infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes footS { 0%,100% { opacity: .15; } 30% { opacity: 1; } }
.aa-senses { display: flex; gap: 8px; font-size: 34px; }
.aa-senses span { opacity: .3; }
.act-senses.run .aa-senses span { animation: sense 5s ease-in-out infinite; animation-delay: calc(var(--i) * 1s); }
@keyframes sense { 0%,100% { opacity: .3; transform: none; } 10%,18% { opacity: 1; transform: scale(1.3); } }
.act-timer { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.act-steps { list-style: none; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 7px; }
.act-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--ink2); transition: all .3s; }
.act-steps li span { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-size: 12px; font-weight: 800; }
.act-steps li.cur { border-color: var(--accent-2); background: var(--accent-soft); color: var(--ink); transform: scale(1.02); }
.act-steps li.cur span { background: var(--accent); color: #fff; }
.act-steps li.done { opacity: .6; }
.act-steps li.done span { background: var(--green); color: #fff; }
.act-why { font-size: 12.5px; color: var(--ink3); line-height: 1.7; text-align: left; }
.primary-btn.busy { opacity: .7; }

/* 呼吸（新版引擎） */
.br2 { position: relative; width: min(62vw, 230px); aspect-ratio: 1; display: grid; place-items: center; }
.br2-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed var(--line); }
.br2-core { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #CDEBFF, #7FD1AE 70%); box-shadow: 0 10px 40px rgba(127,209,174,.45); will-change: transform; }
.br2-core[data-ph="out"] { background: radial-gradient(circle at 40% 35%, #FFE4D2, #D98A4F 75%); box-shadow: 0 10px 40px rgba(217,138,79,.35); }
.br2-core[data-ph^="hold"] { background: radial-gradient(circle at 40% 35%, #EEE2FF, #B98CFF 75%); }
.br2.box .br2-core { inset: 22%; border-radius: 22%; }
.br2-box { position: absolute; inset: 0; width: 100%; height: 100%; }
.br2-box rect { fill: none; stroke: var(--line); stroke-width: 5; }
.br2-box circle { fill: var(--accent); filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.br2-txt { position: relative; z-index: 2; text-align: center; }
.br2-txt b { display: block; font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.br2-txt small { display: block; font-size: 13px; font-weight: 800; letter-spacing: .1em; margin-top: 6px; color: var(--ink2); }

/* 日记 */
.jr-q { width: 100%; text-align: left; font-size: 12.5px; font-weight: 800; color: var(--ink2); margin: 10px 0 8px; }
.jr-q b { color: var(--accent); font-size: 16px; }
.mood-row { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood-row button { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line-2); transition: transform .15s; }
.mood-row button span { font-size: 28px; }
.mood-row button small { font-size: 11px; font-weight: 700; color: var(--ink3); }
.mood-row button.on { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.06); }
.int-range { width: 100%; accent-color: var(--accent); height: 28px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; width: 100%; }
.chip.on { background: var(--accent); color: #fff; border-color: transparent; }
.mini-add { font-size: 12.5px; font-weight: 800; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.j-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 12px; }
.j-sum > div { background: var(--card); padding: 12px 6px; text-align: center; }
.j-sum b { display: block; font-size: 17px; font-weight: 800; }
.j-sum span { font-size: 10.5px; color: var(--ink3); font-weight: 700; }
.j-list { display: flex; flex-direction: column; gap: 8px; }
.j-item { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 13px; }
.j-mood { font-size: 28px; line-height: 1; }
.j-mid { flex: 1; min-width: 0; }
.j-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink3); font-weight: 700; }
.j-tag { font-style: normal; font-size: 10.5px; background: var(--green-soft); color: var(--green); padding: 1px 8px; border-radius: 999px; }
.j-tag.slip { background: var(--gold-soft); color: var(--gold); }
.j-int { height: 5px; border-radius: 999px; background: var(--line-2); margin: 7px 0 2px; overflow: hidden; }
.j-int i { display: block; height: 100%; background: linear-gradient(90deg, #FFD84A, #E0566F); }
.j-trig { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.j-trig span { font-size: 11px; font-weight: 700; background: var(--line-2); padding: 2px 8px; border-radius: 999px; color: var(--ink2); }
.j-note { font-size: 13px; color: var(--ink); margin-top: 6px; line-height: 1.6; }
.log-tool { font-size: 11px; color: var(--ink3); margin-top: 2px; }

/* 结果屏 */
.check-wave { font-size: 64px; animation: wave 2s ease-in-out infinite; }
.big-win { font-size: 18px; padding: 18px; background: linear-gradient(168deg, #7FD1AE, #3E9E76 70%); box-shadow: 0 8px 20px rgba(62,158,118,.3); }
.win-burst { width: 150px; height: 150px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle, #FFF6C9, #FFD84A 70%); box-shadow: 0 0 0 10px rgba(255,216,74,.25), 0 0 0 22px rgba(255,216,74,.12); animation: winPulse 1.8s ease-in-out infinite; }
@keyframes winPulse { 50% { box-shadow: 0 0 0 14px rgba(255,216,74,.3), 0 0 0 30px rgba(255,216,74,.1); } }
.wb-n { font-size: 54px; font-weight: 900; line-height: 1; color: #7A5A00; }
.wb-k { font-size: 12px; font-weight: 800; color: #7A5A00; }

/* 复吸（温和版） */
.gate-tag.calm { color: var(--accent-ink); background: var(--accent-soft); }
.gate-card.left .gate-title { font-size: 18px; text-align: left; }
.kind-msg { font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.75; padding: 14px 16px; border-radius: var(--r-sm); background: #FFF6F8; border: 1px solid #F3D6DD; }
.gate-sub b { color: var(--green); }

/* 成就页四格 */
.rec-row { grid-template-columns: repeat(2, 1fr); }

@media (prefers-reduced-motion: reduce) {
  .lung *, .urge-btn::after, .won-dot, .vs-arrow { animation: none !important; }
}

/* ═══════════════════════════════════════════
   存钱罐（v9）
   老板原话：扛住一次就往里丢一包烟的钱，攒够了买东西，比如 700 多买 ChatGPT。
   视觉往「铜罐子 / 存折」上靠：暖金、细高光、克制，不要卡通猪。
   ═══════════════════════════════════════════ */

/* ── 首页卡片 ── */
.jar-card {
  display: flex; gap: 14px; width: 100%; text-align: left;
  padding: 12px 14px; margin-top: 12px; border-radius: var(--r);
  background: linear-gradient(120deg, #FFFBF1, var(--card));
  border: 1px solid #EBDCC0; box-shadow: var(--shadow);
  transition: transform .15s;
}
.jar-card:active { transform: scale(.98); }
.jar-card-l { flex: 0 0 auto; }
.jar-card-k { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.jar-card-v {
  font-family: var(--serif); font-size: 24px; font-weight: 800; line-height: 1.15;
  color: var(--accent-ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.jar-card-v.bump { animation: jarBump .75s cubic-bezier(.22,1.4,.36,1); }
@keyframes jarBump {
  0% { transform: scale(1); }
  28% { transform: scale(1.18); color: #C89B3C; }
  100% { transform: scale(1); }
}
.jar-card-s { font-size: 10.5px; color: var(--ink3); font-weight: 700; margin-top: 4px; line-height: 1.45; white-space: nowrap; }
.jar-card-r { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.jar-card-goal { font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jar-card-bar { height: 7px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 7px 0 5px; }
.jar-card-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E7C46F, #C89B3C); transition: width .8s cubic-bezier(.22,.9,.28,1); }
.jar-card-gap { font-size: 11px; color: var(--ink2); font-weight: 700; }

/* ── 全屏页（z-index 115：压在 sheet 120 之下，兑现确认才弹得出来） ── */
.jar {
  position: fixed; inset: 0; z-index: 115;
  background: var(--bg); background-image: var(--bg-grad);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.jar.is-open { opacity: 1; pointer-events: auto; }
.jar-top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  background: linear-gradient(to bottom, var(--bg) 72%, transparent);
}
.jar-title { font-family: var(--serif); font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.jar-body { max-width: var(--maxw); margin: 0 auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 40px); }

/* 大余额 */
.jar-hero {
  position: relative; overflow: hidden;
  padding: 22px 20px 18px; border-radius: var(--r);
  background: linear-gradient(150deg, #FFFCF3 0%, #FDF5E6 58%, #F7E9D2 100%);
  border: 1px solid #EADAC0; box-shadow: var(--shadow); text-align: center;
}
.jar-hero::after {
  content: ''; position: absolute; left: -30%; top: -60%; width: 90%; height: 160%;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%);
  transform: rotate(8deg); pointer-events: none;
}
.jar-hero-k { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--ink3); }
.jar-hero-v {
  font-family: var(--serif); font-size: 58px; font-weight: 800; line-height: 1.06;
  letter-spacing: -.03em; color: var(--accent-ink); font-variant-numeric: tabular-nums;
  margin: 8px 0 6px;
}
.jar-hero-v small { font-size: 32px; margin-right: 4px; opacity: .55; vertical-align: -.1em; line-height: 1; }
.jar-card-v .cur { font-size: 17px; margin-right: 1px; opacity: .8; vertical-align: .16em; }
.jar-hero-s { font-size: 11.5px; color: var(--ink2); line-height: 1.75; font-weight: 600; }
.jar-set {
  margin-top: 14px; font-size: 11.5px; font-weight: 800; color: var(--accent);
  border: 1px dashed #DCB98A; border-radius: 999px; padding: 6px 15px;
  background: #FFFDF8; transition: transform .15s;
}
.jar-set:active { transform: scale(.96); }

/* 下一个目标 */
.jar-next { margin-top: 14px; padding: 16px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.jar-next-k { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ink3); }
.jar-next-n { font-family: var(--serif); font-size: 19px; font-weight: 800; margin: 5px 0 11px; line-height: 1.3; }
.jar-next-bar { height: 9px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.jar-next-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E7C46F, #C89B3C); transition: width .8s cubic-bezier(.22,.9,.28,1); }
.jar-next-s { font-size: 11.5px; color: var(--ink2); margin-top: 9px; line-height: 1.7; font-weight: 600; }
.jar-next.done .jar-next-bar i { background: linear-gradient(90deg, #8FBF9B, #4C6B55); }

/* 心愿单 */
.jar-sec-t { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 10px; font-family: var(--serif); font-size: 15.5px; font-weight: 800; letter-spacing: .02em; }
.jar-sec-t span { font-family: var(--sans); font-size: 10.5px; font-weight: 700; color: var(--ink3); letter-spacing: 0; }
.jar-goals { display: flex; flex-direction: column; gap: 9px; }
.jar-goal {
  padding: 13px 14px; border-radius: var(--r-sm); background: var(--card);
  border: 1px solid var(--line-2); cursor: pointer; transition: border-color .18s, box-shadow .18s, background .18s;
}
.jar-goal.can { border-color: #DCC08A; background: linear-gradient(120deg, #FFFDF4, var(--card)); box-shadow: var(--shadow); }
.jar-goal.pulse { animation: jarPulse 1.3s ease 2; }
@keyframes jarPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,60,0); }
  50% { box-shadow: 0 0 0 4px rgba(200,155,60,.24); }
}
.jg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.jg-name { font-size: 13.5px; font-weight: 800; line-height: 1.45; }
.jg-done-c { font-size: 9.5px; font-weight: 800; color: var(--ink3); margin-left: 6px; letter-spacing: .04em; vertical-align: 1px; }
.jg-price { font-family: var(--serif); font-size: 15px; font-weight: 800; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.jg-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin: 9px 0 8px; }
.jg-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #E7C46F, #C89B3C); transition: width .7s cubic-bezier(.22,.9,.28,1); }
.jar-goal.can .jg-bar i { background: linear-gradient(90deg, #8FBF9B, #4C6B55); }
.jg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 700; color: var(--ink3); }
.jg-gap { letter-spacing: .02em; }
.jar-goal.can .jg-gap { color: var(--green); font-weight: 800; }
.jg-btn {
  font-size: 11.5px; font-weight: 800; color: #fff; background: var(--green);
  border-radius: 999px; padding: 5px 15px; transition: transform .15s;
}
.jg-btn:active { transform: scale(.94); }

.jar-add {
  width: 100%; margin-top: 9px; padding: 12px; border-radius: var(--r-sm);
  border: 1px dashed var(--line); background: transparent;
  font-size: 12.5px; font-weight: 800; color: var(--ink3);
}
.jar-add:active { background: var(--card-2); }

/* 已兑现 */
.jar-reds { border-radius: var(--r-sm); background: var(--card-2); border: 1px solid var(--line-2); overflow: hidden; }
.jar-red { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 11.5px; font-weight: 700; color: var(--ink2); border-bottom: 1px solid var(--line-2); }
.jar-red:last-child { border-bottom: none; }
.jar-red span:first-child { color: var(--ink3); flex: 0 0 auto; }
.jr-n { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-p { color: var(--danger); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* 页脚说明 */
.jar-note {
  margin-top: 26px; padding: 15px 16px; border-radius: var(--r-sm);
  background: var(--gold-soft); border: 1px solid #EBDCC0;
  font-size: 11.5px; line-height: 1.85; color: var(--ink2); font-weight: 600;
}
.jar-note b { color: var(--ink); }

/* 宋体 + tabular-nums + 粗体 会把 ¥（U+00A5）渲染成空白（实测坑）。
   金额里的符号一律单独走无衬线，数字才用等宽数字对齐。 */
.cur {
  font-family: var(--sans);
  font-variant-numeric: normal;
  font-weight: 700;
  letter-spacing: 0;
}

/* 无头截图专用：关掉所有过渡，否则 virtual-time 下会截到淡入中间态 */
.noanim *, .noanim *::before, .noanim *::after { transition: none !important; animation: none !important; }
