:root{--bg:#fff;--text:#0f1419;--muted:#536471;--line:#eff3f4;--line2:#cfd9de;--blue:#1d9bf0;--pink:#f91880;--green:#00ba7c;--red:#f4212e;--hover:rgba(15,20,25,.1);--soft:#f7f9f9;--glass:rgba(255,255,255,.85);--fs:15px;--shadow:rgba(101,119,134,.2) 0 0 15px,rgba(101,119,134,.15) 0 0 3px 1px;color-scheme:light}
:root[data-theme=dark]{--bg:#000;--text:#e7e9ea;--muted:#71767b;--line:#2f3336;--line2:#333639;--hover:rgba(231,233,234,.1);--soft:#16181c;--glass:rgba(0,0,0,.65);--shadow:rgba(255,255,255,.2) 0 0 15px,rgba(255,255,255,.15) 0 0 3px 1px;color-scheme:dark}
*{box-sizing:border-box}
html,body{overscroll-behavior-y:none}
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden}
body{margin:0;background:var(--bg);color:var(--text);font:15px/20px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input,textarea{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer;padding:0;text-align:inherit}
a{color:inherit;text-decoration:none;cursor:pointer}
svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
[hidden]{display:none!important}
/* no browser focus boxes on tap or click; a soft blue ring only for keyboard users */
*{-webkit-tap-highlight-color:transparent}
:focus{outline:none}
:focus-visible{outline:2px solid rgba(29,155,240,.55);outline-offset:-2px;border-radius:12px}
.navitem:focus-visible,.tab:focus-visible{outline:none}
.navitem:focus-visible>span,.tab:focus-visible span{box-shadow:0 0 0 2px rgba(29,155,240,.55);border-radius:9999px}
kbd{font:600 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace;border:1px solid var(--line2);border-radius:6px;padding:3px 7px;background:var(--soft);white-space:nowrap}
.app{display:flex;justify-content:center;min-height:100vh}

/* left nav */
.nav{width:275px;padding:0 12px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.logo{width:44px;height:44px;display:grid;place-items:center;border-radius:50%;margin:8px 0 6px 2px}
.navitem{display:block;padding:2px 0}
.navitem>span{display:inline-flex;align-items:center;gap:14px;padding:9px 18px 9px 10px;border-radius:9999px;font-size:17px;line-height:22px}
.navitem svg{width:23px;height:23px}
.navitem.on>span{font-weight:700}
.navitem.on svg,.tabbar a.on svg{stroke-width:2.6}
.ic{position:relative;display:flex}
.badge{position:absolute;top:-6px;left:12px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--blue);color:#fff;font-size:11px;font-weight:700;line-height:16px;font-style:normal;text-align:center;border:1px solid var(--bg)}
.postbtn{margin-top:14px;width:80%;height:42px;border-radius:9999px;background:var(--text);color:var(--bg);font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center}
.postbtn svg{display:none}
#me{margin-top:auto}
.me{margin:0 0 12px;display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9999px;width:100%;text-align:left}
.who{min-width:0}
.who b,.head b{display:flex;align-items:center;gap:2px;font-weight:700}
.h{color:var(--muted)}
body.compact .nav{align-items:flex-start}
body.narrow .nav{width:88px;align-items:center}
body.compact .lbl,body.compact .who,body.compact .postbtn span{display:none}
body.compact .navitem>span{padding:10px}
body.compact .postbtn{width:44px;height:44px}
body.compact .postbtn svg{display:block;width:20px;height:20px}
body.compact .me{width:auto}

/* main column */
main{width:600px;max-width:100%;border-left:1px solid var(--line);border-right:1px solid var(--line);min-height:100vh}
#head{position:sticky;top:0;z-index:5;background:var(--glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.tabs{display:flex}
.tab{position:relative;flex:1;height:53px;display:flex;justify-content:center;color:var(--muted);font-weight:500}
.tab span{display:flex;align-items:center;position:relative;height:100%}
.tab.on{color:var(--text);font-weight:700}
.tab.on span::after{content:"";position:absolute;bottom:0;left:0;right:0;height:4px;border-radius:9999px;background:var(--blue)}
.fl{display:inline-flex;color:#ff7a00;vertical-align:-2px}
.fl svg{width:14px;height:14px}
.pagehead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 16px;min-height:53px}
.pagehead h1{font-size:20px;line-height:24px;font-weight:800;margin:0}
.pagehead .sub{color:var(--muted);font-size:13px}
.iconbtn{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:none}
.iconbtn svg{width:20px;height:20px}

/* composer */
.compose{display:flex;gap:8px;padding:16px 16px 8px;border-bottom:1px solid var(--line)}
.cbody{flex:1;min-width:0}
.ta{display:block;width:100%;border:0;outline:0;resize:none;background:none;font-size:20px;line-height:24px;padding:8px 0 12px}
.ta::placeholder{color:var(--muted)}
.tools{display:flex;align-items:center;gap:12px;padding-top:8px;border-top:1px solid var(--line)}
.hint{color:var(--blue);font-size:13px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.send{margin-left:auto;background:var(--text);color:var(--bg);font-weight:700;border-radius:9999px;height:36px;padding:0 16px;flex:none}
.send:disabled{opacity:.5;cursor:default}

/* posts */
.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:14px;flex:none}
.avatar.tiny{width:20px;height:20px;font-size:8px}
.avatar.small{width:32px;height:32px;font-size:12px}
.post{display:flex;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line);scroll-margin:120px 0 80px}
.post.thread{border-bottom:0;padding-bottom:0}
.post.thread>.body{padding-bottom:12px}
.post.threaded{padding-top:4px}
.left{display:flex;flex-direction:column;align-items:center}
.post.thread>.left::after,.post.open>.left::after{content:"";width:2px;flex:1;background:var(--line2);margin-top:4px}
.post.threaded>.left::before{content:"";width:2px;height:4px;margin-top:-4px;background:var(--line2)}
.post.open>.body>.replies{padding-bottom:0}
.body{flex:1;min-width:0}
.head{display:flex;align-items:center;gap:4px;white-space:nowrap;overflow:hidden}
.head .t{color:var(--muted)}
.head .more{margin-left:auto;color:var(--muted);border-radius:50%;padding:4px;margin-right:-6px}
.head .more svg{width:18px;height:18px}
.check{width:18px;height:18px;stroke:none}
.text{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:2px;font-size:var(--fs);line-height:1.34}
.text sup{color:var(--muted);font-size:.7em;margin-right:2px}
body.nonum .text sup{display:none}
body.lines .text .vs{display:block}
body.lines .text .vs+.vs{margin-top:4px}
.ch{color:var(--blue)}
.to{color:var(--muted);margin-top:2px}
.to a{color:var(--blue)}
.label{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;font-weight:700;margin-bottom:2px}
.label svg{width:16px;height:16px}
.actions{display:flex;justify-content:space-between;max-width:425px;margin:4px 0 0 -8px;color:var(--muted);font-size:13px}
.grp{display:flex}
.act{display:flex;align-items:center}
.act i{width:34px;height:34px;display:grid;place-items:center;border-radius:50%}
.act svg{width:19px;height:19px}
.act.mark.on{color:var(--blue)}
.act.rt.on{color:var(--green)}
.act.like.on{color:var(--pink)}
.act.like.on svg,.act.mark.on svg{fill:currentColor}
.sel{box-shadow:inset 0 0 0 2px rgba(29,155,240,.6)}
.replied{display:flex;align-items:center;gap:8px;color:var(--muted);padding:6px 0 0;width:100%;text-align:left}
.replied svg{width:18px;height:18px;margin-left:auto}
.replies{margin-top:6px}
.xref{position:relative;display:flex;gap:8px;padding:10px 8px;margin:0 -8px;border-top:1px solid var(--line);cursor:pointer;scroll-margin:120px 0 80px}
.xref:not(:last-child)::before{content:"";position:absolute;left:23px;top:46px;bottom:-6px;width:2px;background:var(--line2)}
.replied,.xref{border-radius:12px}
.xref{border-top:0;margin-top:2px}
.qcard{display:block;width:100%;border:1px solid var(--line2);border-radius:16px;padding:10px 12px;margin-top:10px;cursor:pointer;text-align:left}
.qcard .head{gap:6px}
.qcard .text{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
body.quiet .act span,body.quiet .replied,body.quiet .act.view{display:none}

/* chapter end */
.chend{display:flex;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);background:var(--soft)}
.chk{width:34px;height:34px;border-radius:50%;border:2px dashed var(--line2);display:grid;place-items:center;color:transparent;font-weight:800;flex:none}
.chend.done .chk{background:var(--green);border:2px solid var(--green);color:#fff}
.chend.pop .chk{animation:pop .6s cubic-bezier(.2,1.6,.4,1)}
.chend small{display:block;color:var(--muted);font-size:13px}
@keyframes pop{0%{transform:scale(.2)}100%{transform:scale(1)}}
.theend{padding:40px 16px;text-align:center;color:var(--muted)}
.loading{padding:32px;text-align:center;color:var(--muted)}
.spin{width:26px;height:26px;border:3px solid rgba(29,155,240,.2);border-top-color:var(--blue);border-radius:50%;animation:s .8s linear infinite;margin:auto}
@keyframes s{to{transform:rotate(360deg)}}

/* right column */
aside{width:350px;margin-left:30px;padding-top:12px;position:sticky;top:0;height:100vh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
body.noright aside{visibility:hidden;pointer-events:none}
.search{display:flex;align-items:center;gap:10px;height:42px;background:var(--line);border-radius:9999px;padding:0 16px;color:var(--muted);border:1px solid transparent;margin-bottom:16px}
.search:focus-within{background:var(--bg);border-color:var(--blue);color:var(--blue)}
.search svg{width:18px;height:18px}
.search span{display:flex}
.search input{border:0;outline:0;background:none;width:100%;color:var(--text)}
.card{border:1px solid var(--line);border-radius:16px;padding:12px 0;margin-bottom:16px;overflow:hidden}
.card h2{font-size:20px;line-height:24px;font-weight:800;margin:0;padding:0 16px 8px}
.item{padding:12px 16px;display:block;width:100%;text-align:left}
.item small{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.goalrow{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.goalrow small{margin-top:2px}
.cardhead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px 0 16px}
.cardhead h2{padding:0!important}
.nowbtn{display:flex;align-items:center;gap:2px;color:var(--blue);font-weight:700;font-size:15px;padding:6px 6px 6px 10px;border-radius:9999px;white-space:nowrap}
.nowbtn svg{width:16px;height:16px;stroke-width:2.4}
.cardsub{display:block;color:var(--muted);font-size:13px;padding:6px 16px 0}
.snip{display:block;color:var(--muted);font-size:14px;line-height:18px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#today .item{padding:10px 16px}
#activity .bar{margin-top:8px;height:4px}
.bar{height:6px;background:var(--line);border-radius:9999px;overflow:hidden;margin-top:10px}
.bar div{height:100%;background:var(--blue);transition:width .4s}
.ring circle{fill:none;stroke-width:3}
.rbg{stroke:var(--line)}
.rfg{stroke:var(--blue);transition:stroke-dashoffset .6s}
.ring.full .rfg{stroke:var(--green)}
.foot{color:var(--muted);font-size:13px;padding:0 16px 16px}

/* books */
.bsearch{padding:12px 16px 4px}
.bsearch .search{margin:0}
.sect{display:flex;align-items:baseline;justify-content:space-between;font-size:17px;line-height:22px;font-weight:800;margin:0;padding:16px 16px 6px}
.sect span{color:var(--muted);font-size:13px;font-weight:600}
.book{border-bottom:1px solid var(--line);scroll-margin-top:60px}
.brow{display:flex;gap:12px;padding:12px 16px;width:100%;text-align:left}
.bmeta{flex:1;min-width:0}
.bmeta small{color:var(--muted);font-size:13px}
.bmeta .bar{margin-top:6px;height:4px}
.chgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px;padding:0 16px 16px 68px}
.chap{height:36px;border:1px solid var(--line2);border-radius:8px;font-weight:600;font-size:14px;text-align:center}
.chap.read{background:var(--blue);border-color:var(--blue);color:#fff}
.chap.cur{outline:2px solid var(--blue);outline-offset:2px}

/* settings */
.row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 16px;width:100%;text-align:left;font-size:14px}
.row b{font-weight:600}
label.row{cursor:pointer}
.row small{display:block;color:var(--muted);font-size:13px;line-height:16px;margin-top:2px}
.row svg{width:20px;height:20px;color:var(--muted)}
.switch{appearance:none;-webkit-appearance:none;width:36px;height:20px;border-radius:10px;background:var(--line2);position:relative;cursor:pointer;flex:none;margin:0;transition:background .2s}
.switch::before{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.switch:checked{background:var(--blue)}
.switch:checked::before{transform:translateX(16px)}
.seg{display:flex;border:1px solid var(--line2);border-radius:9999px;overflow:hidden;flex:none}
.seg button{padding:4px 12px;font-weight:600;font-size:13px}
.seg button.on{background:var(--blue);color:#fff}
.num{width:56px;padding:4px 6px;border:1px solid var(--line2);border-radius:8px;background:var(--bg);text-align:center}
input[type=range]{accent-color:var(--blue);width:140px;flex:none}
.btns{display:flex;flex-wrap:wrap;gap:8px;padding:4px 16px 32px}
.outline{border:1px solid var(--line2);border-radius:9999px;padding:0 14px;height:32px;font-weight:700;font-size:14px;flex:none}
.outline.danger{color:var(--red);border-color:rgba(244,33,46,.4)}
.muted-p{color:var(--muted);padding:0 16px;margin:0 0 10px;font-size:13px}

/* profile */
.banner{height:200px;background:var(--line2)}
.prof{padding:12px 16px 4px}
.prof-top{display:flex;align-items:flex-start;justify-content:space-between;height:72px}
.phone-only{display:none}
.withback{display:flex;align-items:center;gap:20px}
.withback .iconbtn{margin-left:-8px}
.pagehead .iconbtn svg{width:22px;height:22px}
.prof-top .avatar.big{margin-top:-82px}
.avatar.big{width:134px;height:134px;font-size:44px;border:4px solid var(--bg)}
.prof h2{display:flex;align-items:center;gap:4px;font-size:20px;line-height:24px;font-weight:800;margin:4px 0 0}
.prof h2 .check{width:20px;height:20px}
.joined{display:flex;align-items:center;gap:4px;margin-top:12px;color:var(--muted);font-size:15px}
.joined svg{width:18px;height:18px}
.months{display:grid;gap:3px;margin:4px 0;font-size:11px;line-height:14px;color:var(--muted);white-space:nowrap}
.heat{display:grid;grid-template-rows:repeat(7,auto);grid-auto-flow:column;gap:3px}
.heat i{aspect-ratio:1;border-radius:3px;background:var(--line);transition:transform .1s}
.heat i.l1,.scale .l1{background:#a5d8fb}
.heat i.l2,.scale .l2{background:#5fbaf6}
.heat i.l3,.scale .l3{background:var(--blue)}
.heat i.f{visibility:hidden}
.legend{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;color:var(--muted);font-size:12px}
.scale{display:flex;align-items:center;gap:3px}
.scale i{width:10px;height:10px;border-radius:2px;background:var(--line)}
.prof-heat{display:none;margin-top:16px}
body.noright .prof-heat{display:block}
@media (max-width:1100px){.prof-heat{display:block}}
.stats{display:flex;flex-wrap:wrap;gap:4px 20px;margin-top:12px;color:var(--muted);font-size:14px}
.stats b{color:var(--text)}
.small-muted{color:var(--muted);font-size:13px}
.ptabs{border-bottom:1px solid var(--line);margin-top:12px}
#plist{min-height:100vh}
.empty{max-width:360px;margin:32px auto;padding:0 16px}
.empty h2{font-size:31px;line-height:36px;font-weight:800;margin:0 0 8px}
.empty p{color:var(--muted);margin:0}

/* logo + onboarding */
.logo-svg{width:28px;height:28px;stroke:none}
/* fixed-height dialog so the footer buttons stay put between steps; long steps scroll inside */
.dialog:has(.onb){display:flex;flex-direction:column;height:min(640px,90vh);height:min(640px,90dvh)}
.onb{padding:4px 12px 8px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.onb h2{font-size:28px;line-height:32px;font-weight:800;margin:8px 0 10px}
.onb p{color:var(--muted);margin:0 0 12px;font-size:16px;line-height:22px}
.onb-logo{display:grid;place-items:center;width:72px;height:72px;border-radius:18px;background:var(--text);color:var(--bg);margin:8px 0 18px}
.onb-logo .logo-svg{width:40px;height:40px}
.onb-list{list-style:none;padding:0;margin:0;display:grid;gap:16px}
.onb-list li{display:flex;gap:14px;align-items:flex-start}
.onb-list svg{width:24px;height:24px;color:var(--blue);margin-top:2px}
.onb-list b{display:block}
.onb-list span{color:var(--muted);font-size:14px}
.onb-goals{display:grid;gap:8px;margin-top:16px}
.onb-goals button{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border:1px solid var(--line2);border-radius:14px;text-align:left}
.onb-goals b{display:block;font-size:16px}
.onb-goals small{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.onb-goals i{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1.5px solid var(--line2);color:transparent}
.onb-goals i svg{width:14px;height:14px;stroke-width:3}
.onb-goals .on{border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue);background:rgba(29,155,240,.06)}
.onb-goals .on i{background:var(--blue);border-color:var(--blue);color:#fff}
.onb-steps{margin:0 0 14px;padding-left:22px;display:grid;gap:10px;font-size:16px}
.inl{display:inline-flex;vertical-align:-4px;color:var(--blue)}
.inl svg{width:20px;height:20px}
.onb-note{font-size:13px!important;line-height:18px!important;background:var(--soft);border-radius:12px;padding:10px 12px}
.onb .send{margin:4px 0 12px}
.onb-foot{display:flex;align-items:center;gap:8px;padding:12px 4px 4px;border-top:1px solid var(--line)}
.onb-foot .send{margin-left:0}
.dots{display:flex;gap:6px;margin-right:auto}
.dots i{width:7px;height:7px;border-radius:50%;background:var(--line2)}
.dots i.on{background:var(--blue)}

/* badges */
.bsum{padding:16px 16px 4px}
.bsum .bar{margin-top:8px}
.showcase{display:flex;gap:6px;margin-top:12px}
.showcase .medal{border-radius:12px;padding:4px}
.bgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(124px,1fr));gap:6px;padding:0 12px 12px}
.bdg{display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 8px 10px;border-radius:16px;text-align:center;transition:background .15s,transform .15s}
.bdg b{font-size:13px;line-height:16px;margin-top:4px}
.bdg small{color:var(--muted);font-size:12px}
.bdg .bar{width:70%;height:4px;margin-top:4px}
.medal{display:grid;place-items:center;position:relative;isolation:isolate}
.medal-svg{width:auto;height:auto;stroke:none;overflow:visible}
.earned .medal-svg,.medal.earned .medal-svg{filter:drop-shadow(0 4px 8px rgba(0,0,0,.18))}
.locked .medal-svg{filter:grayscale(1);opacity:.32}
.sheen{transform:translateX(0) skewX(-20deg)}
@keyframes sheen{to{transform:translateX(200px) skewX(-20deg)}}
.bmodal{display:flex;flex-direction:column;align-items:center;text-align:center;padding:8px 8px 20px;gap:6px}
.bmodal h2{font-size:24px;line-height:28px;font-weight:800;margin:10px 0 0}
.bmodal p{color:var(--muted);margin:0 0 6px;max-width:340px}
.bmodal .bar{width:220px}
.bmodal .send{margin:14px 0 0}
.kicker{color:var(--blue);font-weight:800;font-size:13px;letter-spacing:.08em;text-transform:uppercase}
.celebrate .medal{animation:medalIn 1.1s cubic-bezier(.2,1.3,.4,1) both}
.celebrate .medal::before{content:"";position:absolute;inset:-48px;z-index:-1;border-radius:50%;background:repeating-conic-gradient(rgba(255,200,0,.28) 0 9deg,transparent 9deg 18deg);-webkit-mask:radial-gradient(circle,#000 25%,transparent 68%);mask:radial-gradient(circle,#000 25%,transparent 68%);animation:spin 14s linear infinite}
.celebrate .sheen{animation:sheen 1.1s 1s ease}
@keyframes medalIn{0%{transform:scale(.2) rotateY(540deg);opacity:0}60%{opacity:1}100%{transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}
.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.confetti i{position:absolute;top:-16px;width:8px;height:13px;border-radius:2px;animation:fall linear both}
@keyframes fall{to{transform:translate3d(var(--dx),110vh,0) rotate(800deg)}}
.tip{position:fixed;z-index:70;transform:translate(-50%,-100%);background:var(--text);color:var(--bg);font-size:12px;line-height:16px;font-weight:600;padding:5px 8px;border-radius:6px;pointer-events:none;white-space:nowrap}
.tip::after{content:"";position:absolute;left:50%;bottom:-4px;margin-left:-4px;border:4px solid transparent;border-bottom:0;border-top-color:var(--text)}
@media (prefers-reduced-motion:reduce){.celebrate .medal,.celebrate .medal::before,.confetti{animation:none;display:none}.celebrate .medal{display:grid}}

/* notifications */
.notif{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.notif.new{background:rgba(29,155,240,.06)}
.nicon{font-size:26px;line-height:32px;width:40px;display:flex;justify-content:center;flex:none}
.notif[data-badge]{cursor:pointer}
.notif small{display:block;color:var(--muted);font-size:13px;margin-top:2px}

/* overlays */
.modal{position:fixed;inset:0;z-index:50;background:rgba(91,112,131,.4);display:flex;justify-content:center;align-items:flex-start;padding:5vh 16px;overflow:auto}
.dialog{background:var(--bg);border-radius:16px;width:600px;max-width:100%;padding:8px 16px 12px}
.dhead{display:flex;align-items:center;gap:16px;margin:0 -8px 4px;font-weight:800;font-size:20px}
.dhead .send{margin-left:auto}
.compose-row{display:flex;gap:8px;padding-top:4px}
.ctxline{margin:0 0 4px 48px}
.field{display:block;border:1px solid var(--line2);border-radius:4px;padding:8px;margin:12px 0}
.field span{display:block;color:var(--muted);font-size:13px}
.field input,.field textarea{display:block;width:100%;border:0;outline:0;background:none;resize:vertical;font-size:17px}
.field:focus-within{border-color:var(--blue)}
.keys{display:grid;grid-template-columns:auto 1fr;gap:10px 16px;padding:8px 0 12px;align-items:center}
.menu{position:absolute;z-index:40;background:var(--bg);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;min-width:180px}
.menu button{display:flex;align-items:center;gap:12px;width:100%;padding:12px 16px;font-weight:700;text-align:left}
.menu svg{width:18px;height:18px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:60;background:var(--blue);color:#fff;padding:12px 16px;border-radius:4px;font-weight:500;box-shadow:var(--shadow);max-width:calc(100% - 32px)}
.toast.show{animation:up .25s ease-out}
@keyframes up{from{transform:translate(-50%,20px);opacity:0}}

/* responsive */
.tabbar,.fab,.navsearch{display:none}
@media (max-width:1100px){aside{display:none}.navsearch{display:block}}
@media (max-width:700px){
  .nav{display:none}
  main{width:100%;border:0}
  .tabbar{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:20;background:var(--glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--line);justify-content:space-around;padding:2px 0 calc(2px + env(safe-area-inset-bottom))}
  #tabbar a{flex:1;display:flex;justify-content:center;padding:10px 0}
  #tabbar .navitem>span{padding:0;gap:0}
  .fab{display:grid;place-items:center;position:fixed;right:16px;bottom:calc(72px + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:50%;background:var(--blue);color:#fff;box-shadow:var(--shadow);z-index:20}
  .fab svg{width:24px;height:24px}
  #feed{padding-bottom:80px}
  .toast{bottom:calc(84px + env(safe-area-inset-bottom))}
  .modal{padding:0}
  .dialog{border-radius:0;min-height:100%}
  .dialog:has(.onb){height:100vh;height:100dvh;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .bgrid{grid-template-columns:repeat(3,1fr)}
  .banner{height:125px}
  .prof-top{height:44px}
  .phone-only{display:grid}
  .prof-top .phone-only{display:block}
  .desk{display:none}
  .prof-top .avatar.big{width:80px;height:80px;font-size:28px;margin-top:-50px}
  .chgrid{padding-left:16px}
}


/* profile editor (Edit profile + onboarding) */
img.avatar{object-fit:cover;background:var(--line2)}
.banner{background:var(--line2) center/cover no-repeat}
.pf{margin:0 -4px}
.pf-banner{display:grid;place-items:center;height:auto;aspect-ratio:3/1;position:relative;cursor:pointer;border-radius:12px;overflow:hidden}
.pf-banner .rm{position:absolute;top:8px;right:8px}
.pf-avatar{display:inline-block;position:relative;margin:-48px 0 4px 14px;cursor:pointer;border-radius:50%}
.pf-avatar .avatar.big{width:96px;height:96px;font-size:32px}
.pf-avatar .cam{position:absolute;inset:0;margin:auto}
.cam{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:rgba(15,20,25,.6);color:#fff}
.cam svg{width:20px;height:20px}
.at{display:flex;align-items:baseline;font-size:17px}
.at span{display:inline}
.pf label:focus-within .cam{box-shadow:0 0 0 2px var(--blue)}

/* install illustrations */
.shots{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0 12px}
.shots figure{margin:0;display:grid;gap:8px;justify-items:center}
.shots figcaption{font-size:12px;line-height:15px;text-align:center;color:var(--muted)}
.shots figcaption b{color:var(--text);font-weight:600}
.phone{width:100%;aspect-ratio:9/15;border:2px solid var(--line2);border-radius:16px;background:var(--soft);overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;padding:6px;gap:5px}
.phone .pg{flex:1;display:grid;align-content:start;gap:5px;padding:4px}
.phone .pg i{height:6px;border-radius:3px;background:var(--line2)}
.phone .pg i.s{width:60%}
.phone .bar{display:flex;align-items:center;gap:4px;background:var(--bg);border-radius:10px;padding:4px;box-shadow:var(--shadow)}
.phone .bar.top{order:-1}
.phone .bar span{display:grid;place-items:center;color:var(--muted)}
.phone .bar svg{width:14px;height:14px}
.phone .url{flex:1;font-size:8px;white-space:nowrap;overflow:hidden}
.phone .hl{border-radius:8px;padding:2px;color:var(--blue)!important;box-shadow:0 0 0 2px var(--blue)}
.phone .sheet{background:var(--bg);border-radius:10px;overflow:hidden;box-shadow:var(--shadow)}
.phone .sheet.top{margin-bottom:auto}
.phone .row{display:flex;align-items:center;justify-content:space-between;gap:2px;font-size:7.5px;line-height:9px;padding:6px 5px;border-bottom:1px solid var(--line)}
.phone .row.hl{font-weight:700;color:var(--blue);box-shadow:inset 0 0 0 2px var(--blue);border-radius:8px}
.phone .row svg{width:11px;height:11px}
.phone.home{justify-content:center;background:linear-gradient(160deg,#7aa7ff,#c08bff)}
.phone .apps{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;padding:8px}
.phone .apps>*{aspect-ratio:1;border-radius:22%;background:rgba(255,255,255,.55)}
.phone .apps b{display:grid;place-items:center;background:#000;color:#fff;box-shadow:0 0 0 2px #fff}
.phone .apps .logo-svg{width:60%;height:60%}
.onb-hint{font-size:13px!important;line-height:18px!important}
.onb .field{margin:10px 0}

/* iOS install drawings, modelled on iOS 26 Safari */
.shots.ios{grid-template-columns:repeat(2,1fr);gap:14px 12px}
.ios .phone{aspect-ratio:1/.95;background:#f2f2f7;border-color:#e0e0e6;border-radius:18px;padding:7px;gap:6px;color:#000}
.ios .phone.top{justify-content:flex-start}
.ios figcaption{font-size:13px;line-height:17px}
.ios .hl{color:#0a84ff!important;box-shadow:0 0 0 2px #0a84ff;border-radius:9px}
.ios .card{background:#fff;border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.ios .ico{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:6px;background:#000;color:#fff}
.ios .ico .logo-svg{width:14px;height:14px}
.ios .sf{background:#fff;border-radius:16px;padding:6px 6px 5px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.ios .url{background:#f2f2f7;border-radius:9999px;font-size:8.5px;text-align:center;padding:4px;margin-bottom:5px}
.ios .tools{display:flex;justify-content:space-between;align-items:center;color:#3c3c43}
.ios .tools svg{width:13px;height:13px}
.ios .tools .flip{transform:scaleX(-1)}
.ios .tools .hl{display:grid;place-items:center;padding:2px}
.ios .sheethead{display:flex;align-items:center;gap:6px;padding:7px}
.ios .sheethead b{display:block;font-size:8.5px;line-height:11px}
.ios .sheethead small{display:block;font-size:7.5px;color:#8e8e93}
.ios .circles{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;text-align:center;font-size:6.5px;line-height:8px;color:#3c3c43}
.ios .circles i{display:grid;place-items:center;width:26px;height:26px;margin:0 auto 3px;border-radius:50%;background:#e5e5ea}
.ios .circles svg{width:12px;height:12px}
.ios .circles .on svg{transform:rotate(90deg)}
.ios .circles .on{color:#0a84ff;font-weight:700}
.ios .list>div{display:flex;align-items:center;gap:6px;font-size:8.5px;padding:7px 8px;border-top:1px solid #e5e5ea}
.ios .list>div:first-child{border-top:0}
.ios .list svg{width:12px;height:12px}
.ios .list .hl{font-weight:700;border-top-color:transparent;border-radius:12px;box-shadow:inset 0 0 0 2px #0a84ff}
.ios .list .hl+div,.ios .list div:has(+.hl){border-color:transparent}
.ios .addbar{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:7.5px;white-space:nowrap;font-weight:700;padding:2px 0 4px}
.ios .addbar i{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#fff}
.ios .addbar i svg{width:10px;height:10px}
.ios .addbar b{margin-right:3px;background:#0a84ff;color:#fff!important;border-radius:9999px;padding:4px 9px;box-shadow:0 0 0 2px #f2f2f7,0 0 0 3.5px #0a84ff}
.ios .addrow,.ios .togrow{display:flex;align-items:center;gap:6px;font-size:8.5px;padding:7px}
.ios .togrow{justify-content:space-between}
.ios .tg{width:22px;height:13px;border-radius:9999px;background:#34c759;position:relative}
.ios .tg::after{content:"";position:absolute;right:1.5px;top:1.5px;width:10px;height:10px;border-radius:50%;background:#fff}

/* hover only where a real pointer can hover, so taps on phones don't leave sticky highlights */
@media (hover:hover){
  .logo:hover,.navitem:hover>span{background:var(--hover)}
  .me:hover{background:var(--hover)}
  .tab:hover::before{content:"";position:absolute;inset:4px;border-radius:12px;background:var(--hover)}
  .nowbtn:hover{background:rgba(29,155,240,.1)}
  .iconbtn:hover{background:var(--hover)}
  .post:hover{background:var(--soft)}
  .head .more:hover{color:var(--blue);background:rgba(29,155,240,.1)}
  .to a:hover{text-decoration:underline}
  .act.reply:hover,.act.view:hover,.act.mark:hover,.act.share:hover{color:var(--blue)}
  .act.reply:hover i,.act.view:hover i,.act.mark:hover i,.act.share:hover i{background:rgba(29,155,240,.1)}
  .act.rt:hover{color:var(--green)}
  .act.rt:hover i{background:rgba(0,186,124,.1)}
  .act.like:hover{color:var(--pink)}
  .act.like:hover i{background:rgba(249,24,128,.1)}
  .replied:hover span{text-decoration:underline}
  .xref:hover{background:var(--hover)}
  .qcard:hover{background:var(--soft)}
  button.item:hover{background:var(--soft)}
  .brow:hover{background:var(--soft)}
  .chap:hover{border-color:var(--blue);color:var(--blue)}
  button.row:hover,label.row:hover{background:var(--soft)}
  .outline:hover{background:var(--hover)}
  .heat i[data-tip]:hover{transform:scale(1.25);outline:1px solid var(--blue)}
  .showcase .medal:hover{background:var(--soft)}
  .bdg:hover{background:var(--soft);transform:translateY(-2px)}
  .bdg.earned:hover .sheen,.medal.earned:hover .sheen{animation:sheen .9s ease}
  .notif[data-badge]:hover{background:var(--soft)}
  .menu button:hover{background:var(--soft)}
}