diff --git a/assets/img/nursery-room.jpg b/assets/img/nursery-room.jpg deleted file mode 100644 index 0c74cff..0000000 Binary files a/assets/img/nursery-room.jpg and /dev/null differ diff --git a/index.html b/index.html index 75e465f..c99cfcb 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ 兜爸心选 · 孕育陪伴 - + @@ -456,33 +456,6 @@ ⚠️ 纸团飞进树洞的动画靠 Element.animate;不支持的老内核直接跳到「已收好」,不影响收存。 --> - -
- -
-

128 份孕育资料等你来领 · 查看全部 ›

+ + +
+ +
diff --git a/js/app.js b/js/app.js index d891989..6a128b2 100644 --- a/js/app.js +++ b/js/app.js @@ -3,7 +3,7 @@ (function () { 'use strict'; /* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */ - var VER = '26100110'; + var VER = '26100111'; const $ = (s, c) => (c || document).querySelector(s); const $$ = (s, c) => Array.from((c || document).querySelectorAll(s)); @@ -1053,7 +1053,7 @@ function syncPregnancy() { /* 孕期小知识:只认真实孕周(自己判显隐,见 renderTips) */ renderTips(); - nurseryCopy(); + nurseryRender(); /* ---- 产后态:宝宝已出生 → 一律不显示孕周数字(2026-09-22) ---- ⚠️ 必须放在 pregEmpty 之前:产后返回体的 week 也是 null, 落到空态分支会给**已经生产**的用户弹「完善孕期信息」引导。 @@ -3098,30 +3098,105 @@ }, 2600); })(); - /* ================= 3D 婴儿房 · 入口(2026-10-01)================= - 地址由「3D 婴儿房」会话(33d6c837)维护;对方目前不读任何参数,jumpApp 多带的 openid 无害(以后接后端正好用上)。 - · 昼夜:北京时间 19:00–6:00 挂 .is-night(和婴儿房里的昼夜灯光呼应);每 10 分钟查一次,跨点时自己换。 - · 文案:syncPregnancy() 调 nurseryCopy(),只认真实孕周(同孕期小知识的口径)。 */ + /* ================= 3D 婴儿房 · 入口(2026-10-01 二版:走廊尽头的门)================= + 设计和取舍写在 index.html 的 #nursery 注释里。地址由「3D 婴儿房」会话(33d6c837)维护,对方目前不读任何参数。 + · 布置进度**只按孕周推演**(首页读不到房里真实摆了什么);syncPregnancy() 每次都会调 nurseryRender()。 + · 三态:preg(有真实孕周)/ born(产后,全布置好、门敞开)/ empty(没建档,空房间 + 引导填预产期)。 */ const NURSERY_URL = 'https://beian3.douba.top/yef/'; const NURSERY_ID = 'yef-nursery'; - function nurseryCopy() { - const sub = $('#nySub'); - if (!sub) return; - const left = (state.pregEmpty === false && !state.postpartum) ? 40 - (state.week || 0) : -1; - sub.innerHTML = left > 1 ? '再过 ' + left + ' 周 TA 就要住进来啦,
攒兜豆换小床、墙纸和挂饰' - : left >= 0 ? 'TA 马上就要住进来啦,
攒兜豆换小床、墙纸和挂饰' - : '做孕期任务攒兜豆,
换小床、墙纸和挂饰'; - } - (function nurseryCard() { + const NY_STEPS = [ + { w: 4, k: 'wall', n: '粉墙', t: '粉墙刷好了' }, + { w: 12, k: 'curtain', n: '小窗帘', t: '小窗帘挂上了' }, + { w: 16, k: 'rug', n: '软地毯', t: '软地毯铺好了' }, + { w: 20, k: 'crib', n: '小床', t: '小床搬进来了' }, + { w: 24, k: 'mobile', n: '床头风铃', t: '床头风铃挂上了' }, + { w: 28, k: 'lamp', n: '小夜灯', t: '小夜灯装好了' }, + { w: 32, k: 'bear', n: '玩偶熊', t: '玩偶熊住进来了' }, + { w: 36, k: 'bag', n: '待产包', t: '待产包放在门口了' }, + { w: 39, k: 'stars', n: '星星灯', t: '星星灯亮起来了' } + ]; + let nyLines = [], nyLineIdx = 0; + function nurseryRender() { const sec = $('#nursery'); if (!sec) return; - $('#nyCard').addEventListener('click', () => jumpApp(NURSERY_URL, NURSERY_ID)); + const nm = state.babyName || '宝宝'; + const mode = state.postpartum ? 'born' : (state.pregEmpty === false && state.week) ? 'preg' : 'empty'; + const wk = mode === 'born' ? 99 : mode === 'preg' ? state.week : 0; + const done = NY_STEPS.filter(st => wk >= st.w); + const last = done[done.length - 1], next = NY_STEPS[done.length]; + sec.classList.toggle('is-born', mode === 'born'); + $$('#nursery [data-k]').forEach((g) => { + const k = g.getAttribute('data-k'); + g.classList.toggle('on', done.some(st => st.k === k)); + g.classList.toggle('new', mode === 'preg' && !!last && last.k === k && done.length > 1); + }); + const dots = $('#nyDots'); + dots.innerHTML = NY_STEPS.map((st, i) => + '').join(''); + dots.style.setProperty('--p', done.length ? ((done.length - 1) / (NY_STEPS.length - 1) * 100).toFixed(1) + '%' : '0%'); + $('#nySign').textContent = nm + '的房间'; + /* 入住倒计时:预产期 − 今天(按手机本地日期取整天) */ + let days = null; + if (mode === 'preg' && state.due) { + const t = new Date(); t.setHours(0, 0, 0, 0); + days = Math.round((state.due - t) / 864e5); + } + const cal = (top, num, unit, foot) => { + $('#nyCalTop').textContent = top; $('#nyCalNum').textContent = num; + $('#nyCalUnit').textContent = unit; $('#nyCalFoot').textContent = foot; + }; + if (mode === 'born') cal('已入住', state.babyAgeDays == null ? '♥' : state.babyAgeDays, state.babyAgeDays == null ? '' : '天', '欢迎回家'); + else if (days != null && days > 0) cal('入住倒计时', days, '天', (state.due.getMonth() + 1) + '月' + state.due.getDate() + '日'); + else if (days != null) cal('入住倒计时', '0', '天', '随时入住'); + else cal('入住日', '?', '', '填预产期'); + if (mode === 'born') { + $('#nyTitle').textContent = nm + '已经住进来啦'; + $('#nyProg').innerHTML = '房间布置好了 9/9,再给 TA 添点新东西吧'; + nyLines = ['这是我的房间!', '妈妈,再给我添件新玩具吧~']; + } else if (mode === 'preg') { + $('#nyTitle').textContent = '第 ' + wk + ' 周 · ' + (last ? last.t : '房间开始布置啦'); + $('#nyProg').innerHTML = '已布置 ' + done.length + '/9' + + (next ? ' · 下一件 ' + next.n : ' · 全都布置好啦'); + nyLines = ['妈妈,我的房间布置好了吗?']; + if (last && done.length > 1) nyLines.push('听说' + last.n + '到了,我能看看吗?'); + if (next) nyLines.push('我还想要' + next.n + '~'); + if (days > 0) nyLines.push('再过 ' + days + ' 天,我就搬进来啦'); + } else { + $('#nyTitle').textContent = nm + '的房间 · 还空着呢'; + $('#nyProg').innerHTML = '填好预产期,房间会跟着孕周一件件布置好'; + nyLines = ['妈妈,我的房间在哪呀?', '告诉我预产期,我就知道哪天搬进来啦']; + } + nyLineIdx = 0; + $('#nyBubble').textContent = nyLines[0]; + } + (function nurseryInit() { + const sec = $('#nursery'); + if (!sec) return; + const card = $('#nyCard'), bub = $('#nyBubble'); + const still = window.matchMedia && matchMedia('(prefers-reduced-motion: reduce)').matches; + card.addEventListener('click', () => { + if (card.classList.contains('is-opening')) return; + card.classList.add('is-opening'); + setTimeout(() => jumpApp(NURSERY_URL, NURSERY_ID), still ? 0 : 700); + }); + /* 从婴儿房返回(bfcache 恢复)时把门关回虚掩 */ + window.addEventListener('pageshow', () => card.classList.remove('is-opening')); const tick = () => { const h = new Date(Date.now() + 8 * 3600e3).getUTCHours(); // 北京时间 sec.classList.toggle('is-night', h >= 19 || h < 6); }; tick(); setInterval(tick, 600e3); - nurseryCopy(); + /* 气泡轮播:一句 4.5 秒,淡出换下一句 */ + if (!still) setInterval(() => { + if (nyLines.length < 2 || document.hidden) return; + bub.classList.add('out'); + setTimeout(() => { + nyLineIdx = (nyLineIdx + 1) % nyLines.length; + bub.textContent = nyLines[nyLineIdx]; + bub.classList.remove('out'); + }, 350); + }, 4500); + nurseryRender(); })(); /* ================= 此刻,孕妈们在做什么(2026-10-01,需求文档 v1.0 第二节) ================= diff --git a/mama-box.css b/mama-box.css index 9f0ac27..21e82a9 100644 --- a/mama-box.css +++ b/mama-box.css @@ -414,7 +414,7 @@ a.skip:focus{left:16px;top:16px} 对齐的是内容,出血的是底色,这两件事要分开。 ⚠️ 三块的圆角、底色、左右内边距改成在这里一处定义。以后要调,改这一条, 别再回到各自的规则里单独写,那正是上一稿乱掉的原因。 */ -.tool-dock,.game-promo,.preg-tips,.today-line,.nursery,.shelf{ +.tool-dock,.game-promo,.preg-tips,.today-line,.shelf,.nursery{ margin:0 -26px;padding:16px 26px 18px;border-radius:26px; background-color:#fff; /* ⚠️ 这两条是一对,缺一不可,而且必须一起看: @@ -428,7 +428,7 @@ a.skip:focus{left:16px;top:16px} /* 块间距。给后两块,第一块的上间距另有规则(来信卡收放要用)。 ⚠️ 这是**块与块之间**的缝。某一块自己内部觉得挤,要调的是那块的 padding, 不是这里 —— 改这里会把三块的关系一起改掉。 */ -.tool-dock,.game-promo,.preg-tips,.today-line,.nursery,.shelf{margin-top:16px} +.tool-dock,.game-promo,.preg-tips,.today-line,.shelf,.nursery{margin-top:16px} /* ===== 后两块的暖色渐变底(本批新增)===== 用户原话:「在那个宝宝的今日脚印那块,稍微给背景它加一点渐变」 @@ -560,62 +560,106 @@ a.skip:focus{left:16px;top:16px} @keyframes gpTw{0%,100%{opacity:0;transform:scale(.6)}50%{opacity:1;transform:scale(1)}} @media (prefers-reduced-motion:reduce){.gp-cta,.gp-spark{animation:none}.gp-spark{opacity:.8}} -/* ============ 3D 婴儿房 · 入口(2026-10-01)============ - 奶油粉(取婴儿房自己的主色 #E0708A / 背景 #FFF9F3)。右边一座小房子:三角屋顶 + 冒烟的烟囱 + 窗户里的房间截图, - 截图慢慢左右平移(暗示 360° 可转)。.is-night = 北京时间 19:00–6:00:深色底、窗户里亮暖灯、两颗小星星。 */ -.ny-card{position:relative;display:flex;align-items:center;gap:8px;width:100%;overflow:hidden; - border:0;border-radius:22px;padding:16px 14px 16px 18px;text-align:left;font:inherit;color:#6B5048; - background:linear-gradient(135deg,#FFF9F3 0%,#FFEDE8 60%,#FDE0E4 100%);box-shadow:0 8px 22px rgba(224,112,138,.16); - transition:transform .2s var(--ease)} -.ny-card:active{transform:scale(.98)} -.ny-card::before{content:"";position:absolute;left:0;right:0;bottom:0;height:22px;background:#F9E3D6;opacity:.7} -.ny-text{position:relative;z-index:1;flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start} -.ny-tag{font-size:10.5px;font-weight:800;color:#E0708A;background:#fff;border-radius:999px;padding:2px 9px;letter-spacing:.3px} -.ny-name{margin-top:7px;font-size:19px;font-weight:900;line-height:1.25;letter-spacing:.3px;color:#5A3E37} -.ny-sub{margin-top:5px;font-size:12px;line-height:1.5;color:#8A6C63} -.ny-sub b{color:#E0708A;font-weight:900} -.ny-cta{margin-top:10px;display:inline-flex;align-items:center;gap:3px;border-radius:999px;padding:6px 14px; - font-size:13px;font-weight:800;color:#fff;background:linear-gradient(135deg,#F9B4C1,#F18DA2);box-shadow:0 4px 10px rgba(224,112,138,.3)} -.ny-house{position:relative;z-index:1;flex:0 0 auto;width:128px;height:132px;margin-bottom:-4px} -.ny-roof{position:absolute;left:0;right:0;top:12px;height:46px;background:linear-gradient(180deg,#F59AA9,#E0708A); - clip-path:polygon(50% 0,100% 100%,0 100%);border-radius:6px} -.ny-chim{position:absolute;right:28px;top:14px;width:14px;height:34px;background:#FFE3D3;border-radius:3px 3px 0 0} -.ny-chim i{position:absolute;left:3px;top:-4px;width:9px;height:9px;border-radius:50%;background:#fff;opacity:0; - animation:nySmoke 3.6s ease-out infinite} -.ny-chim i:nth-child(2){animation-delay:1.2s}.ny-chim i:nth-child(3){animation-delay:2.4s} -@keyframes nySmoke{0%{opacity:0;transform:translate(0,0) scale(.5)}20%{opacity:.9}100%{opacity:0;transform:translate(10px,-26px) scale(1.4)}} -.ny-body{position:absolute;left:12px;right:12px;top:56px;bottom:0;background:#FFF9F3;border-radius:0 0 12px 12px; - box-shadow:inset 0 0 0 3px #fff} -.ny-win{position:absolute;left:10px;right:10px;top:8px;bottom:10px;overflow:hidden;border-radius:30px 30px 8px 8px; - border:3px solid #fff;background:#FDE7DD;box-shadow:0 3px 8px rgba(160,90,90,.18)} -.ny-win img{position:absolute;top:50%;left:50%;width:148px;height:148px;max-width:none;object-fit:cover; - transform:translate(-50%,-46%);animation:nyPan 9s ease-in-out infinite alternate} -@keyframes nyPan{from{transform:translate(-62%,-46%)}to{transform:translate(-38%,-46%)}} -.ny-win::after{content:"";position:absolute;inset:0;background:linear-gradient(160deg,rgba(255,255,255,.35),rgba(255,255,255,0) 45%);pointer-events:none} -.ny-360{position:absolute;left:-6px;bottom:10px;font-size:10px;font-weight:900;color:#E0708A;background:#fff; - border-radius:999px;padding:2px 7px;box-shadow:0 2px 6px rgba(224,112,138,.25);animation:nyBob 2.4s ease-in-out infinite} -@keyframes nyBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}} -.ny-stars{display:none} -/* 夜间版 */ -.nursery.is-night .ny-card{color:#F4E3E7;background:linear-gradient(135deg,#3A2F4F 0%,#4B3756 60%,#5E3D5A 100%); - box-shadow:0 8px 22px rgba(58,47,79,.3)} -.nursery.is-night .ny-card::before{background:#2E2540} -.nursery.is-night .ny-name{color:#FFF3F5} -.nursery.is-night .ny-sub{color:#D9C5D0} -.nursery.is-night .ny-sub b{color:#FFB3C3} -.nursery.is-night .ny-tag{background:rgba(255,255,255,.14);color:#FFC6D2} -.nursery.is-night .ny-body{background:#4A3B5C;box-shadow:inset 0 0 0 3px #6A5478} -.nursery.is-night .ny-chim{background:#6A5478} -.nursery.is-night .ny-chim i{background:#B9A9C9} -.nursery.is-night .ny-win{border-color:#FFE2A8;box-shadow:0 0 16px rgba(255,200,120,.55)} -.nursery.is-night .ny-win img{filter:brightness(.85) sepia(.25) saturate(1.2)} -.nursery.is-night .ny-win::after{background:radial-gradient(circle at 50% 30%,rgba(255,210,140,.35),rgba(40,20,60,.25) 75%)} -.nursery.is-night .ny-stars{display:block} -.ny-stars i{position:absolute;width:10px;height:10px;background:#FFE2A8;animation:gpTw 2s ease-in-out infinite; - clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)} -.ny-stars i:first-child{left:-22px;top:-50px} -.ny-stars i:last-child{right:-14px;top:-36px;width:7px;height:7px;animation-delay:.9s} -@media (prefers-reduced-motion:reduce){.ny-win img,.ny-chim i,.ny-360,.ny-stars i{animation:none}.ny-win img{transform:translate(-50%,-46%)}} +/* ============ 3D 婴儿房 · 入口(2026-10-01 二版:走廊尽头的门)============ + 配色取婴儿房自己的奶油粉:主色 #E0708A、按钮 #F9B4C1→#F18DA2、底 #FFF9F3、蜜桃 #F9C9A8、薄荷 #A9DCC7、字 #6B5048。 + 场景坐标都是绝对定位,改尺寸时门(.ny-way)、气泡、木牌、日历四样一起看,别互相压住。 */ +.nursery{padding-top:14px;padding-bottom:16px} +.ny{position:relative;display:block;width:100%;overflow:hidden;border:0;border-radius:22px;padding:14px 16px 12px; + text-align:left;font:inherit;color:#6B5048;background:linear-gradient(180deg,#FFF9F3 0%,#FFEEE9 100%); + box-shadow:0 8px 22px rgba(224,112,138,.15);-webkit-tap-highlight-color:transparent} +.ny-head{display:flex;flex-direction:column;align-items:flex-start} +.ny-eyebrow{font-size:10.5px;font-weight:800;color:#E0708A;background:#fff;border-radius:999px;padding:2px 9px;letter-spacing:.3px} +.ny-title{margin-top:6px;font-size:17px;font-weight:900;color:#5A3E37;letter-spacing:.3px} +.ny-scene{position:relative;display:block;height:192px;margin:6px -16px 0} +.ny-scene::after{content:"";position:absolute;left:0;right:0;bottom:0;height:26px;background:linear-gradient(180deg,#F5DCCB,#F9E6DA)} +/* 门洞:拱形,白色门框;里面是房间,外面盖一扇虚掩的门 */ +.ny-way{position:absolute;left:28px;bottom:26px;width:112px;height:158px;border-radius:56px 56px 3px 3px; + box-shadow:0 0 0 6px #fff,0 6px 16px rgba(160,90,90,.18);z-index:1} +.ny-room{position:absolute;inset:0;overflow:hidden;border-radius:inherit;background:#FCE1E4} +.ny-room svg{position:absolute;left:0;bottom:0;width:100%;height:100%;transform-origin:50% 70%;transition:transform .7s var(--ease)} +.ny-room [data-k]{opacity:0;transform-box:fill-box;transform-origin:50% 100%} +.ny-room [data-k].on{opacity:1} +.ny-room [data-k].new{animation:nyPop 2.6s ease-in-out infinite} +@keyframes nyPop{0%,70%,100%{transform:translateY(0) scale(1)}78%{transform:translateY(-4px) scale(1.06)}86%{transform:translateY(0) scale(.98)}} +.ny-room [data-k="mobile"].on{transform-origin:50% 0;animation:nySwing 4s ease-in-out infinite} +@keyframes nySwing{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}} +.ny-room .r-moon{opacity:0} +.ny-door{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,#FFF6EF,#FBE6DA); + transform-origin:0 50%;transform:perspective(380px) rotateY(62deg);transition:transform .7s var(--ease); + box-shadow:inset 0 0 0 2px #F3D3C2,6px 0 12px rgba(120,60,60,.18)} +.ny-door::before,.ny-door::after{content:"";position:absolute;left:14px;right:14px;border:2px solid #F3D3C2} +.ny-door::before{top:16px;height:58px;border-radius:40px 40px 6px 6px} +.ny-door::after{bottom:14px;height:52px;border-radius:6px} +.ny-knob{position:absolute;right:11px;top:56%;width:9px;height:9px;border-radius:50%;background:#E3AC72;box-shadow:inset -2px -2px 0 rgba(0,0,0,.08)} +.ny-heart{position:absolute;left:50%;top:38px;width:12px;height:12px;margin-left:-6px;background:#F18DA2; + clip-path:path("M6 11L1.2 6.2A3 3 0 0 1 6 2.4 3 3 0 0 1 10.8 6.2Z")} +/* 门缝里漏出来的暖光,铺在走廊地上 */ +.ny-glow{position:absolute;left:46px;bottom:0;width:150px;height:28px;z-index:0;opacity:.75;transition:opacity .5s; + background:linear-gradient(180deg,rgba(255,214,150,.75),rgba(255,214,150,0));clip-path:polygon(0 0,62% 0,100% 100%,6% 100%)} +.ny-glow{z-index:1} +/* 宝宝从门缝里说话 */ +.ny-bubble{position:absolute;left:116px;top:52px;z-index:3;box-sizing:border-box;max-width:104px;padding:6px 10px;border-radius:12px 12px 12px 3px; + background:#fff;color:#6B5048;font-size:11.5px;font-weight:700;line-height:1.45;box-shadow:0 4px 12px rgba(160,90,90,.18); + transition:opacity .35s,transform .35s} +.ny-bubble.out{opacity:0;transform:translateY(4px)} +/* 木牌 */ +.ny-sign{position:absolute;right:18px;top:16px;z-index:2;transform-origin:50% -14px;animation:nySwing 5s ease-in-out infinite} +.ny-sign::before{content:"";position:absolute;left:22%;right:22%;top:-13px;height:13px;border:1.5px solid #C99A7A;border-bottom:0;border-radius:50% 50% 0 0} +.ny-sign::after{content:"";position:absolute;left:50%;top:-17px;width:6px;height:6px;margin-left:-3px;border-radius:50%;background:#B9876A} +.ny-sign b{display:block;padding:6px 12px;border-radius:8px;background:linear-gradient(180deg,#EBC09A,#DCA683);color:#fff; + font-size:13px;font-weight:900;letter-spacing:.5px;white-space:nowrap;text-shadow:0 1px 0 rgba(150,90,60,.35); + box-shadow:inset 0 0 0 2px rgba(255,255,255,.35),0 3px 6px rgba(150,90,60,.2)} +/* 撕页日历 = 入住倒计时 */ +.ny-cal{position:absolute;right:22px;bottom:34px;z-index:2;width:80px;border-radius:9px;background:#fff;overflow:hidden; + display:flex;flex-direction:column;align-items:center;box-shadow:0 5px 12px rgba(160,90,90,.18);transform:rotate(2deg)} +.ny-cal-top{align-self:stretch;text-align:center;padding:4px 0 3px;font-size:10px;font-weight:800;color:#fff; + background:linear-gradient(135deg,#F9B4C1,#F18DA2);position:relative} +.ny-cal-num{display:flex;align-items:baseline;gap:1px;margin-top:2px;color:#E0708A} +.ny-cal-num b{font-size:28px;font-weight:900;line-height:1.1;font-variant-numeric:tabular-nums} +.ny-cal-num i{font-style:normal;font-size:11px;font-weight:800} +.ny-cal-foot{width:100%;text-align:center;padding:2px 0 5px;font-size:10px;color:#A0857C;border-top:1px dashed #F3D3C2} +/* 进度:9 颗点 */ +.ny-track{display:block;margin-top:10px} +.ny-dots{position:relative;display:flex;justify-content:space-between;align-items:center} +.ny-dots::before{content:"";position:absolute;left:4px;right:4px;top:50%;height:2px;margin-top:-1px;background:#F6DCD3} +.ny-dots::after{content:"";position:absolute;left:4px;top:50%;height:2px;margin-top:-1px;width:var(--p,0%);background:#F18DA2;border-radius:2px} +.ny-dots i{position:relative;z-index:1;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 2px #F6DCD3} +.ny-dots i.on{background:#F18DA2;box-shadow:none} +.ny-dots i.cur{width:12px;height:12px;box-shadow:0 0 0 3px rgba(241,141,162,.28);animation:nyPulse 1.8s ease-in-out infinite} +@keyframes nyPulse{50%{box-shadow:0 0 0 6px rgba(241,141,162,0)}} +.ny-foot{display:flex;align-items:center;gap:8px;margin-top:9px} +.ny-prog{flex:1;min-width:0;font-size:12px;color:#8A6C63;line-height:1.4} +.ny-prog b{color:#E0708A;font-weight:900} +.ny-cta{flex:0 0 auto;display:inline-flex;align-items:center;gap:3px;border-radius:999px;padding:6px 13px;font-size:12.5px;font-weight:800; + color:#fff;background:linear-gradient(135deg,#F9B4C1,#F18DA2);box-shadow:0 4px 10px rgba(224,112,138,.3)} +/* 点击:门推开、房间凑近 */ +.ny.is-opening .ny-door{transform:perspective(380px) rotateY(88deg)} +.ny.is-opening .ny-room svg{transform:scale(1.22)} +.ny.is-opening .ny-glow{opacity:1} +.ny.is-opening .ny-bubble{opacity:0} +/* 已出生:门敞开 */ +.nursery.is-born .ny-door{transform:perspective(380px) rotateY(80deg)} +/* 夜间(北京时间 19:00–6:00) */ +.nursery.is-night .ny{color:#F4E3E7;background:linear-gradient(180deg,#3A2F4F 0%,#4B3756 100%);box-shadow:0 8px 22px rgba(58,47,79,.3)} +.nursery.is-night .ny-scene::after{background:linear-gradient(180deg,#2E2540,#3A2E4A)} +.nursery.is-night .ny-title{color:#FFF3F5} +.nursery.is-night .ny-eyebrow{background:rgba(255,255,255,.14);color:#FFC6D2} +.nursery.is-night .ny-prog{color:#D9C5D0} +.nursery.is-night .ny-prog b{color:#FFB3C3} +.nursery.is-night .ny-way{box-shadow:0 0 0 6px #6A5478,0 0 26px rgba(255,200,120,.45)} +.nursery.is-night .ny-door{background:linear-gradient(90deg,#6A5478,#5A4868);box-shadow:inset 0 0 0 2px #7D6690} +.nursery.is-night .ny-door::before,.nursery.is-night .ny-door::after{border-color:#7D6690} +.nursery.is-night .ny-room .r-wall{fill:#E7C2CF} +.nursery.is-night .ny-room .r-floor{fill:#DDB89E} +.nursery.is-night .ny-room .r-sky{fill:#3E3A66} +.nursery.is-night .ny-room .r-moon{opacity:1} +.nursery.is-night .ny-room .r-glow{opacity:.75} +.nursery.is-night .ny-room svg{filter:sepia(.18) saturate(1.15)} +.nursery.is-night .ny-glow{opacity:1} +.nursery.is-night .ny-dots::before{background:#5E4A70} +.nursery.is-night .ny-dots i{background:#4B3756;box-shadow:inset 0 0 0 2px #6A5478} +.nursery.is-night .ny-dots i.on{background:#F18DA2;box-shadow:none} +@media (prefers-reduced-motion:reduce){.ny-room [data-k],.ny-sign,.ny-dots i.cur{animation:none!important}} /* ============ 孕期小知识(2026-09-30)============ 外壳是公共白色通栏。里面三层: