PageSourceSearch

https://paper2gal.com/assets/ProfilePage--eIe_FSB.js

js paper2gal.com collected 2026-10-09 22:39:46 UTC 92,746 bytes, 149 lines download raw bytes

1import{r as f,j as e}from"./react-vendor-CHQL15iE.js";import{A as X,l as T,S as qt}from"./main-Dck1T9BT.js";import{g as Yt}from"./publicIdentity-C99q7MBr.js";import{aX as Ae,a0 as yt,B as Bt,aY as Kt,c as pe,h as Ut,N as Wt,X as Ce,ae as Re,am as Ft,af as he,L as Gt,H as Qt,aZ as Vt,q as st,ap as nt,a_ as Jt,aV as Xt,A as Zt,a$ as er,b0 as tr,b as rr,b1 as ar,aC as sr,b2 as nr,ac as it,J as ot,T as ir,E as or,a5 as jt}from"./lucide-BFLOpGdB.js";import{R as lt}from"./ResponsiveCloudflareImage-DdXVaAv7.js";import"./pdfjs-ji3DqnKJ.js";import"./markdown-W-rE_H7s.js";import"./katex-math-BxKHCrdI.js";import"./assetUrl-D33wRw9g.js";const ve="/assets/local/characters/ruka/avatar.png",dt="/assets/local/characters/ruka/thinking.png",ct="/assets/local/characters/ruka/surprised.png",pt={zh:{brand:"Paper2Gal 月度物语",opening:"属于你的上月学习物语,已经整理好了。",begin:"开始回想",narrator:"露卡",chapter:"回想章节",memory:"MEMORY ARCHIVE",timeKicker:"时间留下了答案",timeTitle:"上个月,你把时间写进了知识里",total:"累计学习",active:"活跃学习",average:"日均专注",rhythmKicker:"你的学习轨道",rhythmTitle:"那些亮起来的日子,都算数",longest:"上月学习时长最长的一天",streak:"最长连续学习",days:"天",papersKicker:"翻过的每一页",papersTitle:"论文不再只是沉默的文字",completed:"完成生成",generated:"发起生成",voiced:"语音陪伴",unit:"篇",categoryKicker:"知识偏航记录",categoryTitle:"你最常驶向这片知识海域",noCategory:"尚未给论文分类",companionKicker:"上月最佳搭档",companionTitle:"你最喜欢和谁一起读论文",together:"一起完成",share:"的上月阅读",questionsKicker:"好奇心从不沉默",questionsTitle:"你举起的手,让答案离你更近",asked:"上月提问",questions:"次",questionLine:"每一个问题,都是理解开始发生的瞬间。",finalKicker:"上月学习称号",finalLine:"这个月,也继续一起翻开下一页吧。",shareReport:"分享月报",shared:"已复制分享文案",close:"关闭月报",previous:"上一页",next:"下一页",noData:"从第一篇论文开始,故事就会在这里出现。"},en:{brand:"Paper2Gal Monthly Story",opening:"Your study story from last month is ready.",begin:"Begin recollection",narrator:"Ruka",chapter:"Memory chapter",memory:"MEMORY ARCHIVE",timeKicker:"TIME LEFT AN ANSWER",timeTitle:"Last month, you turned quiet hours into knowledge",total:"Study time",active:"Active days",average:"Daily focu
1s",rhythmKicker:"YOUR STUDY ORBIT",rhythmTitle:"Every day that lit up mattered",longest:"Longest study day last month",streak:"Longest streak",days:"days",papersKicker:"EVERY PAGE YOU TURNED",papersTitle:"Papers became more than silent text",completed:"Generated",generated:"Generations",voiced:"With voice",unit:"papers",categoryKicker:"KNOWLEDGE COMPASS",categoryTitle:"This was your most visited field",noCategory:"No category yet",companionKicker:"LAST MONTH’S PARTNER",companionTitle:"Who did you read with most?",together:"You finished",share:"readings together last month",questionsKicker:"CURIOSITY SPOKE UP",questionsTitle:"Every raised hand brought the answer closer",asked:"Questions last month",questions:"",questionLine:"Every question is a moment when understanding begins.",finalKicker:"LAST MONTH’S TITLE",finalLine:"Let us turn the next page together this month.",shareReport:"Share report",shared:"Share text copied",close:"Close report",previous:"Previous",next:"Next",noData:"Your story will begin with the first paper."},ja:{brand:"Paper2Gal 月間ストーリー",opening:"先月の学習物語を、まとめておきました。",begin:"回想を始める",narrator:"ルカ",chapter:"回想チャプター",memory:"MEMORY ARCHIVE",timeKicker:"時間が残した答え",timeTitle:"先月、時間を知識へと変えました",total:"学習時間",active:"学習日数",average:"一日平均",rhythmKicker:"学習の軌道",rhythmTitle:"光った一日一日が、確かな歩みです",longest:"先月の学習時間が最も長かった日",streak:"最長連続学習",days:"日",papersKicker:"めくったすべてのページ",papersTitle:"論文はもう、沈黙した文字ではありません",completed:"生成完了",generated:"生成",voiced:"音声付き",unit:"篇",categoryKicker:"知識のコンパス",categoryTitle:"最も長く旅した知識の領域",noCategory:"カテゴリー未設定",companionKicker:"先月のベストパートナー",companionTitle:"誰と一番多く論文を読みましたか",together:"一緒に読んだ",share:"先月の読書",questionsKicker:"好奇心は沈黙しない",questionsTitle:"手を挙げるたび、答えに近づきました",asked:"先月の質問回数",questions:"回",questionLine:"一つの問いから、理解は始まります。",finalKicker:"先月の学習称号",finalLine:"今月も、一緒に次のページを開きましょう。",shareReport:"月報を共有",shared:"共有文をコピーしました",close:"月報を閉じる",previous:"前へ",next:"次へ",noData:"最初の一本から、物語が始まります。"},ru:{brand:"Paper2Gal: история месяца",opening:"Ваша учебная история за прошлый месяц готова.",begin:"Начать воспоминание",narrator:"Рука",chapter:"Глава воспоминаний",memory:"MEMORY ARCHIVE",timeKicker:"ВРЕМЯ ОСТАВИЛО ОТВЕТ",timeTitle:"В прошлом месяце время превратилось в знания",total:"Время учебы",active:"Активные дни",average:"Среднее в день",rhythmKicker:"ВАША УЧЕБНАЯ ОРБИТА",rhythmTitle:"Каждый отмеченный день имел значение",longest:"Самый долгий учебный день прошлого месяца",streak:"Самая длинная серия",days:"дн.",papersKicker:"КАЖДАЯ ПРОЧИТАННАЯ СТРАНИЦА",papersTitle:"Статьи перестали быть безмолвным текстом",completed:"Создано",generated:"Генерации",voiced:"С озвучкой",unit:"статей",categoryKicker:"КОМПАС ЗНАНИЙ",categoryTitle:"Самая посещаемая область знаний",noCategory:"Без категории",companionKicker:"ПАРТНЕР ПРОШЛОГО МЕСЯЦА",companionTitle:"С кем вы читали чаще всего?",together:"Вместе завершено",share:"чтений за прошлый месяц",questionsKicker:"ЛЮБОПЫТСТВО ГОВОРИТ",questionsTitle:"Каждый вопрос приближал ответ",asked:"Вопросов за прошлый месяц",questions:"",questionLine:"Каждый вопрос становится началом понимания.",f
1inalKicker:"ЗВАНИЕ ПРОШЛОГО МЕСЯЦА",finalLine:"В этом месяце откроем новую страницу вместе.",shareReport:"Поделиться",shared:"Текст скопирован",close:"Закрыть отчет",previous:"Назад",next:"Далее",noData:"История начнется с первой статьи."}},vt=n=>pt[n]||pt.en,lr=(n,r)=>`${n}${r==="zh"?",":r==="ja"?"、":", "}${vt(r).opening}`,dr=(n,r)=>{var h;const p=(h=n==null?void 0:n.name)==null?void 0:h.trim();return p||{zh:"露卡",en:"Ruka",ja:"ルカ",ru:"Рука"}[r]||"Ruka"},cr=(n,r)=>{const p=/^(\d{4})-(\d{2})$/.exec(n);if(!p)return[];const h=Number(p[1]),a=Number(p[2]);if(a<1||a>12)return[];const c=new Date(Date.UTC(h,a-1,1)).getUTCDay(),u=new Date(Date.UTC(h,a,0)).getUTCDate(),te=new Map(r.map(s=>[s.date,s]));return[...Array.from({length:c},()=>null),...Array.from({length:u},(s,w)=>{const l=w+1,C=`${n}-${String(l).padStart(2,"0")}`;return{day:l,record:te.get(C)||null}})]},ce=(n,r,p=!1)=>{const h=Math.max(0,Math.round(Number(n)/60)),a=Math.floor(h/60),c=h%60;return r==="zh"?a?`${a}小时${p||!c?"":`${c}分钟`}`:`${c}分钟`:r==="ja"?a?`${a}時間${p||!c?"":`${c}分`}`:`${c}分`:r==="ru"?a?`${a} ч${p||!c?"":` ${c} мин`}`:`${c} мин`:a?`${a}h${p||!c?"":` ${c}m`}`:`${c}m`},pr=(n,r)=>{const p=n.totalSeconds>=36e3?3:n.totalSeconds>=18e3?2:n.activeDays>=7?1:0,h={zh:["第一束学习微光","稳定轨道的观测者","论文星图绘制者","深夜图书馆的守夜人"],en:["First Light of Learning","Observer in a Steady Orbit","Cartographer of Paper Constellations","Keeper of the Midnight Library"],ja:["学びの最初の光","安定軌道の観測者","論文星図の描き手","深夜図書館の番人"],ru:["Первый свет знаний","Наблюдатель устойчивой орбиты","Картограф созвездий статей","Хранитель ночной библиотеки"]};
1return(h[r]||h.en)[p]},_=({tone:n="",meteors:r=2})=>e.jsxs("div",{className:`mrh-sky${n?` ${n}`:""}`,"aria-hidden":"true",children:[e.jsx("i",{className:"mrh-stars a"}),e.jsx("i",{className:"mrh-stars b"}),e.jsx("i",{className:"mrh-stars c"}),Array.from({length:r}).map((p,h)=>e.jsx("i",{className:`mrh-meteor m${h+1}`},h)),e.jsx("i",{className:"mrh-cloud c1"}),e.jsx("i",{className:"mrh-cloud c2"}),e.jsx("i",{className:"mrh-cloud c3"})]}),hr=({language:n,userName:r,data:p,onClose:h})=>{var M;const a=vt(n),c=p.monthlyReport,[u,te]=f.useState(0),[s,w]=f.useState(!1),l=f.useRef(null),C=f.useRef(!1),x=f.useMemo(()=>new Date(`${p.month}-01T00:00:00Z`),[p.month]),L=f.useMemo(()=>new Intl.DateTimeFormat(n==="zh"?"zh-CN":n==="ja"?"ja-JP":n==="ru"?"ru-RU":"en-US",{year:"numeric",month:"long",timeZone:"UTC"}).format(x),[n,x]),o=c.favoriteCharacter,E=dr(o,n),re=(o==null?void 0:o.avatarUrl)||ve,me=Math.max(1,...c.categories.map(m=>m.count)),S=pr(c,n),H=8,v=m=>te(Math.max(0,Math.min(H-1,m)));f.useEffect(()=>{const m=g=>{(g.key==="ArrowDown"||g.key==="ArrowRight"||g.key===" ")&&v(u+1),(g.key==="ArrowUp"||g.key==="ArrowLeft")&&v(u-1),g.key==="Escape"&&h()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[u,h]);const ae=m=>{C.current||Math.abs(m.deltaY)<18||(C.current=!0,v(u+(m.deltaY>0?1:-1)),window.setTimeout(()=>{C.current=!1},650))},z=m=>{var g;l.current=((g=m.touches[0])==null?void 0:g.clientY)??null},O=m=>{var D;if(l.current==null)return;const g=l.current-(((D=m.changedTouches[0])==null?void 0:D.clientY)??l.current);l.current=null,Math.abs(g)>45&&v(u+(g>0?1:-1))},xe=async()=>{const m=`${L} · ${S}
2${ce(c.totalSeconds,n)} · ${c.completedStories} ${a.unit}
3${a.finalLine}`;try{navigator.share?await navigator.share({title:a.brand,text:m,url:window.location.origin}):await navigator.clipboard.writeText(m),w(!0),window.setTimeout(()=>w(!1),2200)}catch{}},W=f.useMemo(()=>cr(p.month,p.days),[p.days,p.month]),se=[e.jsxs("section",{className:"mrh-page mrh-cover",children:[e.jsx(_,{tone:"dusk",meteors:3}),e.jsx("div",{className:"mrh-moon"}),e.jsxs("div",{className:"mrh-sparkles","aria-hidden":"true",children:[e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{}),e.jsx("i",{})]}),e.jsx("img",{src:ve,className:"mrh-cover-character",alt:""}),e.jsxs("div",{className:"mrh-content mrh-cover-content",children:[e.jsxs("div",{className:"mrh-cover-logo",children:[e.jsx("small",{children:a.memory}),e.jsx("strong",{children:a.brand}),e.jsx("span",{children:L})]}),e.jsxs("div",{className:"mrh-dialogue",children:[e.jsx("span",{className:"mrh-nameplate",children:a.narrator}),e.jsx("p",{children:lr(r||"Paper2Gal",n)}),e.jsxs("button",{type:"button",className:"mrh-open",onClick:()=>v(1),children:[a.begin,e.jsx("span",{className:"mrh-next-triangle"})]})]})]})]},"cover"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-time",children:[e.jsx(_,{}),e.jsx("div",{className:"mrh-orbit mrh-orbit-a"}),e.jsx("div",{className:"mrh-orbit mrh-orbit-b"}),e.jsxs("div",{className:"mrh-chapter",children:["01 ",e.jsx("span",{children:a.chapter})]}),e.jsx("img",{src:dt,className:"mrh-scene-character thinking",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel",children:[e.jsx("span",{className:"mrh-panel-name",children:a.narrator}),e.jsx("div",{className:"mrh-eyebrow dark",children:a.timeKicker}),e.jsx("h2",{children:a.timeTitle}),e.jsxs("div",{className:"mrh-hero-number",children:[e.jsx("strong",{children:ce(c.totalSeconds,n,!0)}),e.jsx("span",{children:a.total})]}),e.jsxs("div",{className:"mrh-stat-line",children:[e.jsxs("div",{children:[e.jsx("span",{children:a.active}),e.jsxs("strong",{children:[c.activeDays," ",a.days]})]}),e.jsxs("div",{children:[e.jsx("span",{children:a.average}),e.jsx("strong",{children:ce(c.averageSeconds,n)})]})]})]})]},"time"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-rhythm",children:[e.jsx(_,{tone:"teal"}),e.jsxs("div",{className:"mrh-chapter",children:["02 ",e.jsx("span",{children:a.chapter})]}),e.jsx("img",{src:ct,className:"mrh-scene-character",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel",children:[e.jsx("span",{className:"mrh-panel-name",children:a.narrator}),e.jsx("div",{className:"mrh-eyebrow dark",children:a.rhythmKicker}),e.jsx("h2",{children:a.rhythmTitle}),e.jsx("div",{className:"mrh-calendar","aria-label":L,children:W.map((m,g)=>{var D,P;return m?e.jsx("span",{className:(D=m.record)!=null&&D.qualified?"qualified":(P=m.record)!=null&&P.durationSeconds?"active":"",children:m.day},m.day):e.jsx("span",{className:"empty","aria-hidden":"true"},`empty-${g}`)})}),e.jsxs("div",{className:"mrh-rhythm-notes",children:[e.jsxs("div",{children:[e.jsx(Ae,{size:18}),e.jsx("span",{children:a.longest}),e.jsx("strong",{children:c.longestDay?ce(c.longestDay.durationSeconds,n):"-"})]}),e.jsxs("div",{children:[e.jsx(yt,{size:18}),e.jsx("span",{children:a.streak}),e.jsxs("strong",{children:[p.currentStreak," ",a.days]})]})]})]})]},"rhythm"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-papers",children:[e.jsx(_,{tone:"violet"}),e.jsxs("div",{className:"mrh-chapter",children:["03 ",e.jsx("span",{children:a.chapter})]}),e.jsx("img",{src:ve,className:"mrh-scene-character",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel",children:[e.jsx("span",{className:"mrh-panel-name",children:a.narrator}),e.jsx("div",{className:"mrh-eyebrow dark",children:a.papersKicker}),e.jsx("h2",{children:a.papersTitle}),e.jsxs("div",{className:"mrh-paper-total",children:[e.jsx(Bt,{size:26}),e.jsx("strong",{children:c.completedStories}),e.jsx("span",{children:a.unit})]}),e.jsxs("div",{className:"mrh-three-stats",children:[e.jsxs("div",{children:[e.jsx("span",{children:a.completed}),e.jsx("strong",{children:c.completedStories})]}),e.jsxs("div",{children:[e.jsx("span",{children:a.generated}),e.jsx("strong",{children:c.generationCount})]}),e.jsxs("div",{children:[e.jsx("span",{children:a.voiced}),e.jsx("strong",{children:c.voiceStories})]})]})]})]},"papers"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-category",children:[e.jsx(_,{tone:"deep",meteors:1}),e.jsxs("div",{className:"mrh-chapter light",children:["04 ",e.jsx("span",{children:a.chapter})]}),e.jsx("img",{src:dt,className:"mrh-scene-character thinking",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel mrh-story-panel-dark",children:[e.jsx("span",{className:"mrh-panel-name",children:a.narrator}),e.jsx("div",{className:"mrh-eyebrow light",children:a.categoryKicker}),e.jsx("h2",{children:a.categoryTitle}),e.jsx("div",{className:"mrh-category-name",children:((M=c.favoriteCategory)==null?void 0:M.name)||a.noCategory}),e.jsx("div",{className:"mrh-category-bars",children:c.categories.length?c.categories.map((m,g)=>e.jsxs("div",{style:{"--bar":`${Math.max(12,m.count/me*100)}%`},children:[e.jsxs("span",{children:[String(g+1).padStart(2,"0")," · ",m.name]}),e.jsx("i",{}),e.jsx("strong",{children:m.count})]},m.name)):e.jsx("p",{children:a.noData})})]})]},"category"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-companion",children:[e.jsx(_,{tone:"rose"}),e.jsxs("div",{className:"mrh-chapter",children:["05 ",e.jsx("span",{children:a.chapter})]}),e.jsxs("div",{className:"mrh-companion-copy mrh-story-panel",children:[e.jsx("span",{className:"mrh-panel-name",children:E}),e.jsx("div",{className:"mrh-eyebrow dark",children:a.companionKicker}),e.jsx("h2",{children:a.companionTitle}),e.jsx("p",{children:E}),e.jsxs("div",{children:[e.jsx("span",{children:a.together}),e.jsx("strong",{children:(o==null?void 0:o.count)||0}),e.jsx("span",{children:a.share})]})]}),e.jsx("div",{className:"mrh-character-halo"}),e.jsx("img",{src:re,className:"mrh-character",alt:E})]},"companion"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-questions",children:[e.jsx(_,{tone:"plum",meteors:1}),e.jsxs("div",{className:"mrh-chapter light",children:["06 ",e.jsx("span",{children:a.chapter})]}),e.jsx("div",{className:"mrh-question-mark","aria-hidden":"true",children:"?"}),e.jsx("img",{src:ct,className:"mrh-scene-character",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel mrh-story-panel-dark",children:[e.jsx("span",{className:"mrh-panel-name",children:a.narrator}),e.jsx("div",{className:"mrh-eyebrow light",children:a.questionsKicker}),e.jsx("h2",{children:a.questionsTitle}),e.jsx(Kt,{size:34}),e.jsxs("div",{className:"mrh-question-count",children:[e.jsx("span",{children:a.asked}),e.jsx("strong",{children:c.questionCount}),e.jsx("span",{children:a.questions})]}),e.jsxs("p",{className:"mrh-quote",children:["“",a.questionLine,"”"]})]})]},"questions"),e.jsxs("section",{className:"mrh-page mrh-scene mrh-final",children:[e.jsx(_,{tone:"dawn",meteors:3}),e.jsxs("div",{className:"mrh-chapter",children:["07 ",e.jsx("span",{children:a.chapter})]}),e.jsxs("div",{className:"mrh-final-stars","aria-hidden":"true",children:[e.jsx(pe,{}),e.jsx(pe,{}),e.jsx(pe,{})]}),e.jsx("img",{src:re,className:"mrh-scene-character final-character",alt:""}),e.jsxs("div",{className:"mrh-content mrh-story-panel mrh-final-panel",children:[e.jsx("div",{className:"mrh-eyebrow dark",children:a.finalKicker}),e.jsxs("div",{className:"mrh-title-seal",children:[e.jsx("span",{children:L}),e.jsx("strong",{children:S})]}),e.jsxs("p",{className:"mrh-final-line",children:[E," · ",a.finalLine]}),e.jsxs("div",{className:"mrh-final-actions",children:[e.jsxs("button",{type:"button",onClick:xe,children:[s?e.jsx(Ut,{size:18}):e.jsx(Wt,{size:18}),s?a.shared:a.shareReport]}),e.jsxs("button",{type:"button",onClick:h,children:[e.jsx(Ce,{size:18}),a.close]})]})]})]},"final")];return e.jsxs("div",{className:`mrh-root mrh-page-${u}`,onWheel:ae,onTouchStart:z,onTouchEnd:O,children:[e.jsx("style",{children:`.mrh-root{position:fixed;inset:0;z-index:180;overflow:hidden;background:#070c26;color:#eaf0ff;font-family:"Quicksand","Noto Sans SC",sans-serif;letter-spacing:0}
4.mrh-root *{box-sizing:border-box}
5.mrh-page{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
6.mrh-page:not(.mrh-cover)::after{content:"";position:absolute;z-index:8;inset:18px;pointer-events:none;border:1px solid rgba(146,176,255,.14);border-radius:20px}
7.mrh-sky{position:absolute;inset:0;z-index:0;overflow:hidden;background:linear-gradient(180deg,#060a24 0%,#0d153f 38%,#1c2c6e 72%,#2f49a6 100%)}
8.mrh-sky.dusk{background:linear-gradient(180deg,#080b28 0%,#141a4e 40%,#332f7e 76%,#54459f 100%)}
9.mrh-sky.teal{background:linear-gradient(180deg,#050f24 0%,#0a1f45 42%,#123d6b 74%,#1d5f8f 100%)}
10.mrh-sky.violet{background:linear-gradient(180deg,#0a0722 0%,#1b1348 42%,#3b2372 74%,#5c3794 100%)}
11.mrh-sky.deep{background:linear-gradient(180deg,#04061a 0%,#0a1030 45%,#142052 78%,#1e3173 100%)}
12.mrh-sky.rose{background:linear-gradient(180deg,#0b0726 0%,#1e1449 42%,#402463 74%,#6a3a80 100%)}
13.mrh-sky.plum{background:linear-gradient(180deg,#0d0620 0%,#221040 42%,#3c1c5e 74%,#592d77 100%)}
14.mrh-sky.dawn{background:linear-gradient(180deg,#0a0d2b 0%,#232356 42%,#5a3f7e 70%,#b5779a 88%,#f0b08a 100%)}
15.mrh-stars{position:absolute;inset:-60px;background-repeat:repeat;pointer-events:none}
16.mrh-stars.a{background-image:radial-gradient(1.6px 1.6px at 22px 34px,rgba(255,255,255,.95),transparent 60%),radial-gradient(1.2px 1.2px at 142px 96px,rgba(255,255,255,.7),transparent 60%),radial-gradient(1px 1px at 86px 190px,rgba(197,220,255,.8),transparent 60%),radial-gradient(1.3px 1.3px at 210px 150px,rgba(255,255,255,.55),transparent 60%);background-size:250px 250px;animation:mrhTwinkle 5.2s ease-in-out infinite}
17.mrh-stars.b{background-image:radial-gradient(1px 1px at 60px 140px,rgba(255,255,255,.75),transparent 60%),radial-gradient(1.4px 1.4px at 180px 40px,rgba(210,228,255,.85),transparent 60%),radial-gradient(1px 1px at 250px 210px,rgba(255,255,255,.5),transparent 60%);background-size:340px 340px;animation:mrhTwinkle 6.8s ease-in-out -2.4s infinite}
18.mrh-stars.c{background-image:radial-gradient(2px 2px at 100px 220px,rgba(255,244,214,.9),transparent 62%),radial-gradient(1px 1px at 300px 90px,rgba(255,255,255,.6),transparent 60%);background-size:460px 460px;animation:mrhTwinkle 8.4s ease-in-out -4.1s infinite}
19.mrh-meteor{position:absolute;top:12%;left:78%;width:3px;height:3px;border-radius:50%;background:#fff;box-shadow:0 0 8px 2px rgba(255,255,255,.55);opacity:0;transform:rotate(215deg)}
20.mrh-meteor::before{content:"";position:absolute;top:50%;left:2px;width:170px;height:2px;transform:translateY(-50%);border-radius:2px;background:linear-gradient(90deg,rgba(255,255,255,.9),rgba(255,255,255,0))}
21.mrh-meteor.m1{animation:mrhMeteor 9s linear 1.2s infinite}
22.mrh-meteor.m2{top:26%;left:88%;animation:mrhMeteor 12s linear 5.5s infinite}
23.mrh-meteor.m3{top:6%;left:62%;animation:mrhMeteor 14s linear 9.2s infinite}
24.mrh-cloud{position:absolute;pointer-events:none;border-radius:50%}
25.mrh-cloud.c1{left:-12%;bottom:-26%;width:70%;height:64%;background:radial-gradient(ellipse at center,rgba(96,128,220,.5),rgba(96,128,220,0) 68%)}
26.mrh-cloud.c2{right:-16%;bottom:-30%;width:78%;height:70%;background:radial-gradient(ellipse at center,rgba(139,163,236,.42),rgba(139,163,236,0) 70%)}
27.mrh-cloud.c3{left:18%;bottom:-38%;width:90%;height:78%;background:radial-gradient(ellipse at center,rgba(68,93,186,.55),rgba(68,93,186,0) 70%)}
28.mrh-moon{position:absolute;z-index:1;top:8%;right:11%;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle at 36% 34%,#fffdf4,#ffeec2 42%,rgba(255,224,158,.28) 66%,rgba(255,224,158,0) 72%);box-shadow:0 0 110px 46px rgba(255,226,160,.16);pointer-events:none}
29@keyframes mrhTwinkle{0%,100%{opacity:.55}50%{opacity:1}}
30@keyframes mrhMeteor{0%{opacity:0;transform:rotate(215deg) translateX(0)}4%{opacity:1}16%{opacity:1;transform:rotate(215deg) translateX(-46vw)}20%,100%{opacity:0;transform:rotate(215deg) translateX(-60vw)}}
31.mrh-content{position:relative;z-index:2;width:min(920px,calc(100% - 112px));padding:32px}
32.mrh-content h2{max-width:720px;margin:16px 0 42px;font-family:"Noto Serif SC",serif;font-size:clamp(32px,5.5vh,64px);line-height:1.18;font-weight:900;color:#f4f7ff;text-shadow:0 4px 30px rgba(110,140,255,.3)}
33.mrh-eyebrow{font-size:12px;font-weight:900;letter-spacing:.22em;text-transform:uppercase;color:#9fc0ff}
34.mrh-eyebrow.dark{color:#8fb4ff}
35.mrh-eyebrow.light{color:#ffd98f}
36.mrh-chapter{position:absolute;z-index:5;top:74px;left:max(56px,7vw);display:flex;align-items:baseline;gap:12px;color:#ffd98a;font-family:Georgia,serif;font-size:32px;font-style:italic;text-shadow:0 3px 18px rgba(255,217,138,.3)}
37.mrh-chapter span{font-family:"Noto Sans SC",sans-serif;font-size:10px;font-style:normal;font-weight:900;letter-spacing:.3em;text-transform:uppercase;color:#8fa5dd}
38.mrh-chapter.light{color:#ffe9b3}
39.mrh-chapter.light span{color:#a8b8e8}
40.mrh-cover-content{position:absolute;inset:0;width:100%;padding:0;color:#fff}
41.mrh-cover-logo{position:absolute;z-index:3;left:max(7vw,52px);top:16%;display:flex;max-width:560px;flex-direction:column;text-shadow:0 4px 30px rgba(6,12,40,.6)}
42.mrh-cover-logo small{font-size:11px;font-weight:900;letter-spacing:.34em;color:#ffd98a}
43.mrh-cover-logo strong{margin-top:12px;font-family:"Noto Serif SC",serif;font-size:clamp(42px,6.5vw,82px);line-height:1.1;color:#f6f9ff;text-shadow:0 6px 40px rgba(110,140,255,.35)}
44.mrh-cover-logo span{align-self:flex-start;margin-top:16px;border-top:1px solid rgba(255,255,255,.5);padding-top:10px;font-family:Georgia,serif;font-size:18px;color:#dfe6ff}
45.mrh-sparkles{position:absolute;inset:0;z-index:2;pointer-events:none}
46.mrh-sparkles i{position:absolute;width:9px;height:9px;background:#fff;transform:rotate(45deg);box-shadow:0 0 14px 4px rgba(255,244,214,.55);animation:mrhTwinkle 3.6s ease-in-out infinite}
47.mrh-sparkles i:nth-child(1){left:16%;top:24%}
48.mrh-sparkles i:nth-child(2){left:42%;
48top:12%;width:6px;height:6px;animation-delay:-1.2s}
49.mrh-sparkles i:nth-child(3){left:64%;top:30%;width:12px;height:12px;animation-delay:-2.1s}
50.mrh-sparkles i:nth-child(4){left:30%;top:56%;width:5px;height:5px;animation-delay:-.6s}
51.mrh-sparkles i:nth-child(5){left:82%;top:52%;width:7px;height:7px;animation-delay:-2.8s}
52.mrh-cover-character{position:absolute;z-index:2;right:1%;bottom:-15%;width:min(52vw,680px);height:108%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 24px 42px rgba(4,8,30,.65)) drop-shadow(0 0 30px rgba(120,150,255,.16))}
53.mrh-dialogue{position:absolute;z-index:4;right:max(5vw,44px);bottom:max(44px,6vh);left:max(5vw,44px);min-height:142px;border:1px solid rgba(158,186,255,.35);border-radius:24px;background:linear-gradient(165deg,rgba(13,20,52,.9),rgba(22,32,76,.84));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);padding:38px 190px 26px 36px;box-shadow:0 26px 80px rgba(2,6,24,.6),inset 0 1px 0 rgba(255,255,255,.08)}
54.mrh-dialogue::before,.mrh-dialogue::after{content:"";position:absolute;width:22px;height:22px;border-color:#ffd98a}
55.mrh-dialogue::before{left:12px;top:12px;border-left:1.5px solid;border-top:1.5px solid;border-radius:6px 0 0 0}
56.mrh-dialogue::after{right:12px;bottom:12px;border-right:1.5px solid;border-bottom:1.5px solid;border-radius:0 0 6px 0}
57.mrh-nameplate{position:absolute;left:26px;top:0;min-width:132px;transform:translateY(-50%);background:linear-gradient(135deg,#f6d489,#d9a94f);padding:9px 26px;border-radius:999px;color:#3a2a12;font-family:"Noto Serif SC",serif;font-size:15px;font-weight:900;letter-spacing:.06em;text-align:center;box-shadow:0 8px 26px rgba(217,169,79,.4),0 0 0 3px rgba(13,20,52,.9)}
58.mrh-dialogue p{margin:0;font-family:"Noto Serif SC",serif;font-size:18px;font-weight:700;line-height:1.9;color:#eef2ff;text-shadow:0 2px 8px rgba(4,8,28,.5)}
59.mrh-open{position:absolute;right:28px;bottom:24px;display:inline-flex;align-items:center;gap:10px;border:1px solid rgba(255,217,138,.7);border-radius:999px;background:linear-gradient(135deg,#f6d489,#d9a94f);padding:11px 18px;color:#3a2a12;font-family:inherit;font-size:14px;font-weight:900;box-shadow:0 10px 30px rgba(217,169,79,.35);cursor:pointer}
60.mrh-next-triangle{width:0;height:0;border-left:7px solid #3a2a12;border-top:5px solid transparent;border-bottom:5px solid transparent}
61.mrh-page .mrh-story-panel{position:absolute;z-index:4;left:max(44px,6vw);top:50%;width:min(680px,58vw);max-height:calc(100% - 154px);margin:0;transform:translateY(-46%);border:1px solid rgba(158,186,255,.3);border-radius:24px;background:linear-gradient(165deg,rgba(15,23,58,.88),rgba(24,34,82,.8));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);padding:54px 42px 36px;box-shadow:0 28px 80px rgba(2,6,24,.6),inset 0 1px 0 rgba(255,255,255,.09);overflow:hidden;color:#e8eeff}
62.mrh-page .mrh-story-panel::after{content:"";position:absolute;right:16px;bottom:14px;width:20px;height:20px;border-right:1.5px solid rgba(255,217,138,.7);border-bottom:1.5px solid rgba(255,217,138,.7);border-radius:0 0 8px 0;pointer-events:none}
63.mrh-page .mrh-story-panel h2{margin:10px 0 26px;font-size:clamp(28px,4.3vh,47px);line-height:1.22}
64.mrh-panel-name{position:absolute;left:26px;top:12px;min-width:112px;background:linear-gradient(135deg,#f6d489,#d9a94f);padding:8px 22px;border-radius:999px;color:#3a2a12;font-family:"Noto Serif SC",serif;font-size:13px;font-weight:900;letter-spacing:.06em;text-align:center;box-shadow:0 6px 22px rgba(217,169,79,.35)}
65.mrh-page .mrh-story-panel-dark{border-color:rgba(255,217,138,.34);background:linear-gradient(165deg,rgba(10,14,40,.92),rgba(18,26,62,.86))}
66.mrh-page .mrh-story-panel-dark h2{color:#f4f7ff}
67.mrh-story-panel-dark .mrh-category-bars{margin-top:24px}
68.mrh-story-panel-dark .mrh-quote{margin-top:22px}
69.mrh-orbit{position:absolute;z-index:1;border:1px solid rgba(158,186,255,.16);border-radius:50%}
70.mrh-orbit-a{width:640px;height:640px;right:-180px;top:-220px}
71.mrh-orbit-b{width:420px;height:420px;right:-70px;top:-110px;border-color:rgba(255,217,138,.14)}
72.mrh-hero-number{display:flex;align-items:flex-end;
72gap:18px;border-bottom:1px solid rgba(158,186,255,.2);padding-bottom:26px}
73.mrh-hero-number strong{font-family:"Noto Serif SC",serif;font-size:clamp(62px,12vh,136px);line-height:.82;background:linear-gradient(180deg,#fff7dd,#f3cd74);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 5px 22px rgba(243,205,116,.28))}
74.mrh-hero-number span{padding-bottom:8px;font-weight:900;color:#aebbe6}
75.mrh-stat-line{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:30px}
76.mrh-stat-line div{position:relative;display:flex;min-height:86px;flex-direction:column;justify-content:center;gap:8px;border:1px solid rgba(158,186,255,.22);border-radius:16px;background:rgba(120,148,255,.08);padding:14px 20px}
77.mrh-stat-line div::before{content:"";position:absolute;left:8px;top:8px;width:7px;height:7px;border-left:1.5px solid #ffd98a;border-top:1.5px solid #ffd98a;border-radius:2px 0 0 0}
78.mrh-stat-line span{font-size:12px;font-weight:900;color:#9db0e4}
79.mrh-stat-line strong{font-size:26px;color:#f2f6ff}
80.mrh-calendar{display:grid;grid-template-columns:repeat(7,42px);gap:9px}
81.mrh-calendar span{display:flex;aspect-ratio:1;align-items:center;justify-content:center;border:1px solid rgba(158,186,255,.18);border-radius:10px;background:rgba(120,148,255,.05);color:#7f92c9;font-size:11px;font-weight:900}
82.mrh-calendar span.empty{visibility:hidden}
83.mrh-calendar span.active{background:rgba(120,148,255,.16);color:#cdd9ff}
84.mrh-calendar span.qualified{border-color:rgba(255,217,138,.65);background:linear-gradient(160deg,#f6d489,#d9a94f);color:#3a2a12;box-shadow:0 6px 20px rgba(217,169,79,.35)}
85.mrh-rhythm-notes{display:flex;gap:12px;margin-top:34px}
86.mrh-rhythm-notes div{display:grid;min-width:230px;grid-template-columns:auto 1fr;gap:2px 10px;align-items:center;border:1px solid rgba(158,186,255,.22);border-radius:16px;background:rgba(120,148,255,.08);padding:15px 18px}
87.mrh-rhythm-notes svg{grid-row:1/3;color:#ffd98a}
88.mrh-rhythm-notes span{font-size:11px;font-weight:900;color:#9db0e4}
89.mrh-rhythm-notes strong{font-size:18px;color:#f2f6ff}
90.mrh-paper-total{display:flex;align-items:baseline;gap:12px;color:#ffd98a}
91.mrh-paper-total svg{color:#ffd98a}
92.mrh-paper-total strong{font-family:"Noto Serif SC",serif;font-size:96px;line-height:1;background:linear-gradient(180deg,#fff7dd,#f3cd74);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 5px 22px rgba(243,205,116,.28))}
93.mrh-paper-total span{font-weight:900;color:#aebbe6}
94.mrh-three-stats{display:flex;gap:10px;margin-top:34px}
95.mrh-three-stats div{display:flex;min-width:130px;flex-direction:column;gap:6px;border:1px solid rgba(158,186,255,.22);border-radius:16px;background:rgba(120,148,255,.08);padding:14px 18px}
96.mrh-three-stats span{font-size:11px;font-weight:900;color:#9db0e4}
97.mrh-three-stats strong{font-size:27px;color:#f2f6ff}
98.mrh-category-name{font-family:"Noto Serif SC",serif;font-size:clamp(44px,8vh,88px);font-weight:900;background:linear-gradient(180deg,#fff7dd,#f3cd74);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 5px 22px rgba(243,205,116,.22))}
99.mrh-category-bars{width:min(620px,100%);margin-top:40px}
100.mrh-category-bars>div{display:grid;grid-template-columns:minmax(120px,220px) 1fr 28px;align-items:center;gap:14px;margin:14px 0}
101.mrh-category-bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:900;color:#c6d4ff}
102.mrh-category-bars i{height:3px;border-radius:2px;background:linear-gradient(90deg,#ffd98a var(--bar),rgba(255,255,255,.12) var(--bar))}
103.mrh-category-bars strong{font-size:12px;color:#ffd98a}
104.mrh-companion{justify-content:flex-start}
105.mrh-companion .mrh-companion-copy.mrh-story-panel{position:absolute;left:max(44px,6vw);top:50%;z-index:4;width:min(590px,52vw);padding:54px 38px 34px;transform:translateY(-46%)}
106.mrh-companion-copy h2{margin:16px 0 30px;font-family:"Noto Serif SC",serif;font-size:clamp(34px,6vh,68px);line-height:1.16}
107.mrh-companion-copy>p{font-family:"Noto Serif SC",serif;font-size:38px;font-weight:900;color:#ffd98a;text-shadow:0 4px 24px rgba(255,217,138,.25)}
108.mrh-companion-copy>div:last-child{display:flex;align-items:baseline;gap:10px;margin-top:22px;color:#aebbe6;font-weight:900}
109.mrh-companion-copy strong{font-size:46px;color:#f2f6ff}
110.mrh-character{position:absolute;z-index:3;right:3%;bottom:-8%;width:min(50vw,620px);height:95%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 26px 44px rgba(4,8,30,.6)) drop-shadow(0 0 28px rgba(120,150,255,.16))}
111.mrh-companion .mrh-character{right:0;bottom:-9%;height:104%;width:min(49vw,650px)}
112.mrh-character-halo{position:absolute;z-index:2;right:3%;width:46vw;max-width:600px;aspect-ratio:1;border:1px solid rgba(255,217,138,.22);border-radius:50%;background:radial-gradient(circle,rgba(255,217,138,.12),rgba(255,217,138,0) 68%)}
113.mrh-question-mark{position:absolute;z-index:1;right:8%;top:-18%;font-family:Georgia,serif;font-size:76vh;line-height:1;color:rgba(255,255,255,.045)}
114.mrh-questions h2{max-width:760px}
115.mrh-questions .mrh-story-panel svg{color:#ffd98a}
116.mrh-question-count{display:flex;align-items:baseline;gap:12px;margin-top:26px}
117.mrh-question-count span{font-size:13px;font-weight:900;color:#cdbee0}
118.mrh-question-count strong{font-family:"Noto Serif SC",serif;font-size:90px;line-height:1;background:linear-gradient(180deg,#fff7dd,#f3cd74);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 5px 22px rgba(243,205,116,.28))}
119.mrh-quote{max-width:600px;margin-top:36px;border-left:2px solid #ffd98a;padding-left:18px;color:#dfe6ff;font-family:"Noto Serif SC",serif;font-size:17px;line-height:1.8}
120.mrh-final .mrh-content{text-align:center}
121.mrh-final-stars svg{position:absolute;z-index:2;color:#ffd98a;filter:drop-shadow(0 0 10px rgba(255,217,138,.5))}
122.mrh-final-stars svg:nth-child(1){left:12%;top:18%}
123.mrh-final-stars svg:nth-child(2){right:15%;top:26%;width:42px;height:42px}
124.mrh-final-stars svg:nth-child(3){right:25%;bottom:18%}
125.mrh-title-seal{width:min(620px,100%);margin:38px auto;border:1px solid rgba(255,217,138,.45);border-radius:26px;background:rgba(255,217,138,.05);padding:50px 28px;outline:1px solid rgba(255,217,138,.18);outline-offset:8px}
126.mrh-title-seal span{display:block;font-size:12px;font-weight:900;letter-spacing:.26em;color:#cdb87f}
127.mrh-title-seal strong{display:block;margin-top:18px;font-family:"Noto Serif SC",serif;font-size:clamp(38px,7vh,72px);line-height:1.18;background:linear-gradient(180deg,#fff7dd,#f3cd74);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 5px 24px rgba(243,205,116,.3))}
128.mrh-final-line{font-family:"Noto Serif SC",serif;color:#c9d4f6}
129.mrh-final-actions{display:flex;justify-content:center;gap:12px;margin-top:34px}
130.mrh-final-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;border:1px solid rgba(255,217,138,.7);border-radius:999px;background:linear-gradient(135deg,#f6d489,#d9a94f);padding:0 20px;color:#3a2a12;font-family:inherit;font-size:14px;font-weight:900;box-shadow:0 10px 30px rgba(217,169,79,.35);cursor:pointer}
131.mrh-final-actions button+button{background:transparent;color:#ffd98a;box-shadow:none}
132.mrh-scene-character{position:absolute;z-index:3;right:0;bottom:-10%;width:min(48vw,650px);height:104%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 24px 42px rgba(4,8,30,.6)) drop-shadow(0 0 28px rgba(120,150,255,.16))}
133.mrh-scene-character.thinking{right:1%;width:min(50vw,690px)}
134.mrh-final .mrh-final-panel{left:50%;width:min(650px,56vw);transform:translate(-58%,-50%)}
135.mrh-topbar{position:absolute;z-index:20;left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;color:#fff}
136.mrh-icon-btn{display:flex;width:42px;height:42px;align-items:center;justify-content:center;border:1px solid rgba(158,186,255,.3);border-radius:50%;background:rgba(10,16,44,.5);color:#fff;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);cursor:pointer}
137.mrh-page-count{font-size:11px;font-weight:900;letter-spacing:.22em;color:#c9d4f6}
138.mrh-progress{position:absolute;z-index:20;right:max(20px,env(safe-area-inset-right));top:50%;display:flex;flex-direction:column;gap:8px;transform:translateY(-50%)}
139.mrh-progress button{width:5px;height:18px;border:0;border-radius:3px;background:rgba(158,186,255,.22);padding:0;cursor:pointer}
140.mrh-progress button.active{height:38px;background:linear-gradient(180deg,#ffe9b3,#d9a94f);box-shadow:0 0 12px rgba(255,217,138,.5)}
141.mrh-nav{position:absolute;z-index:20;left:50%;bottom:max(18px,env(safe-area-inset-bottom));display:flex;gap:8px;transform:translateX(-50%)}
142.mrh-nav button{display:flex;width:42px;height:42px;align-items:center;justify-content:center;border:1px solid rgba(158,186,255,.3);border-radius:50%;background:rgba(13,20,52,.6);color:#dfe6ff;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);cursor:pointer}
143.mrh-nav button:disabled{opacity:.35;cursor:default}
144.mrh-enter{position:absolute;inset:0;animation:mrhEnter .7s cubic-bezier(.22,.8,.25,1) both}
145@keyframes mrhEnter{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
146.mrh-root.mrh-page-0 .mrh-nav{display:none}
147@media(max-width:720px){.mrh-page:not(.mrh-cover)::after{inset:10px;border-radius:14px}.mrh-content{width:100%;padding:94px 24px 70px}.mrh-content h2{margin:10px 0 24px;font-size:30px}.mrh-chapter{left:24px;top:63px;font-size:25px}.mrh-moon{width:110px;height:110px;top:6%;right:8%}.mrh-scene-character{right:-18%;bottom:32%;width:96vw;height:68%;opacity:.96}.mrh-scene-character:not(.final-character){right:-24%;bottom:45%;width:118vw}.mrh-page .mrh-story-panel,.mrh-companion .mrh-companion-copy.mrh-story-panel{top:auto;right:14px;bottom:max(18px,env(safe-area-inset-bottom));left:14px;width:auto;max-height:67%;padding:44px 18px 24px;transform:none;overflow-y:auto;scrollbar-width:none}.mrh-page .mrh-story-panel::-webkit-scrollbar{display:none}.mrh-page .mrh-story-panel h2{margin:8px 0 18px;font-size:25px}.mrh-panel-name{left:18px;top:10px;min-width:96px;padding:6px 16px;font-size:12px}.mrh-final .mrh-final-panel{left:14px;transform:none}.mrh-cover-logo{left:24px;right:24px;top:12%;max-width:76%}.mrh-cover-logo small{font-size:9px}.mrh-cover-logo strong{font-size:36px}.mrh-cover-logo span{font-size:14px}.mrh-cover-character{right:-27%;bottom:13%;width:112vw;height:73%}.mrh-dialogue{right:18px;bottom:max(26px,calc(env(safe-area-inset-bottom) + 16px));left:18px;min-height:154px;padding:36px 20px 54px}.mrh-nameplate{left:18px;min-width:106px;padding:7px 20px;font-size:14px}.mrh-dialogue p{font-size:15px;line-height:1.75}.mrh-open{right:16px;bottom:13px;padding:8px 12px}.mrh-hero-number{display:block}
147.mrh-hero-number strong{display:block;font-size:56px}.mrh-hero-number span{display:block;margin-top:10px}.mrh-stat-line{gap:8px;margin-top:20px}.mrh-stat-line div{min-height:68px;padding:10px}.mrh-stat-line strong{font-size:17px}.mrh-calendar{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.mrh-rhythm-notes{display:grid;gap:7px;margin-top:16px}.mrh-rhythm-notes div{min-width:0;padding:9px 12px}.mrh-paper-total strong{font-size:62px}.mrh-three-stats{gap:5px;margin-top:20px}.mrh-three-stats div{min-width:0;flex:1;padding:9px 7px}.mrh-category-name{font-size:36px}.mrh-category-bars{margin-top:22px}.mrh-question-count strong{font-size:60px}.mrh-meteor.m2,.mrh-meteor.m3{display:none}}
148@media(prefers-reduced-motion:reduce){.mrh-enter,.mrh-meteor,.mrh-stars,.mrh-sparkles i{animation:none}}
149`}),e.jsxs("div",{className:"mrh-topbar",children:[e.jsx("button",{type:"button",className:"mrh-icon-btn",onClick:h,title:a.close,"aria-label":a.close,children:e.jsx(Re,{size:19})}),e.jsxs("span",{className:"mrh-page-count",children:[String(u+1).padStart(2,"0")," / ",String(H).padStart(2,"0")]})]}),e.jsx("div",{className:"mrh-enter",children:se[u]},u),e.jsx("div",{className:"mrh-progress","aria-label":"Report pages",children:se.map((m,g)=>e.jsx("button",{type:"button",className:g===u?"active":"",onClick:()=>v(g),"aria-label":`${g+1}`},g))}),e.jsxs("div",{className:"mrh-nav",children:[e.jsx("button",{type:"button",onClick:()=>v(u-1),disabled:u===0,title:a.previous,"aria-label":a.previous,children:e.jsx(Ft,{size:20})}),e.jsx("button",{type:"button",onClick:()=>v(u+1),disabled:u===H-1,title:a.next,"aria-label":a.next,children:e.jsx(he,{size:20})})]})]})},mr={zh:{title:"个人主页",back:"返回",loginTitle:"登录后查看个人主页",login:"登录",email:"绑定邮箱",discord:"Discord",notSet:"未设置",verified:"已验证",member:"会员",free:"普通用户",validUntil:"有效期至",manageMember:"升级会员",studyBoard:"我的学习",logout:"退出登录",totalRuns:"累计生成",totalTime:"累计学习",todayQuota:"今日额度",permanentQuota:"永久次数",voiceQuota:"永久语音",community:"创意工坊",active:"已激活",bindDiscord:"去绑定",discordBound:"已绑定",discordCheckReward:"我已进群,检查并领取",error:"更新失败",achievements:"我的成就",accountSecurity:"账号与安全",learningOverview:"学习概览",all:"全部",backToProfile:"返回主页",achievementProgress:"成就进度",unlockedCount:"已解锁",totalAchievements:"全部成就",editProfile:"编辑名字",displayName:"名字",save:"保存",saving:"保存中",cancel:"取消",close:"关闭",sevenDays:"近7天",studyDuration:"学习时长",totalStudyDuration:"总学习时长",betterThan:"超过了 65% 的用户",unlocked:"已解锁",locked:"未完成",mailbox:"邮箱",systemMail:"系统邮件",unreadMail:"未读",readMail:"已读",markAllRead:"全部已读",emptyMailbox:"暂无邮件",loadingMailbox:"邮件加载中",mailLoadFailed:"邮件加载失败",deleteAccount:"删除账号",deleteAccountTitle:"永久删除账号",deleteAccountDesc:"云端存档、角色、背景、账号资料和关联资源将永久删除,且无法恢复。",deleteSubscriptionNotice:"删除账号不会自动取消 App Store 订阅,请先在 Apple 订阅管理中取消。",manageAppleSubscription:"管理 App Store 订阅",deleteConfirmLabel:"输入当前邮箱以确认",deleteConfirmAction:"永久删除",deleting:"正在删除",deleteFailed:"账号删除失败,请稍后重试。"},en:{title:"Profile",back:"Back",loginTitle:"Log in to view profile",login:"Log in",email:"Email",discord:"Discord",notSet:"Not set",verified:"Verified",member:"Member",free:"Free",validUntil:"Valid until",manageMember:"Upgrade",studyBoard:"Study",logout:"Log out",totalRuns:"Total runs",totalTime:"Study time",todayQuota:"Today quota",permanentQuota:"Permanent uses",voiceQuota:"Voice balance",community:"Workshop",active:"Active",bindDiscord:"Bind",discordBound:"Bound",discordCheckReward:"I've joined — check and claim",error:"Update failed",achievements:"Achievements",accountSecurity:"Account & Security",learningOverview:"Learning Overview",all:"All",backToProfile:"Back to Profile",achievementProgress:"Achievement Progress",unlockedCount:"Unlocked",totalAchievements:"Total Achievements",editProfile:"Edit Name",displayName:"Name",save:"Save",saving:"Saving",cancel:"Cancel",close:"Close",sevenDays:"Last 7 days",studyDuration:"Study Duration",totalStudyDuration:"Total study time",betterThan:"Better than 65% of users",unlocked:"Unlocked",locked:"Locked",mailbox:"Mailbox",systemMail:"System Mail",unreadMail:"Unread",readMail:"Read",markAllRead:"Mark all read",emptyMailbox:"No mail",loadingMailbox:"Loading mail",mailLoadFailed:"Failed to load mail",deleteAccount:"Delete account",deleteAccountTitle:"Permanently delete account",deleteAccountDesc:"Cloud saves, characters, backgrounds, profile data, and related assets will be permanently deleted and cannot be recovered.",deleteSubscriptionNotice:"Deleting your account does not cancel an App Store subscription. Cancel it in Apple subscription management first.",manageAppleSubscription:"Manage App Store subscription",deleteConfirmLabel:"Enter your current email to confirm",deleteConfirmAction:"Delete permanently",deleting:"Deleting",deleteFailed:"Could not delete your account. Please try again."}},xr=n=>mr[n==="zh"?"zh":"en"],ht={zh:{checkinTitle:"有效学习打卡",currentMonth:"本月",todayDone:"今日已完成",todayPending:"今日学习中",validStudyHint:"在游戏中有效学习满 15 分钟后自动打卡",streak:"连续打卡",days:"天",monthlyReport:"上月学习报告",openReport:"开启上月学习回忆",reportHint:"用一段沉浸式旅程,回看上个月的时间、论文与陪伴",qualifiedDays:"达标天数",activeDays:"学习天数",monthDuration:"本月时长",dailyAverage:"学习日均",vipDecoration:"会员专属装饰",weekdays:["日","一","二","三","四","五","六"]},en:{checkinTitle:"Valid Study Check-in",currentMonth:"This month",todayDone:"Completed today",todayPending:"Studying today",validStudyHint:"Check-in is automatic after 15 minutes of valid in-game study",streak:"Current streak",days:"days",monthlyReport:"Last Month Report",openReport:"Open last month’s memories",reportHint:"Revisit last month’s time, papers, and companions in an immersive journey",qualifiedDays:"Qualified days",activeDays:"Study days",monthDuration:"Monthly time",dailyAverage:"Daily average",vipDecoration:"Member decoration",weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},ja:{checkinTitle:"有効学習チェックイン",currentMonth:"今月",todayDone:"本日達成",todayPending:"本日学習中",validStudyHint:"ゲーム内で15分間有効に学習すると自動で記録されます",streak:"連続記録",days:"日",monthlyReport:"先月の学習レポート",openReport:"先月の学習メモリーを開く",reportHint:"先月の時間、論文、パートナーとの歩みを振り返ります",qualifiedDays:"達成日数",activeDays:"学習日数",monthDuration:"今月の時間",dailyAverage:"1日平均",vipDecoration:"会員限定装飾",weekdays:["日","月","火","水","木","金","土"]},ru:{checkinTitle:"Отметка за учебу",currentMonth:"Этот месяц",todayDone:"Сегодня выполнено",todayPending:"Учеба сегодня",validStudyHint:"Отметка ставится автоматически после 15 минут учебы в игре",streak:"Серия",days:"дн.",monthlyReport:"Отчет за прошлый месяц",openReport:"Открыть воспоминания прошлого месяца",reportHint:"Вспомните время, статьи и спутников прошлого месяца",qualifiedDays:"Дни с отметкой",activeDays:"Учебные дни",monthDuration:"Время за месяц",dailyAverage:"Среднее за день",vipDecoration:"Декор участника",weekdays:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]}},mt="p2g_profile_mail_read_ids",xt=(n,r)=>r!=="zh"&&n.titleEn?n.titleEn:n.title,fr=(n,r)=>r!=="zh"&&n.contentEn?n.contentEn:n.content,br=n=>{let r=String(n||"").trim().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");return r=r.replace(/^### (.*$)/gm,'<h3 class="mt-4 text-sm font-black text-slate-800">$1</h3>'),r=r.replace(/^## (.*$)/gm,'<h2 class="mt-5 text-base font-black text-slate-900">$1</h2>'),r=r.replace(/^# (.*$)/gm,'<h1 class="mb-3 text-xl font-black text-slate-950">$1</h1>'),r=r.replace(/\*\*(.*?)\*\*/g,'<strong class="font-black text-pink-500">$1</strong>'),r=r.replace(/^- (.*$)/gm,'<div class="flex gap-2"><span class="text-pink-400">•</span><span>$1</span></div>'),r=r.replace(/\n{2,}/g,'<div class="h-3"></div>'),r=r.replace(/\n/g,"<br />"),e.jsx("div",{className:"text-sm font-bold leading-7 text-slate-600",dangerouslySetInnerHTML:{__html:r}}
149)},ft={PLAY_ONE_STORY:{zh:{title:"初次讲义",desc:"完成 1 次生成"},en:{title:"First Lecture",desc:"Complete 1 generation"},ja:{title:"はじめての講義",desc:"生成を 1 回完了する"},ru:{title:"Первая лекция",desc:"Завершить 1 генерацию"}},PLAY_TEN_STORIES:{zh:{title:"放学后的研究会",desc:"完成 10 次生成"},en:{title:"After-School Study Club",desc:"Complete 10 generations"},ja:{title:"放課後の研究会",desc:"生成を 10 回完了する"},ru:{title:"Кружок после уроков",desc:"Завершить 10 генераций"}},PLAY_HUNDRED_STORIES:{zh:{title:"第一百篇的约定",desc:"完成 100 次生成"},en:{title:"The Hundredth Promise",desc:"Complete 100 generations"},ja:{title:"百篇目の約束",desc:"生成を 100 回完了する"},ru:{title:"Обещание сотой истории",desc:"Завершить 100 генераций"}},PLAY_TIME_1H:{zh:{title:"与你共度的一小时",desc:"累计学习 1 小时"},en:{title:"One Hour With You",desc:"Study for 1 hour total"},ja:{title:"君と過ごす一時間",desc:"累計 1 時間学習する"},ru:{title:"Час с тобой",desc:"Учиться суммарно 1 час"}},PLAY_TIME_24H:{zh:{title:"陪你直到黎明",desc:"累计学习 24 小时"},en:{title:"Beside You Until Dawn",desc:"Study for 24 hours total"},ja:{title:"夜明けまで隣に",desc:"累計 24 時間学習する"},ru:{title:"Рядом до рассвета",desc:"Учиться суммарно 24 часа"}},PLAY_TIME_72H:{zh:{title:"三日三夜的故事",desc:"累计学习 72 小时"},en:{title:"Three Days and Nights",desc:"Study for 72 hours total"},ja:{title:"三日三晩の物語",desc:"累計 72 時間学習する"},ru:{title:"Три дня и три ночи",desc:"Учиться суммарно 72 часа"}},CREATE_CUSTOM_CHARACTER:{zh:{title:"只属于我的女主角",desc:"自定义过 1 个角色"},en:{title:"My Own Heroine",desc:"Customize 1 character"},ja:{title:"私だけのヒロイン",desc:"キャラクターを 1 人カスタムする"},ru:{title:"Моя героиня",desc:"Настроить 1 персонажа"}},SUBMIT_WORKSHOP_CHARACTER:{zh:{title:"寄往星空的角色档案",desc:"上传 1 个创意工坊角色"},en:{title:"Profile Sent to the Stars",desc:"Submit 1 Workshop character"},ja:{title:"星空へ送るプロフィール",desc:"創意工房へキャラクターを 1 人投稿する"},ru:{title:"Профиль к звездам",desc:"Отправить 1 персонажа в мастерскую"}},BORROW_ONE_CHARACTER:{zh:{title:"初次见面,前辈",desc:"借阅 1 个创意工坊角色"},en:{title:"Nice to Meet You, Senpai",desc:"Borrow 1 Workshop character"},ja:{title:"はじめまして、先輩",desc:"創意工房のキャラクターを 1 人借りる"},ru:{title:"Приятно познакомиться, сэмпай",desc:"Взять 1 персонажа из мастерской"}},SAVE_50:{zh:{title:"回忆相册",desc:"保存 50 个存档"},en:{title:"Memory Album",desc:"Save 50 stories"},ja:{title:"思い出のアルバム",desc:"セーブを 50 個保存する"},ru:{title:"Альбом воспоминаний",desc:"Сохранить 50 историй"}},SHARE_POSTER_ONCE:{zh:{title:"把这一张送给你",desc:"分享 1 次海报或公开存档"},en:{title:"This One For You",desc:"Share 1 poster or public save"},ja:{title:"この一枚を君へ",desc:"ポスターまたは公開セーブを 1 回共有する"},ru:{title:"Этот кадр для тебя",desc:"Поделиться 1 постером или публичным сохранением"}},JOIN_DISCORD:{zh:{title:"欢迎来到放学后的社团活动室",desc:"绑定 Discord 账号"},en:{title:"Welcome to the Clubroom",desc:"Bind a Discord account"},ja:{title:"放課後の部室へようこそ",desc:"Discord アカウントを連携する"},ru:{title:"Добро пожаловать в клуб",desc:"Привязать аккаунт Discord"}},LOGIN_30_DAYS:{zh:{title:"第一个月的“欢迎回来”",desc:"账号创建满 30 天"},en:{title:"First Month of Welcome Back",desc:"Account age reaches 30 days"},ja:{title:"一ヶ月目の「おかえり」",desc:"アカウント作成から 30 日経過する"},ru:{title:"Первый месяц: «С возвращением»",de
149sc:"Аккаунту исполнилось 30 дней"}},WORKSHOP_BORROWED_10:{zh:{title:"被十位前辈选中",desc:"工坊角色累计被借阅 10 次"},en:{title:"Chosen by Ten Senpai",desc:"Your Workshop characters are borrowed 10 times"},ja:{title:"十人の先輩に選ばれて",desc:"投稿キャラクターが累計 10 回借りられる"},ru:{title:"Выбрали десять сэмпаев",desc:"Ваших персонажей взяли 10 раз"}},WORKSHOP_BORROWED_100:{zh:{title:"被一百位前辈选中",desc:"工坊角色累计被借阅 100 次"},en:{title:"Chosen by One Hundred Senpai",desc:"Your Workshop characters are borrowed 100 times"},ja:{title:"百人の先輩に選ばれて",desc:"投稿キャラクターが累計 100 回借りられる"},ru:{title:"Выбрали сто сэмпаев",desc:"Ваших персонажей взяли 100 раз"}},WORKSHOP_BORROWED_1000:{zh:{title:"被一千位前辈选中",desc:"工坊角色累计被借阅 1000 次"},en:{title:"Chosen by One Thousand Senpai",desc:"Your Workshop characters are borrowed 1000 times"},ja:{title:"千人の先輩に選ばれて",desc:"投稿キャラクターが累計 1000 回借りられる"},ru:{title:"Выбрали тысяча сэмпаев",desc:"Ваших персонажей взяли 1000 раз"}},BORROW_TEN_CHARACTERS:{zh:{title:"十色邂逅",desc:"累计借阅 10 个角色"},en:{title:"Ten-Colored Encounters",desc:"Borrow 10 characters total"},ja:{title:"十色の出会い",desc:"キャラクターを累計 10 人借りる"},ru:{title:"Десять встреч",desc:"Взять 10 персонажей всего"}},BORROW_FIFTY_CHARACTERS:{zh:{title:"五十种邂逅",desc:"累计借阅 50 个角色"},en:{title:"Fifty Ways to Meet",desc:"Borrow 50 characters total"},ja:{title:"五十通りの出会い",desc:"キャラクターを累計 50 人借りる"},ru:{title:"Пятьдесят встреч",desc:"Взять 50 персонажей всего"}},RAISE_HAND_1:{zh:{title:"小小的勇气",desc:"举手提问 1 次"},en:{title:"A Little Courage",desc:"Ask 1 raise-hand question"},ja:{title:"小さな勇気",desc:"挙手質問を 1 回する"},ru:{title:"Маленькая смелость",desc:"Задать 1 вопрос поднятием руки"}},RAISE_HAND_10:{zh:{title:"想问你的事",desc:"举手提问 10 次"},en:{title:"Questions for You",desc:"Ask 10 raise-hand questions"},ja:{title:"君に聞きたいこと",desc:"挙手質問を 10 回する"},ru:{title:"Что я хочу спросить",desc:"Задать 10 вопросов поднятием руки"}},RAISE_HAND_50:{zh:{title:"解不开的恋与论文",desc:"举手提问 50 次"},en:{title:"Unsolved Love and Papers",desc:"Ask 50 raise-hand questions"},ja:{title:"解けない恋と論文",desc:"挙手質問を 50 回する"},ru:{title:"Неразгаданная любовь и статьи",desc:"Задать 50 вопросов поднятием руки"}}},ke=(n,r)=>ft[r][n]||ft[r].en,bt={zh:{unlocked:"已解锁",locked:"未完成"},en:{unlocked:"Unlocked",locked:"Locked"},ja:{unlocked:"解除済み",locked:"未達成"},ru:{unlocked:"Открыто",locked:"Не выполнено"}},gr=n=>bt[n]||bt.en,gt="/logo.webp",we="/background.jpg",ur="/player-avatar.webp",yr=!1,Ne="/assets/achievements",Se={PLAY_ONE_STORY:"first-generate.png",PLAY_TEN_STORIES:"diligent-study.png",PLAY_HUNDRED_STORIES:"hundred-generations.png",PLAY_TIME_1H:"diligent-study.png",PLAY_TIME_24H:"all-day-scholar.png",PLAY_TIME_72H:"all-day-scholar.png",CREATE_CUSTOM_CHARACTER:"character-designer.png",SUBMIT_WORKSHOP_CHARACTER:"workshop-uploader.png",BORROW_ONE_CHARACTER:"workshop-borrower.png",SAVE_50:"scholar.png",SHARE_POSTER_ONCE:"workshop-uploader.png",JOIN_DISCORD:"discord-partner.png",LOGIN_30_DAYS:"pro-supporter.png",WORKSHOP_BORROWED_10:"workshop-uploader.png",WORKSHOP_BORROWED_100:"workshop-uploader.png",WORKSHOP_BORROWED_1000:"workshop-uploader.png",BORROW_TEN_CHARACTERS:"workshop-borrower.png",BORROW_FIFTY_CHARACTERS:"workshop-borrower.png",RAISE_HAND_1:"first-generate.png",RAISE_HAND_10:"scholar.png",RAISE_HAND_50:"all-day-scholar.png"},U=({children:n,className:r=""})=>e.jsx("section",{className:`rounded-[22px] border border-[#f3dfea] bg-white shadow-[0_18px_50px_rgba(219,39,119,0.10)] ${r}`,children:n}),Z=({title:n,action:r})=>e.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[e.jsxs("h2",{className:"flex min-w-0 items-center gap-2 text-base font-black text-slate-950",children:[e.jsx("span",{className:"h-5 w-1 rounded-full bg-pink-300"}),e.jsx("span",{className:"truncate",children:n})]}),r]}),ut=({icon:n,label:r,active:p=!1,onClick:h})=>e.jsxs("button",{type:"button",onClick:h,className:`flex h-[52px] w-full items-center gap-3 rounded-2xl px-5 text-left text-sm font-black transition ${p?"bg-pink-50 text-pink-500 shadow-sm":"text-slate-500 hover:bg-pink-50 hover:text-pink-500"}`,children:[e.jsx("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center",children:n}),e.jsx("span",{className:"truncate",children:r})]}),kt=({icon:n,tone:r="pink"})=>{const p={pink:"bg-pink-50 text-pink-500",blue:"bg-blue-50 text-blue-500",amber:"bg-amber-50 text-amber-500",purple:"bg-violet-50 text-violet-500",green:"bg-emerald-50 text-emerald-500"}[r];return e.jsx("span",{className:`flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl ${p}`,children:n})},ee=({icon:n,label:r,value:p,suffix:h,tone:a})=>e.jsxs("div",{className:"flex min-w-[132px] flex-1 items-center gap-3",children:[e.jsx(kt,{icon:n,tone:a}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-xs font-bold text-slate-500",children:r}),e.jsxs("div",{className:"mt-1 flex whitespace-nowrap items-baseline gap-1",children:[e.jsx("span",{className:"whitespace-nowrap text-2xl font-black text-slate-950",children:p}),h&&e.jsx("span",{className:"whitespace-nowrap text-xs font-bold text-slate-500",children:h})]})]})]}
149),jr=({imageSrc:n,title:r,desc:p,unlocked:h=!0,progress:a})=>e.jsxs("div",{className:"min-w-0 px-1.5 py-2 text-center",title:`${r} - ${a}`,children:[e.jsxs("div",{className:"relative mx-auto h-16 w-16",children:[e.jsx("img",{src:n,alt:"",className:`h-full w-full object-contain transition ${h?"drop-shadow-[0_8px_18px_rgba(217,119,6,0.18)]":"opacity-45 grayscale"}`,loading:"lazy",decoding:"async"}),!h&&e.jsx("span",{className:"absolute bottom-1 right-1 flex h-5 w-5 items-center justify-center rounded-full border-2 border-white bg-slate-100 text-slate-500 shadow-sm",children:e.jsx(jt,{size:11})})]}),e.jsx("div",{className:"mt-3 truncate text-[13px] font-black leading-none text-slate-800",children:r}),e.jsx("div",{className:"mt-2 line-clamp-2 min-h-[30px] text-[11px] font-bold leading-[1.35] text-slate-400",children:p})]}),vr=({imageSrc:n,title:r,desc:p,unlocked:h,progress:a,unlockedLabel:c,lockedLabel:u})=>e.jsxs("div",{className:`min-w-0 rounded-2xl border px-4 py-5 text-center transition ${h?"border-amber-100 bg-[#fffaf0]":"border-slate-100 bg-slate-50"}`,children:[e.jsxs("div",{className:"relative mx-auto h-24 w-24",children:[e.jsx("img",{src:n,alt:"",className:`h-full w-full object-contain transition ${h?"drop-shadow-[0_12px_24px_rgba(217,119,6,0.18)]":"opacity-45 grayscale"}`,loading:"lazy",decoding:"async"}),!h&&e.jsx("span",{className:"absolute bottom-2 right-2 flex h-6 w-6 items-center justify-center rounded-full border-2 border-white bg-slate-100 text-slate-500 shadow-sm",children:e.jsx(jt,{size:13})})]}),e.jsx("div",{className:"mt-4 truncate text-base font-black text-slate-900",children:r}),e.jsx("div",{className:"mx-auto mt-2 line-clamp-2 min-h-[36px] max-w-[190px] text-xs font-bold leading-[1.45] text-slate-400",children:p}),e.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2",children:[e.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-black ${h?"bg-amber-100 text-amber-600":"bg-slate-100 text-slate-500"}`,children:h?c:u}),a!==(h?c:u)&&e.jsx("span",{className:"rounded-full bg-white px-3 py-1 text-xs font-black text-slate-500",children:a})]})]}),Er=({language:n,user:r,onBack:p,onLogin:h,onLogout:a,onRefreshUser:c,onOpenMembership:u,onOpenStudyDashboard:te})=>{var Fe,Ge,Qe,Ve,Je,Xe,Ze,et;const s=xr(n),w=ht[n]||ht.en,[l,C]=f.useState(r),[x,L]=f.useState(null),[o,E]=f.useState(null),[re,me]=f.useState(!1),[S,H]=f.useState({submitted:0,borrowed:0,customOwned:0,borrowedByOthers:0}),[v,ae]=f.useState({saveCount:0,sharedSaveCount:0,storyQuestionCount:0,accountAgeDays:0}),[z,O]=f.useState("overview"),[xe,W]=f.useState(!1),[se,M]=f.useState(!1),[m,g]=f.useState(X),[D,P]=f.useState(((Fe=X[0])==null?void 0:Fe.id)??null),[q,ne]=f.useState(()=>new Set),[wt,Te]=f.useState(!1),[_e,Ee]=f.useState(null),[ze,Oe]=f.useState(""),[fe,Me]=f.useState(!1),[De,Y]=f.useState(null),[Nt,ie]=f.useState(!1),[oe,Pe]=f.useState(""),[$,$e]=f.useState(!1),[Ie,be]=f.useState(null),ge=(l==null?void 0:l.name)||((Ge=l==null?void 0:l.email)==null?void 0:Ge.split("@")[0])||((Qe=r==null?void 0:r.email)==null?void 0:Qe.split("@")[0])||"",I=!!((Ve=x==null?void 0:x.membership)!=null&&Ve.active),Le=(Je=x==null?void 0:x.membership)!=null&&Je.unlimitedAll?"Infinity":s.member,St=Yt(I,"text-slate-950",(l==null?void 0:l.publicBadgeId)||(r==null?void 0:r.publicBadgeId),(Xe=x==null?void 0:x.membership)==null?void 0:Xe.unlimitedAll),ue=Math.floor(((l==null?void 0:l.totalPlayTime)||0)/60),le=(l==null?void 0:l.totalPlayCount)??0,At=(Ze=x==null?void 0:x.membership)!=null&&Ze.unlimitedAll?"∞":`${(x==null?void 0:x.count)??0} / ${(x==null?void 0:x.limit)??0}`,de=gr(n),F=r!=null&&r.id?`${mt}:${r.id}`:null,R=m.find(t=>t.id===D)||m[0]||null,B=m.filter(t=>!q.has(t.id)).length,Ct=Math.min(100,Math.round(((o==null?void 0:o.todayProgress.durationSeconds)||0)/Math.max(1,(o==null?void 0:o.targetSeconds)||900)*100)),He=t=>`${Math.floor(Math.max(0,t)/60)} min`,Rt=f.useMemo(()=>{if(!(o!=null&&o.month))return[];const[t,i]=o.month.split("-").map(Number),d=new Date(Date.UTC(t,i,0)).getUTCDate(),y=new Date(Date.UTC(t,i-1,1)).getUTCDay(),A=new Map(o.days.map(N=>[N.date,N]));return[...Array.from({length:y},()=>null),...Array.from({length:d},(N,Q)=>{const K=Q+1,V=`${o.month}-${String(K).padStart(2,"0")}`;return{day:K,date:V,record:A.get(V)||null}})]},[o]),qe=f.useMemo(()=>{const t=o==null?void 0:o.monthlyReport;return!o||!t?null:{month:t.month,currentStreak:t.currentStreak,days:t.days,monthlyReport:{qualifiedDays:t.qualifiedDays,activeDays:t.activeDays,totalSeconds:t.totalSeconds,averageSeconds:t.averageSeconds,completedStories:t.completedStories||0,voiceStories:t.voiceStories||0,questionCount:t.questionCount||0,generationCount:t.generationCount||0,longestDay:t.longestDay||null,favoriteCategory:t.favoriteCategory||null,categories:Array.isArray(t.categories)?t.categories:[],favoriteCharacter:t.favoriteCharacter||null}}},[o]),Ye=t=>{const i=new Set(t);if(ne(i),!!F)try{localStorage.setItem(F,JSON.stringify(Array.from(i)))}catch{}},Be=t=>{if(!t||q.has(t))return;const i=new Set(q);i.add(t),Ye(i)},Tt=()=>{Ye(new Set(m.map(t=>
149t.id)))},_t=t=>{P(t),Be(t)},Et=()=>{const i=m.find(d=>!q.has(d.id))||R||m[0]||null;P((i==null?void 0:i.id)??null),M(!0),i&&Be(i.id)},zt=async()=>{if(!r)return;const t=localStorage.getItem("p2g_token");if(t)try{const i={Authorization:`Bearer ${t}`},[d,y,A]=await Promise.all([T("/api/user/profile",{headers:i}),T("/api/user/status",{headers:i}),T("/api/user/study-checkins",{headers:i})]);if([d.status,y.status,A.status].includes(401)){a();return}if(d.ok){const N=await d.json();C(N),c(N)}y.ok&&L(await y.json()),A.ok&&E(await A.json());try{const[N,Q,K]=await Promise.all([T("/api/community/mine",{headers:i}),T("/api/user/characters",{headers:i}),T("/api/user/achievement-stats",{headers:i})]);if([N.status,Q.status,K.status].includes(401)){a();return}let V=0,tt=0,rt=0,at=0;if(N.ok){const b=await N.json(),J=Array.isArray(b)?b:Array.isArray(b==null?void 0:b.characters)?b.characters:[];V=J.length,at=J.reduce((k,je)=>k+Math.max(0,Number(je==null?void 0:je.borrowCount)||0),0)}if(Q.ok){const b=await Q.json(),J=Array.isArray(b)?b:Array.isArray(b==null?void 0:b.characters)?b.characters:[];tt=J.filter(k=>(k==null?void 0:k.isBorrowed)||(k==null?void 0:k.borrowId)).length,rt=J.filter(k=>!(k!=null&&k.isBorrowed)&&!(k!=null&&k.borrowId)).length}if(K.ok){const b=await K.json();ae({saveCount:Number(b==null?void 0:b.saveCount)||0,sharedSaveCount:Number(b==null?void 0:b.sharedSaveCount)||0,storyQuestionCount:Number(b==null?void 0:b.storyQuestionCount)||0,accountAgeDays:Number(b==null?void 0:b.accountAgeDays)||0})}H({submitted:V,borrowed:tt,customOwned:rt,borrowedByOthers:at})}catch{}}catch{Y(s.error)}};f.useEffect(()=>{C(r),H({submitted:0,borrowed:0,customOwned:0,borrowedByOthers:0}),ae({saveCount:0,sharedSaveCount:0,storyQuestionCount:0,accountAgeDays:0}),E(null),M(!1)},[r==null?void 0:r.id]),f.useEffect(()=>{zt()},[r==null?void 0:r.id]),f.useEffect(()=>{if(!F){ne(new Set);return}try{const t=JSON.parse(localStorage.getItem(F)||"[]");ne(new Set(Array.isArray(t)?t.filter(i=>typeof i=="string"):[]))}catch{ne(new Set)}},[F]),f.useEffect(()=>{if(!r)return;let t=!1;return Te(!0),Ee(null),T("/api/announcements").then(async i=>{var y;if(!i.ok)throw new Error(`Failed to fetch announcements: ${i.status}`);return(((y=i.headers.get("content-type"))==null?void 0:y.toLowerCase())||"").includes("application/json")?i.json():[]}).then(i=>{if(t)return;const d=Array.isArray(i)&&i.length>0?i:X;g(d),P(y=>{var A;return y&&d.some(N=>N.id===y)?y:((A=d[0])==null?void 0:A.id)??null})}).catch(()=>{t||(g(X),P(i=>{var d;return i||((d=X[0])==null?void 0:d.id)||null}),Ee(s.mailLoadFailed))}).finally(()=>{t||Te(!1)}),()=>{t=!0}},[r==null?void 0:r.id,s.mailLoadFailed]);const Ke=async()=>{Y(null);try{const i=await(await fetch("/api/auth/discord/url")).json();if(!(i!=null&&i.url))throw new Error("Could not get Discord auth URL");window.location.href=i.url}catch(t){Y((t==null?void 0:t.message)||s.error)}},Ot=()=>{Oe((l==null?void 0:l.name)||ge),Y(null),W(!0)},Mt=async()=>{if(!r||fe)return;const t=localStorage.getItem("p2g_token");if(!t){h();return}Me(!0),Y(null);try{const i=await T("/api/user/profile",{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({name:ze.trim()})});if(i.status===401){a();return}const d=await i.json().catch(()=>({}));if(!i.ok)throw new Error((d==null?void 0:d.error)||s.error);C(d),c(d),W(!1)}catch(i){Y((i==null?void 0:i.message)||s.error)}finally{Me(!1)}},Dt=async()=>{if(!r||$||oe.trim().toLowerCase()!==r.email.toLowerCase())return;const t=localStorage.getItem("p2g_token");if(!t){h();return}$e(!0),be(null);try{const i=await T("/api/user/account",{method:"DELETE",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({confirmation:oe.trim()})}),d=await i.json().catch(()=>({}));if(!i.ok)throw new Error((d==null?void 0:d.error)||s.deleteFailed);localStorage.removeItem(`${mt}:${r.id}`),a()}catch(i){be((i==null?void 0:i.message)==="CANCEL_WEB_SUBSCRIPTION_FIRST"?n==="zh"?"请先在会员页面取消网页自动续订后再删除账号。":"Cancel your web subscription from Membership before deleting the account.":s.deleteFailed)}finally{$e(!1)}},Pt=f.useMemo(()=>{var i;if(!I)return s.free;const t=(i=x==null?void 0:x.membership)!=null&&i.currentPeriodEnd?new Date(x.membership.currentPeriodEnd).toLocaleDateString():"";
149return t?`${s.validUntil} ${t}`:s.member},[I,(et=x==null?void 0:x.membership)==null?void 0:et.currentPeriodEnd,s.free,s.member,s.validUntil]);if(!r)return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-[#fff6fb] p-6",children:[e.jsx("img",{src:we,alt:"",className:"absolute inset-0 h-full w-full object-cover opacity-[0.18]"}),e.jsx("div",{className:"absolute inset-0 bg-[#fff6fb]"}),e.jsxs(U,{className:"relative w-full max-w-[390px] p-6 text-center",children:[e.jsx(lt,{src:gt,widths:[256,416],sizes:"208px",alt:"Paper2Galgame",className:"mx-auto h-auto w-52"}),e.jsx("h1",{className:"mt-5 text-xl font-black text-slate-950",children:s.loginTitle}),e.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[e.jsx("button",{onClick:p,className:"rounded-2xl border border-slate-100 bg-white px-5 py-3 text-sm font-black text-slate-500 transition hover:text-pink-500",children:s.back}),e.jsxs("button",{onClick:h,className:"inline-flex items-center gap-2 rounded-2xl bg-pink-400 px-5 py-3 text-sm font-black text-white shadow-lg shadow-pink-200 transition hover:bg-pink-500",children:[e.jsx(Gt,{size:16}),s.login]})]})]})]});const $t=(t,i)=>`${Math.min(t,i)}/${i}`,It=(t,i)=>`${Math.min(Math.floor(t/60),i)}/${i}h`,j=(t,i,d)=>{const y=ke(n,t);return{id:t,imageSrc:`${Ne}/${Se[t]}`,title:y.title,desc:y.desc,unlocked:i>=d,progress:$t(i,d)}},ye=(t,i)=>{const d=ke(n,t);return{id:t,imageSrc:`${Ne}/${Se[t]}`,title:d.title,desc:d.desc,unlocked:ue>=i*60,progress:It(ue,i)}},Lt=(t,i)=>{const d=ke(n,t);return{id:t,imageSrc:`${Ne}/${Se[t]}`,title:d.title,desc:d.desc,unlocked:i,progress:i?de.unlocked:de.locked}},G=[j("PLAY_ONE_STORY",le,1),j("PLAY_TEN_STORIES",le,10),j("PLAY_HUNDRED_STORIES",le,100),ye("PLAY_TIME_1H",1),ye("PLAY_TIME_24H",24),ye("PLAY_TIME_72H",72),j("CREATE_CUSTOM_CHARACTER",S.customOwned,1),j("SUBMIT_WORKSHOP_CHARACTER",S.submitted,1),j("BORROW_ONE_CHARACTER",S.borrowed,1),j("SAVE_50",v.saveCount,50),j("SHARE_POSTER_ONCE",v.sharedSaveCount,1),Lt("JOIN_DISCORD",!!(l!=null&&l.discordId)),j("LOGIN_30_DAYS",v.accountAgeDays,30),j("WORKSHOP_BORROWED_10",S.borrowedByOthers,10),j("WORKSHOP_BORROWED_100",S.borrowedByOthers,100),j("WORKSHOP_BORROWED_1000",S.borrowedByOthers,1e3),j("BORROW_TEN_CHARACTERS",S.borrowed,10),j("BORROW_FIFTY_CHARACTERS",S.borrowed,50),j("RAISE_HAND_1",v.storyQuestionCount,1),j("RAISE_HAND_10",v.storyQuestionCount,10),j("RAISE_HAND_50",v.storyQuestionCount,50)],Ht=G.slice(0,4),Ue=G.filter(t=>t.unlocked).length,We=Math.round(Ue/Math.max(G.length,1)*100);return e.jsxs("div",{className:"fixed inset-0 z-50 box-border overflow-hidden bg-[#fff6fb] font-sans text-slate-900",children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[#fff6fb]"}),e.jsx("img",{src:we,alt:"",className:"pointer-events-none absolute inset-0 h-full w-full object-cover opacity-[0.12]"}),e.jsxs("div",{className:"relative z-10 flex h-full min-h-0",children:[e.jsxs("aside",{className:"hidden w-[260px] shrink-0 border-r border-[#f1dfe9] bg-white px-4 py-6 shadow-[8px_0_30px_rgba(236,72,153,0.06)] lg:flex lg:flex-col",children:[e.jsx("button",{type:"button",onClick:p,className:"mb-9 flex justify-start",children:e.jsx(lt,{src:gt,widths:[256,352],sizes:"176px",alt:"Paper2Galgame",className:"h-auto w-44"})}),e.jsxs("nav",{className:"space-y-3",children:[e.jsx(ut,{icon:e.jsx(Qt,{size:20}),label:s.title,active:z==="overview",onClick:()=>O("overview")}),qt,e.jsx(ut,{icon:e.jsx(Vt,{size:20}),label:s.achievements,active:z==="achievements",onClick:()=>O("achievements")})]}),e.jsx("div",{className:"mt-auto space-y-5",children:e.jsxs("button",{type:"button",onClick:u,className:"flex w-full items-center gap-3 rounded-2xl border border-[#f4dfe9] bg-[#fff8fb] px-4 py-3 text-left shadow-sm transition hover:-translate-y-0.5",children:[e.jsx(kt,{icon:e.jsx(st,{size:21}),tone:"pink"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm font-black text-slate-800",children:s.manageMember}),e.jsx("span",{className:"block truncate text-xs font-bold text-slate-400",children:I?Pt:Le})]}),e.jsx(he,{size:16,className:"text-pink-400"})]})})]}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-[68px] shrink-0 items-center justify-between border-b border-[#f1dfe9] bg-white px-4 shadow-sm md:px-8",children:[e.jsxs("button",{type:"button",onClick:z==="achievements"?()=>O("overview"):p,className:"inline-flex h-11 shrink-0 items-center justify-center gap-2 rounded-full border border-pink-100 bg-white px-4 text-sm font-black text-pink-500 transition hover:bg-pink-50",children:[e.jsx(Re,{size:16}),e.jsx("span",{children:z==="achievements"?s.backToProfile:s.back})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{className:"relative flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl border border-pink-100 bg-white text-slate-500 transition hover:text-pink-500",type:"button",onClick:Et,title:s.mailbox,children:[e.jsx(nt,{size:22}),B>0&&e.jsx("span",{className:"absolute -right-2 -top-2 flex h-5 min-w-5 items-center justify-center rounded-full bg-pink-400 px-1 text-[10px] font-black text-white",children:B>99?"99+":B})]}),e.jsxs("button",{type:"button",onClick:a,"aria-label":s.logout,title:s.logout,className:"inline-flex h-11 shrink-0 items-center justify-center gap-2 rounded-2xl border border-red-100 bg-white px-3 text-xs font-black text-red-500 transition hover:border-red-200 hover:bg-red-50 active:scale-95",children:[e.jsx(Jt,{size:18}),e.jsx("span",{children:s.logout})]})]})]}),e.jsx("main",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-6 md:px-8",children:z==="achievements"?e.jsx("div",{className:"mx-auto w-full max-w-[1180px]",children:e.jsxs(U,{className:"p-5 md:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-5 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(Z,{title:s.achievements}),e.jsx("div",{className:"mt-3 text-sm font-bold text-slate-500",children:s.achievementProgress})]}),e.jsxs("button",{type:"button",onClick:()=>O("overview"),className:"inline-flex h-10 shrink-0 items-center justify-center gap-2 rounded-full border border-pink-100 bg-white px-4 text-sm font-black text-pink-500 transition hover:bg-pink-50",children:[e.jsx(Re,{size:16}),s.backToProfile]})]}),e.jsxs("div",{className:"mt-6 grid gap-3 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-2xl border border-[#f4dfe9] bg-[#fffafd] px-4 py-4",children:[e.jsx("div",{className:"text-xs font-black text-slate-400",children:s.unlockedCount}),e.jsx("div",{className:"mt-2 text-3xl font-black text-slate-950",children:Ue})]}),e.jsxs("div",{className:"rounded-2xl border border-[#f4dfe9] bg-white px-4 py-4",children:[e.jsx("div",{className:"text-xs font-black text-slate-400",children:s.totalAchievements}),e.jsx("div",{className:"mt-2 text-3xl font-black text-slate-950",children:G.length})]}),e.jsxs("div",{className:"rounded-2xl border border-[#f4dfe9] bg-[#fffafd] px-4 py-4",children:[e.jsx("div",{className:"text-xs font-black text-slate-400",children:s.achievementProgress}),e.jsxs("div",{className:"mt-2 text-3xl font-black text-pink-500",children:[We,"%"]})]})]}),e.jsx("div",{className:"mt-5 h-3 overflow-hidden rounded-full bg-pink-100",children:e.jsx("div",{className:"h-full rounded-full bg-pink-400",style:{width:`${We}%`}})}),e.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:G.map(t=>e.jsx(vr,{...t,unlockedLabel:de.unlocked,lockedLabel:de.locked},t.id))})]})}):e.jsxs("div",{className:"mx-auto grid w-full max-w-[1180px] gap-4 xl:grid-cols-[minmax(0,1fr)_360px]",children:[e.jsxs("div",{className:"min-w-0 space-y-4",children:[e.jsxs(U,{className:"overflow-hidden",children:[e.jsxs("div",{className:"relative min-h-[160px] p-5 md:min-
149h-[230px] md:p-8",children:[e.jsx("img",{src:we,alt:"",className:"absolute inset-0 h-full w-full object-cover opacity-55"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white via-white to-[#fff6fb]"}),e.jsxs("div",{className:"relative flex items-center gap-4 min-[600px]:gap-5",children:[e.jsxs("div",{className:"relative h-20 w-20 shrink-0 min-[600px]:h-32 min-[600px]:w-32",children:[I&&e.jsx("div",{className:"absolute -inset-2 rounded-full bg-gradient-to-br from-amber-300 via-pink-300 to-violet-400 p-[3px] shadow-[0_12px_32px_rgba(236,72,153,0.24)]",children:e.jsx("div",{className:"h-full w-full rounded-full bg-white"})}),e.jsx("img",{src:ur,alt:"",className:"relative h-20 w-20 rounded-full border-4 border-white object-cover shadow-xl min-[600px]:h-32 min-[600px]:w-32"}),I&&e.jsx("span",{className:"absolute -right-1 -top-2 flex h-9 w-9 items-center justify-center rounded-full border-2 border-white bg-amber-400 text-white shadow-lg",title:w.vipDecoration,children:e.jsx(st,{size:19,fill:"currentColor"})})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("h1",{className:`break-words text-xl font-black leading-tight min-[600px]:text-3xl md:text-4xl ${St}`,children:ge}),e.jsx("span",{className:"rounded-full bg-pink-100 px-3 py-1 text-xs font-black text-pink-500",children:I?Le:s.free})]}),e.jsx("div",{className:"mt-3 break-all text-sm font-bold text-slate-500",children:(l==null?void 0:l.email)||r.email}),e.jsx("div",{className:"mt-5 flex flex-wrap gap-3",children:e.jsxs("button",{type:"button",onClick:Ot,className:"inline-flex h-11 items-center gap-2 rounded-full bg-pink-400 px-5 text-sm font-black text-white shadow-lg shadow-pink-200 transition hover:bg-pink-500",children:[e.jsx(Xt,{size:16}),s.editProfile]})})]})]})]}),e.jsxs("div",{className:"grid gap-5 border-t border-pink-100 bg-white px-5 py-5 sm:grid-cols-2 lg:grid-cols-5 md:px-8",children:[e.jsx(ee,{icon:e.jsx(Zt,{size:22}),label:s.totalRuns,value:`${le}`,suffix:n==="zh"?"篇":"",tone:"blue"}),e.jsx(ee,{icon:e.jsx(er,{size:22}),label:s.totalTime,value:`${ue||0}`,suffix:n==="zh"?"分钟":"min",tone:"amber"}),e.jsx(ee,{icon:e.jsx(Ae,{size:22}),label:s.todayQuota,value:At,tone:"pink"}),e.jsx(ee,{icon:e.jsx(yt,{size:22}),label:s.permanentQuota,value:`${(x==null?void 0:x.permanentUseBalance)??0}`,tone:"amber"}),e.jsx(ee,{icon:e.jsx(tr,{size:22}),label:s.voiceQuota,value:`${(x==null?void 0:x.permanentVoiceBalance)??0}`,tone:"purple"})]})]}),e.jsxs(U,{className:"p-5 md:p-6",children:[e.jsx(Z,{title:w.checkinTitle,action:e.jsx("span",{className:"rounded-full border border-pink-100 bg-pink-50 px-3 py-1.5 text-xs font-black text-pink-500",children:(o==null?void 0:o.month)||w.currentMonth})}),e.jsxs("div",{className:"mt-5 grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:`rounded-2xl border p-4 ${o!=null&&o.todayProgress.qualified?"border-emerald-100 bg-emerald-50":"border-pink-100 bg-[#fffafd]"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl ${o!=null&&o.todayProgress.qualified?"bg-emerald-500 text-white":"bg-pink-100 text-pink-500"}`,children:o!=null&&o.todayProgress.qualified?e.jsx(rr,{size:22}):e.jsx(Ae,{size:22})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-black text-slate-800",children:o!=null&&o.todayProgress.qualified?w.todayDone:w.todayPending}),e.jsxs("div",{className:"mt-1 text-xs font-bold text-slate-400",children:[He((o==null?void 0:o.todayProgress.durationSeconds)||0)," / 15 min"]})]})]}),e.jsx("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-white",children:e.jsx("div",{className:`h-full rounded-full ${o!=null&&o.todayProgress.qualified?"bg-emerald-400":"bg-pink-400"}`,style:{width:`${Ct}%`}})}),e.jsx("div",{className:"mt-3 text-[11px] font-bold leading-relaxed text-slate-400",children:w.validStudyHint})]}
149),e.jsxs("div",{className:"flex items-center gap-4 rounded-2xl border border-amber-100 bg-amber-50 p-4",children:[e.jsx("span",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-amber-400 text-white shadow-sm",children:e.jsx(ar,{size:25,fill:"currentColor"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-black text-amber-700",children:w.streak}),e.jsxs("div",{className:"mt-1 flex items-baseline gap-1 text-slate-950",children:[e.jsx("span",{className:"text-3xl font-black",children:(o==null?void 0:o.currentStreak)||0}),e.jsx("span",{className:"text-xs font-black text-slate-500",children:w.days})]})]})]})]}),e.jsx("div",{className:"mt-4 rounded-2xl border border-[#eee4ea] bg-white p-4",children:e.jsxs("div",{className:"grid grid-cols-7 gap-1.5",children:[w.weekdays.map(t=>e.jsx("div",{className:"pb-1 text-center text-[10px] font-black text-slate-400",children:t},t)),Rt.map((t,i)=>{var d,y,A;return t?e.jsxs("div",{title:t.record?`${t.date} · ${He(t.record.durationSeconds)}`:t.date,className:`relative flex aspect-square min-h-8 items-center justify-center rounded-xl text-xs font-black ${(d=t.record)!=null&&d.qualified?"bg-pink-400 text-white shadow-sm":(y=t.record)!=null&&y.durationSeconds?"border border-pink-200 bg-pink-50 text-pink-500":t.date===(o==null?void 0:o.today)?"border border-pink-300 bg-white text-pink-500":"bg-slate-50 text-slate-400"}`,children:[t.day,((A=t.record)==null?void 0:A.qualified)&&e.jsx(pe,{size:8,className:"absolute right-1 top-1"})]},t.date):e.jsx("div",{className:"aspect-square min-h-8"},`empty-${i}`)})]})}),yr]})]}),e.jsxs("div",{className:"min-w-0 space-y-4",children:[e.jsxs(U,{className:"p-5 md:p-6",children:[e.jsx(Z,{title:s.accountSecurity}),e.jsxs("div",{className:"mt-5 divide-y divide-slate-100 rounded-2xl border border-[#eee4ea] bg-white",children:[e.jsxs("div",{className:"flex items-center gap-3 p-4",children:[e.jsx(sr,{size:22,className:"shrink-0 text-slate-500"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-black text-slate-700",children:s.email}),e.jsx("div",{className:"truncate text-xs font-bold text-slate-400",children:(l==null?void 0:l.email)||r.email})]}),e.jsx("span",{className:"rounded-full bg-emerald-50 px-3 py-1 text-xs font-black text-emerald-500",children:l!=null&&l.isVerified?s.verified:s.notSet})]}),e.jsxs("div",{className:"flex items-center gap-3 p-4",children:[e.jsx(nr,{size:22,className:"shrink-0 text-slate-500"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm font-black text-slate-700",children:s.discord}),e.jsx("div",{className:"truncate text-xs font-bold text-slate-400",children:(l==null?void 0:l.discordId)||s.notSet})]}),l!=null&&l.discordId&&(x==null?void 0:x.discordRewardClaimed)===!1?e.jsx("button",{type:"button",onClick:Ke,className:"min-h-11 rounded-full bg-[#5865F2] px-3 py-2 text-xs font-black text-white transition-colors hover:bg-[#4752C4]",children:s.discordCheckReward}):l!=null&&l.discordId?e.jsx("span",{className:"rounded-full bg-emerald-50 px-3 py-1 text-xs font-black text-emerald-500",children:s.discordBound}):e.jsx("button",{type:"button",onClick:Ke,className:"min-h-11 rounded-full bg-pink-50 px-3 py-2 text-xs font-black text-pink-500",children:s.bindDiscord})]}),e.jsxs("button",{type:"button",onClick:()=>{Pe(""),be(null),ie(!0)},className:"flex min-h-14 w-full items-center gap-3 p-4 text-left transition hover:bg-rose-50",children:[e.jsx(it,{size:22,className:"shrink-0 text-rose-500"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm font-black text-rose-600",children:s.deleteAccount}),e.jsx("span",{className:"mt-1 block text-xs font-bold leading-5 text-slate-400",children:s.deleteAccountDesc})]}),e.jsx(he,{size:16,className:"shrink-0 text-rose-300"})]})]})]}),e.jsxs(U,{className:"p-5 md:p-6",children:[e.jsx(Z,{title:s.achievements,action:e.jsxs("button",{className:"inline-flex min-h-11 items-center gap-1 rounded-full border border-slate-100 bg-white px-3 text-xs font-black text-slate-500",type:"button",onClick:()=>O("achievements"),children:[s.all,e.jsx(he,{size:13})]})}),e.jsx("div",{className:"mt-5 grid grid-cols-4 gap-3",children:Ht.map(t=>e.jsx(jr,{...t},t.id))})]})]})]})})]})]}),se&&e.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-slate-950/35 px-4 py-6",onClick:()=>M(!1),children:e.jsxs("div",{className:"flex max-h-[82vh] w-full max-w-[920px] min-h-0 flex-col overflow-hidden rounded-[22px] border border-[#f3dfea] bg-white shadow-[0_24px_70px_rgba(15,23,42,0.18)]",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-pink-100 px-5 py-4",children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-pink-50 text-pink-500",children:e.jsx(nt,{size:22})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-base font-black text-slate-950",children:s.mailbox}),e.jsx("div",{className:"mt-0.5 text-xs font-bold text-slate-400",children:B>0?`${B} ${s.unreadMail}`:s.systemMail})]}),e.jsx("button",{type:"button",onClick:Tt,disabled:m.length===0||B===0,className:"hidden h-9 shrink-0 rounded-full border border-pink-100 bg-white px-4 text-xs font-black text-pink-500 transition hover:bg-pink-50 disabled:cursor-not-allowed disabled:opacity-45 sm:inline-flex sm:items-center",children:s.markAllRead}),e.jsx("button",{type:"button",onClick:()=>M(!1),className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl border border-slate-100 bg-white text-slate-500 transition hover:text-pink-500",title:s.close,children:e.jsx(Ce,{size:19})})]}),_e&&e.jsx("div",{className:"mx-5 mt-4 rounded-2xl border border-amber-100 bg-amber-50 px-4 py-3 text-sm font-bold text-amber-700",children:_e}),e.jsxs("div",{className:"grid min-h-0 flex-1 md:grid-cols-[300px_minmax(0,1fr)]",children:[e.jsx("div",{className:"min-h-0 overflow-y-auto border-b border-pink-100 p-4 md:border-b-0 md:border-r",children:wt?e.jsx("div",{className:"flex h-36 items-center justify-center text-pink-500",children:e.jsx(ot,{size:26,className:"animate-spin"})}):m.length===0?e.jsx("div",{className:"rounded-2xl border border-dashed border-slate-200 px-4 py-10 text-center text-sm font-bold text-slate-400",children:s.emptyMailbox}):e.jsx("div",{className:"space-y-2",children:m.map(t=>{const i=(R==null?void 0:R.id)===t.id,d=q.has(t.id);return e.jsxs("button",{type:"button",onClick:()=>
149_t(t.id),className:`flex w-full min-w-0 items-start gap-3 rounded-2xl border px-4 py-3 text-left transition ${i?"border-pink-100 bg-pink-50":"border-transparent bg-white hover:border-pink-100 hover:bg-pink-50/60"}`,children:[e.jsx("span",{className:`mt-1 h-2.5 w-2.5 shrink-0 rounded-full ${d?"bg-slate-200":"bg-pink-400"}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:`block truncate text-sm ${d?"font-bold text-slate-600":"font-black text-slate-950"}`,children:xt(t,n)}),e.jsx("span",{className:"mt-1 block truncate text-xs font-bold text-slate-400",children:t.date})]})]},t.id)})})}),e.jsx("div",{className:"min-h-0 overflow-y-auto p-5 md:p-6",children:R?e.jsxs("article",{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"rounded-full bg-pink-50 px-3 py-1 text-xs font-black text-pink-500",children:s.systemMail}),e.jsx("span",{className:"rounded-full bg-slate-100 px-3 py-1 text-xs font-black text-slate-500",children:q.has(R.id)?s.readMail:s.unreadMail}),e.jsx("span",{className:"text-xs font-black text-slate-400",children:R.date})]}),e.jsx("h2",{className:"mt-4 break-words text-2xl font-black leading-tight text-slate-950",children:xt(R,n)}),e.jsx("div",{className:"mt-5 rounded-2xl border border-[#f1e5ec] bg-[#fffafd] p-4 md:p-5",children:br(fr(R,n))})]}):e.jsx("div",{className:"flex h-56 items-center justify-center rounded-2xl border border-dashed border-slate-200 text-sm font-bold text-slate-400",children:s.emptyMailbox})})]})]})}),xe&&e.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-slate-950/35 px-4",children:e.jsxs("form",{className:"w-full max-w-[420px] rounded-[22px] border border-[#f3dfea] bg-white p-5 shadow-[0_24px_70px_rgba(15,23,42,0.18)]",onSubmit:t=>{t.preventDefault(),Mt()},children:[e.jsx(Z,{title:s.editProfile}),e.jsxs("label",{className:"mt-5 block",children:[e.jsx("span",{className:"mb-2 block text-xs font-black text-slate-500",children:s.displayName}),e.jsx("input",{value:ze,maxLength:50,onChange:t=>Oe(t.target.value),className:"h-12 w-full rounded-2xl border border-pink-100 bg-[#fffafd] px-4 text-sm font-black text-slate-900 outline-none transition focus:border-pink-300 focus:bg-white focus:ring-4 focus:ring-pink-100",autoFocus:!0})]}),De&&e.jsx("div",{className:"mt-3 rounded-2xl border border-rose-100 bg-rose-50 px-4 py-3 text-sm font-bold text-rose-500",children:De}),e.jsxs("div",{className:"mt-5 flex justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:()=>W(!1),className:"h-10 rounded-full border border-pink-100 bg-white px-4 text-sm font-black text-pink-500 transition hover:bg-pink-50",children:s.cancel}),e.jsx("button",{type:"submit",disabled:fe,className:"h-10 rounded-full bg-pink-400 px-5 text-sm font-black text-white shadow-lg shadow-pink-100 transition hover:bg-pink-500 disabled:opacity-60",children:fe?s.saving:s.save})]})]})}),Nt&&e.jsx("div",{className:"absolute inset-0 z-30 flex items-center justify-center overflow-y-auto bg-slate-950/45 px-4 py-2",onClick:()=>!$&&ie(!1),children:e.jsxs("div",{className:"custom-scrollbar my-auto max-h-[calc(var(--app-vh,100dvh)-1rem)] w-full max-w-[460px] overflow-y-auto overscroll-y-contain rounded-[22px] border border-rose-100 bg-white p-5 shadow-[0_24px_70px_rgba(15,23,42,0.22)] md:p-6",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-rose-50 text-rose-500",children:e.jsx(ir,{size:22})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-xl font-black text-slate-950",children:s.deleteAccountTitle}),e.jsx("p",{className:"mt-2 text-sm font-bold leading-6 text-slate-500",children:s.deleteAccountDesc})]}),e.jsx("button",{type:"button",disabled:$,onClick:()=>ie(!1),className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border border-slate-100 text-slate-400",children:e.jsx(Ce,{size:18})})]}),e.jsxs("div",{className:"mt-5 rounded-xl border border-amber-100 bg-amber-50 p-4 text-sm font-bold leading-6 text-amber-800",children:[s.deleteSubscriptionNotice,e.jsxs("a",{href:"https://apps.apple.com/account/subscriptions",target:"_blank",rel:"noreferrer",className:"mt-3 flex min-h-11 items-center gap-2 text-amber-900 underline underline-offset-4",children:[s.manageAppleSubscription,e.jsx(or,{size:15})]})]}),e.jsxs("label",{className:"mt-5 block text-sm font-black text-slate-600",children:[s.deleteConfirmLabel,e.jsx("input",{type:"email",value:oe,onChange:t=>Pe(t.target.value),placeholder:r.email,autoComplete:"off",className:"mt-2 min-h-12 w-full rounded-xl border-2 border-slate-100 bg-slate-50 px-4 text-base font-bold outline-none focus:border-rose-300 focus:bg-white"})]}),Ie&&e.jsx("div",{className:"mt-4 rounded-xl bg-rose-50 p-3 text-sm font-bold text-rose-600",children:Ie}),e.jsxs("div",{className:"mt-5 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end",children:[e.jsx("button",{type:"button",disabled:$,onClick:()=>ie(!1),className:"min-h-11 rounded-xl border border-slate-200 bg-white px-5 text-sm font-black text-slate-600",children:s.cancel}),e.jsxs("button",{type:"button",onClick:Dt,disabled:$||oe.trim().toLowerCase()!==r.email.toLowerCase(),className:"inline-flex min-h-11 items-center justify-center gap-2 rounded-xl bg-rose-600 px-5 text-sm font-black text-white transition hover:bg-rose-700 disabled:cursor-not-allowed disabled:bg-slate-200 disabled:text-slate-400",children:[$?e.jsx(ot,{size:17,className:"animate-spin"}):e.jsx(it,{size:17}),$?s.deleting:s.deleteConfirmAction]})]})]})}),re&&qe&&e.jsx(hr,{language:n,userName:ge,data:qe,onClose:()=>me(!1)})]})};export{Er as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.