:root{--navy:#1B1F45;--or:#FF7A3D;--sun:#FFC93C;--sea:#10A9B8;--bg:#FFF7EA;--ink:#1B1F45;--muted:#6B6F8E;--card:#fff;--ok:#2E9E5B;--bad:#E5484D;
  --safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:'Varela Round','Rubik',system-ui,sans-serif;font-size:16px}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
#app{display:flex;flex-direction:column;height:100dvh;max-width:640px;margin:0 auto;background:var(--bg);position:relative}
.top{display:flex;align-items:center;gap:10px;padding:10px 14px;padding-top:calc(10px + env(safe-area-inset-top,0px));background:var(--navy);color:#fff}
.av img{border-radius:50%;background:var(--sun);display:block}
.who{flex:1;min-width:0}.name{font-family:'Secular One','Rubik',sans-serif;font-size:19px}.sub{font-size:12.5px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wallet{display:flex;align-items:center;gap:4px;background:rgba(255,255,255,.14);border-radius:99px;padding:5px 11px;font-family:'Rubik';font-weight:700}
.wallet.pop{animation:pop .6s}
@keyframes pop{40%{transform:scale(1.25);background:var(--sun);color:var(--navy)}}
.icon-btn{width:38px;height:38px;border-radius:50%;font-size:22px;color:#fff}
.view{flex:1;display:flex;flex-direction:column;min-height:0}
.view[hidden]{display:none}
.view.scroll{overflow-y:auto;padding:14px 14px 24px}
#feed{flex:1;overflow-y:auto;padding:14px 12px 6px;scroll-behavior:smooth}
.row{display:flex;gap:8px;margin:8px 0;align-items:flex-end}
.row.me{justify-content:flex-start;flex-direction:row-reverse}
.row .mini img{border-radius:50%;background:var(--sun);width:30px;height:30px;display:block}
.bubble{max-width:82%;padding:11px 14px;border-radius:18px;line-height:1.55;font-size:15.5px;white-space:normal;word-wrap:break-word}
.bot .bubble{background:#fff;border-bottom-right-radius:6px;box-shadow:0 2px 8px rgba(27,31,69,.07)}
.me .bubble{background:var(--sea);color:#fff;border-bottom-left-radius:6px}
.bubble.err{background:#FFF0EE;color:#8A2A1B}
.bubble b{color:var(--or)}.me .bubble b{color:#fff}
.bubble ul{margin:6px 0;padding-inline-start:18px}.bubble li{margin:3px 0}
.term{border-bottom:2px dotted var(--sea);cursor:help;font-weight:inherit}
.choices{display:flex;flex-wrap:wrap;gap:8px;margin:6px 38px 4px 0}
.choices button,.quick button{background:#fff;border:1.5px solid var(--or);color:var(--or);border-radius:99px;padding:8px 14px;font-size:14.5px;font-weight:600;box-shadow:0 2px 0 rgba(255,122,61,.25)}
.choices button:active,.quick button:active{transform:translateY(1px)}
.quick{display:flex;gap:8px;overflow-x:auto;padding:4px 12px;scrollbar-width:none}.quick:empty{display:none}
.quick button{white-space:nowrap;border-color:#E3DCF5;color:var(--navy)}
.typing .bubble{color:var(--muted)}.typing i{display:inline-block;animation:bl 1s infinite;font-style:normal}.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes bl{50%{opacity:.2}}
.composer{display:flex;gap:8px;align-items:flex-end;padding:8px 12px 4px}
.composer textarea{flex:1;resize:none;border:1.5px solid #E6DFD0;border-radius:22px;padding:11px 15px;font:inherit;font-size:16px;background:#fff;max-height:120px;outline:none}
.composer textarea:focus{border-color:var(--sea)}
.send{width:46px;height:46px;border-radius:50%;background:var(--or);color:#fff;display:grid;place-items:center;flex:none}
.send:disabled{opacity:.5}
.foot{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);padding:2px 16px 6px}
.foot #freeLeft{color:var(--or);font-weight:700;cursor:pointer}
.tabs{display:flex;background:#fff;border-top:1px solid #EFE7D6;padding-bottom:var(--safe-b)}
.tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 0 8px;font-size:12.5px;color:var(--muted)}
.tabs button span{font-size:20px;filter:grayscale(.6)}
.tabs button.on{color:var(--navy);font-weight:700}.tabs button.on span{filter:none}
/* mystery cards */
.intro{background:linear-gradient(160deg,var(--navy),#2A2F66 70%,var(--sea));color:#fff;border-radius:22px;padding:16px;margin:4px 0 12px;display:flex;gap:12px;align-items:center}
.intro img{width:78px;height:78px;flex:none}
.intro h2{margin:0 0 4px;font-family:'Secular One','Rubik';font-size:20px}.intro p{margin:0;font-size:14.5px;line-height:1.5;opacity:.95}
.mlist{display:grid;gap:10px;margin:0 0 10px}
.mc{display:flex;gap:12px;align-items:center;background:#fff;border-radius:18px;padding:12px;text-align:right;box-shadow:0 3px 0 #F1E6CF;border:1.5px solid #F4ECDA;width:100%}
.mc img{width:58px;height:58px;border-radius:14px;flex:none;background:var(--bg);object-fit:contain}
.mc h3{margin:0 0 3px;font-size:16px;font-family:'Rubik';font-weight:700}.mc p{margin:0;font-size:13px;color:var(--muted);line-height:1.4}
.mc .tag{font-size:11.5px;font-weight:700;border-radius:99px;padding:2px 8px;display:inline-block;margin-top:5px}
.tag.free{background:#E3F7EA;color:var(--ok)}.tag.lock{background:#FFF1D6;color:#A35A00}.tag.done{background:#E6F6F8;color:#0C7C88}
.mc.locked{opacity:.85}
.section-h{font-family:'Rubik';font-weight:700;font-size:14px;color:var(--muted);margin:14px 4px 8px}
/* sheets */
.sheet{position:fixed;inset:0;background:rgba(17,20,48,.55);display:flex;align-items:flex-end;justify-content:center;z-index:50}
.sheet[hidden]{display:none}
.sheet .card{background:#fff;width:100%;max-width:640px;max-height:92dvh;overflow-y:auto;border-radius:24px 24px 0 0;padding:20px 18px calc(18px + var(--safe-b));animation:up .25s ease-out}
@keyframes up{from{transform:translateY(40px);opacity:0}}
.sheet h3{margin:0 0 12px}
#menu .card button{display:block;width:100%;text-align:right;padding:13px 6px;border-bottom:1px solid #F2ECDF;font-size:16px}
#menu .card button.danger{color:var(--bad)}
.ghost{color:var(--muted)!important;text-align:center!important;border:0!important;margin-top:6px}
.legal{text-align:center;font-size:13px;color:var(--muted)}.legal a{color:var(--sea)}
.mcard .mhead{display:flex;gap:12px;align-items:center}.mcard .mhead img{width:76px;height:76px;object-fit:contain}
.mcard h2{margin:0;font-family:'Secular One','Rubik';font-size:22px}.mcard .co{font-size:13px;color:var(--muted)}
.mcard .story{font-size:16px;line-height:1.6;background:var(--bg);border-radius:16px;padding:12px 14px;margin:12px 0}
.clues{display:grid;gap:8px}
.clue{display:flex;gap:10px;align-items:flex-start;text-align:right;background:#F3F9FA;border:1.5px dashed #9ED9DF;border-radius:14px;padding:10px 12px;font-size:15px;line-height:1.5}
.clue.hidden{background:#fff;color:var(--sea);font-weight:700;justify-content:center}
.q{font-weight:700;margin:14px 0 8px;font-size:16.5px}
.opts{display:grid;gap:8px}
.opt{border:1.5px solid #E6DFD0;border-radius:14px;padding:12px;text-align:right;font-size:15px;background:#fff}
.opt.ok{border-color:var(--ok);background:#E3F7EA}.opt.bad{border-color:var(--bad);background:#FFF0EE;animation:shake .35s}
@keyframes shake{25%{transform:translateX(6px)}75%{transform:translateX(-6px)}}
.primary{display:block;width:100%;background:var(--or);color:#fff!important;border-radius:16px;padding:14px;font-weight:700;font-size:16.5px;text-align:center!important;margin-top:12px;box-shadow:0 3px 0 #D85E25;text-decoration:none}
.primary:disabled,.primary[aria-disabled=true]{opacity:.5;box-shadow:none}
.secondary{display:block;width:100%;border:1.5px solid var(--sea);color:var(--sea);border-radius:16px;padding:12px;font-weight:700;margin-top:10px;text-align:center}
.win{background:#E3F7EA;border-radius:16px;padding:12px 14px;margin-top:12px;line-height:1.55}
.win b{color:var(--ok)}
/* paywall */
.pay-hero{text-align:center}.pay-hero img{width:110px;height:110px}
.pay-hero h2{font-family:'Secular One','Rubik';margin:6px 0;font-size:23px}
.perks{list-style:none;padding:0;margin:12px 0;display:grid;gap:8px}.perks li{background:var(--bg);border-radius:12px;padding:10px 12px;font-size:15px}
.parent{border-top:2px dashed #EFE7D6;margin-top:16px;padding-top:14px}
.parent h3{margin:0 0 6px}.parent .price{font-family:'Rubik';font-weight:800;font-size:26px;color:var(--navy)}
.parent .fine{font-size:12.5px;color:var(--muted);line-height:1.5}
.chk{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.5;margin:10px 0}.chk input{width:22px;height:22px;flex:none;margin-top:2px;accent-color:var(--or)}
.codebox{display:flex;gap:8px;margin-top:8px}.codebox input{flex:1;border:1.5px solid #E6DFD0;border-radius:12px;padding:11px;font:inherit;direction:ltr;text-transform:uppercase}
.codebox button{background:var(--navy);color:#fff;border-radius:12px;padding:0 16px;font-weight:700}
.err{color:var(--bad);font-size:14px;min-height:18px;margin-top:6px}
/* glossary */
.gloss{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(150px + var(--safe-b));width:min(92vw,420px);background:var(--navy);color:#fff;border-radius:18px;padding:14px 16px;z-index:60;box-shadow:0 12px 30px rgba(0,0,0,.25);animation:up .2s}
.gloss[hidden]{display:none}
.gloss h4{margin:0 0 4px;font-size:17px;color:var(--sun)}.gloss p{margin:0 0 6px;line-height:1.5;font-size:14.5px}.gloss .ex{background:rgba(255,255,255,.1);border-radius:10px;padding:7px 10px;font-size:14px}
.gloss button{color:var(--sun);font-weight:700;margin-top:8px}
/* me view */
.panel{background:#fff;border-radius:18px;padding:14px;margin-bottom:12px;box-shadow:0 2px 0 #F1E6CF}
.panel h3{margin:0 0 8px;font-size:16px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}.stats b{display:block;font-family:'Rubik';font-size:22px}.stats span{font-size:12px;color:var(--muted)}
.toast{position:fixed;top:calc(70px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);background:var(--navy);color:#fff;padding:10px 16px;border-radius:18px;z-index:80;font-size:14.5px;animation:up .2s;max-width:92vw;width:max-content;text-align:center}
.confetti{position:fixed;inset:0;pointer-events:none;z-index:90;overflow:hidden}
.confetti i{position:absolute;top:-20px;left:var(--x);font-style:normal;font-size:22px;animation:fall var(--d) ease-in var(--dl) forwards}
@keyframes fall{to{transform:translate(var(--dx),105vh) rotate(var(--r))}}
@media (prefers-reduced-motion:reduce){*{animation:none!important}}
/* phase 3: portfolio, ranks, daily, shop */
.pf-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.pf-lbl{font-size:13px;color:var(--muted)}.pf-val{font-family:'Rubik';font-weight:800;font-size:28px}.pf-val small{font-size:13px;font-weight:600;color:var(--muted)}
.pf-ch{font-weight:700;font-size:14px}.up{color:var(--ok)}.down{color:var(--bad)}
.pf-cash{background:var(--bg);border-radius:12px;padding:8px 12px;text-align:center;font-size:12.5px;color:var(--muted)}.pf-cash b{font-family:'Rubik';font-size:17px;color:var(--navy)}
.pf-note{font-size:12px;color:var(--muted);margin:8px 0 0;line-height:1.45}.pf-hint{font-weight:400;font-size:12px;color:var(--muted)}
.news{display:flex;flex-direction:column;gap:4px;width:100%;text-align:right;border:1.5px dashed var(--sun)}.news span{font-size:14.5px;color:var(--muted)}.news.read span{color:var(--navy)}
.brand{display:flex;align-items:center;gap:8px;padding:9px 0;border-bottom:1px solid #F4EEE2}.brand:last-of-type{border-bottom:0}
.be{font-size:24px;width:32px;text-align:center}.bn{flex:1;min-width:0}.bn b{display:block}.bn small{font-size:12px;color:var(--muted)}
.bp{text-align:left;min-width:56px}.bp b{display:block;font-family:'Rubik'}.bp small{font-size:12px;font-weight:700}
.bbuy,.bsell{border-radius:10px;padding:7px 10px;font-size:13.5px;font-weight:700}.bbuy{background:var(--sea);color:#fff}.bsell{border:1.5px solid #E6DFD0}
.tips{display:flex;flex-direction:column;gap:5px;font-size:13.5px;margin-top:12px}.tips span{color:var(--muted)}
.timer{height:8px;background:#F1E9DA;border-radius:9px;overflow:hidden;margin:8px 0}.timer i{display:block;height:100%;width:100%;background:linear-gradient(90deg,var(--or),var(--sun));transition:width .25s linear}
.me-top{display:flex;gap:14px;align-items:center}.avatar{position:relative;width:86px;height:86px;flex:none}.avatar img{width:86px;height:86px;border-radius:50%;background:var(--sun)}
.avatar .eq{position:absolute;bottom:-6px;left:-6px;right:-6px;text-align:center;font-size:20px;letter-spacing:-2px}
.me-top>div:last-child{flex:1}.rank{font-family:'Secular One','Rubik';font-size:21px}.me-top small{font-size:12.5px;color:var(--muted)}
.xpbar{height:10px;background:#F1E9DA;border-radius:9px;overflow:hidden;margin:6px 0}.xpbar i{display:block;height:100%;background:linear-gradient(90deg,var(--sea),var(--ok))}
.daily{display:flex;align-items:center;gap:10px}.daily>div{flex:1}.daily b{display:block}.daily small{font-size:12.5px;color:var(--muted)}
.primary.sm{width:auto;margin:0;padding:10px 14px;font-size:14.5px}
.shop{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.item{background:var(--bg);border-radius:14px;padding:10px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;border:2px solid transparent}
.item span{font-size:28px}.item b{font-size:12.5px}.item small{font-size:12px;color:var(--muted)}.item.on{border-color:var(--ok);background:#E3F7EA}
/* no-emoji UI (Sharon 12.11.2026): CSS coin + efficio SVG icons */
.coin{display:inline-block;width:1em;height:1em;border-radius:50%;background:radial-gradient(circle at 35% 35%,#FFE38A,#FFC93C 55%,#E0A21A);box-shadow:inset 0 0 0 2px #D8961A;vertical-align:-.15em}
.wallet .coin{width:18px;height:18px}
.ic{display:inline-flex;--ia:var(--sun)}.ic svg,.item span svg,.avatar .eq svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tabs button .ic svg{width:22px;height:22px}
.item span{color:var(--navy);--ia:var(--or)}.item span svg{width:30px;height:30px}
.avatar .eq{display:flex;justify-content:center;gap:2px;color:var(--navy);--ia:var(--or)}.avatar .eq svg{width:20px;height:20px;background:#fff;border-radius:50%;padding:2px}
.be{width:32px;height:32px;border-radius:50%;background:var(--navy);color:#fff;font-family:'Rubik';font-weight:700;font-size:15px!important;display:grid;place-items:center}
.confetti i{width:10px;height:14px;border-radius:2px}
