:root{
  color-scheme:light;
  --ink:#202822;--paper:#f9f8f2;--panel:#fffefa;--base:#edf2ee;--soft:#eef2ef;--edge:#c8d2cc;
  --line:#e0e5dc;--green:#185a47;--button:#185944;--muted:#617067;--focus:#297351;
  --tint:#dcece0;--sent:#d8eddb;--danger:#b33230;--badge:#bb3639;
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:var(--ink);background:var(--paper);font-variant-numeric:tabular-nums;
}
@media(prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --ink:#ecf1e9;--paper:#161f1b;--panel:#1d2923;--edge:#52665b;--base:#121a16;--soft:#293831;
    --line:#304239;--green:#a5d9b9;--button:#30684e;--muted:#afbeb4;--focus:#a5d9b9;
    --tint:#314c3e;--sent:#285440;--danger:#ffa6a1;
  }
}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
::selection{background:var(--green);color:var(--paper)}
html,body,main,.workspace,.stage,.view{height:100%;min-height:0;min-width:0;margin:0}
body{overflow:hidden}
main{height:100dvh}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0;overflow-wrap:anywhere}
h1,h2,h3,strong{font-weight:650}
h1{font-size:1.5rem;letter-spacing:.01em}
h2{font-size:1.18rem;line-height:1.45}
h3{font-size:1rem}
img{display:block;max-width:100%;object-fit:cover}
button,input,textarea{font:inherit;color:inherit;min-width:0}
button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;border:0;border-radius:12px;background:transparent;cursor:pointer;transition:background .16s,color .16s;overflow-wrap:anywhere}
button:hover{background:var(--soft)}
button:disabled{opacity:.55;cursor:default}
button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
button svg{pointer-events:none}
svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
input,textarea{display:block;width:100%;padding:12px 14px;min-height:48px;background:var(--panel);border:1px solid var(--line);border-radius:12px;caret-color:var(--green)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
textarea{resize:vertical;line-height:1.6}
input[type=checkbox],input[type=radio]{width:18px;min-height:18px;accent-color:var(--green)}
input[type=file]{font-size:.88rem}
.primary{background:var(--button);color:white;font-weight:600}
.primary:hover{background:#194632}
.link{color:var(--green);font-weight:550}
.danger,.error{color:var(--danger)}
.solid.danger{background:#aa3132;color:#fff}
.glyph{padding:0;width:44px;height:44px;flex:none;color:var(--green)}
.glyph.primary{color:white}
.muted,time,.foot{font-size:.9rem;color:var(--muted);font-weight:400}
.stack,.form,.field,.request{display:flex;flex-direction:column;gap:12px;min-width:0}
.form{gap:18px}
.field{font-weight:550;font-size:.93rem;gap:7px}
.field input,.field textarea{font-size:1rem;font-weight:400}
.row,.bar,.identity,.profile,.listitem,.option,.replybar,.outbox,.file{display:flex;align-items:center;gap:12px;min-width:0}
.cut{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}
.row>.cut,.row>.stack,.identity>.stack,.listitem>.stack,.bar>h1,.bar>h2,.profile>.stack{flex:1}
.center,.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:44px 16px;color:var(--muted);text-align:center}
.center{height:100%}
.empty h2{color:var(--ink)}
.empty>.primary{margin-top:8px}
.prose{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;user-select:text}
/* Sign-in and phone confirmation share one persistent backdrop. */
.entry{height:100%;overflow:auto;background:var(--panel)}
.entry>.wrap{min-height:100%;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(428px,1fr)}
.scenery{position:relative;overflow:hidden;background:#e1e6cf;min-height:100%}
.scenery>img{position:absolute;inset:0;width:100%;height:100%;object-position:54% 47%}
.wordmark{position:absolute;top:clamp(24px,5vh,60px);left:clamp(28px,4vw,72px);display:flex;align-items:center;gap:12px;color:#173f34}
.wordmark .logo{width:44px;height:44px}
.wordmark strong{font-size:1.55rem;letter-spacing:.04em;font-weight:700}
.wordmark span{font-size:.94rem;line-height:1.15;padding-left:14px;border-left:1px solid #315c4e70}
.login{width:min(380px,100% - 80px);margin:auto;display:flex;flex-direction:column;gap:10px;padding:42px 0}
.login h1{font-size:2.13rem;line-height:1.32;font-weight:650;letter-spacing:-.02em}
.login p{line-height:1.7;font-size:1rem}
.login .form{gap:21px;margin-top:24px}
.control{position:relative;display:block}
.control>svg{position:absolute;left:16px;top:16px;width:20px;height:20px;color:var(--muted);pointer-events:none}
.control:focus-within>svg{color:var(--green)}
.control input{height:52px;border-radius:10px;padding-left:47px;background:transparent;border-color:var(--edge);transition:border-color .15s}
.control input:hover{border-color:var(--muted)}
.control input:focus{outline:2px solid var(--focus);outline-offset:-2px}
.login .primary{margin-top:8px;min-height:52px;border-radius:10px;font-size:1.05rem;gap:10px}
.login .primary svg,.foot svg{width:19px;height:19px}
.login .foot{margin-top:11px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:.9rem}
.password{position:relative}
.password input{padding-right:50px}
.password button{position:absolute;right:4px;bottom:4px;color:var(--muted)}
.password button[aria-pressed=true]{color:var(--green);background:var(--soft)}
.pairing{text-align:center;align-items:center;gap:14px}
.pairing .qr{width:min(100%,244px);height:auto;aspect-ratio:1;object-fit:contain;background:white;image-rendering:pixelated;border-radius:12px;outline:1px solid var(--line);margin:8px 0}
.pair-code{display:flex;gap:14px;align-items:center;font-size:.9rem}
.digits{font-size:1.55rem;letter-spacing:.16em;color:var(--green)}
.pairing p{text-wrap:balance}
.pairing .link{gap:6px}
@media(prefers-color-scheme:dark){
  .scenery>img{filter:brightness(.64) saturate(.85)}
  .wordmark{color:#fffefa;text-shadow:0 1px 4px #183923}
  .wordmark span{border-color:#ffffff90}
  .scenery:after{content:"";position:absolute;inset:0;background:linear-gradient(#081d18a6,transparent 26%);pointer-events:none}
  .wordmark{z-index:1}
}
@media(max-width:760px){
  .entry>.wrap{display:flex;flex-direction:column}
  .scenery{min-height:0;flex:0 0 clamp(130px,29dvh,310px)}
  .scenery>img{object-position:60% 57%}
  .scenery:after{display:none}
  .wordmark{top:0;left:0;width:100%;padding:18px 24px 40px;gap:9px;color:#173f34;text-shadow:none;background:linear-gradient(#ffebc9fa,#ffebc9bf 50%,transparent)}
  .wordmark .logo{width:34px;height:34px}
  .wordmark strong{font-size:1.25rem}
  .wordmark span{font-size:.84rem;padding-left:10px;border-color:#315c4e70}
  .login{width:min(380px,100% - 48px);margin:0 auto;padding:36px 0 max(26px,env(safe-area-inset-bottom))}
  .login h1{font-size:1.8rem}
  .login .form{margin-top:16px;gap:17px}
  .pairing{padding-top:24px;gap:10px}
  .pairing .qr{width:min(100%,218px)}
}
@media(max-width:760px) and (max-height:680px){
  .scenery{flex-basis:95px}
  .login{padding-block:18px;gap:6px}
  .login .form{margin-top:10px;gap:12px}
  .login .foot{margin-top:8px;font-size:.84rem}
  .entry:has(.pairing) .scenery{display:none}
}
.error:empty,.outbox:empty,.replybar:empty,.notice:empty,#notice:empty,.network:empty,.badge:empty{display:none}
.workspace{display:grid;grid-template-columns:80px minmax(0,1fr)}
.rail{display:flex;flex-flow:column;align-items:center;gap:8px;padding:20px 9px;background:#123f35;overflow:auto}
.rail>.logo{width:42px;height:42px;margin:0 0 24px;outline:1px solid #ffffff40;border-radius:12px}
.navitem{flex-direction:column;min-height:64px;width:100%;padding:8px 0;gap:4px;font-size:.82rem;font-weight:500;color:#d0e2db;position:relative}
.navitem svg{width:25px;height:25px}
.navitem:last-child{margin-top:auto}
.navitem:hover{background:#ffffff14;color:white}
.navitem[aria-current=true]{background:#c6eed7;color:#123f35}
.badge,.dot{color:white;background:var(--badge);font-size:.78rem;line-height:20px;min-width:20px;border-radius:20px;font-weight:600;padding:0 5px;text-align:center;flex:none}
.dot{min-width:8px;height:8px;padding:0}
.navitem .badge{position:absolute;left:calc(50% + 4px);top:1px;border:2px solid #123f35;line-height:17px;min-width:21px;padding-inline:4px}
.navitem:focus-visible{outline-color:white}
.split{display:grid;grid-template-columns:clamp(310px,27vw,400px) minmax(0,1fr)}
.sidebar,.pane,.page{display:flex;flex-direction:column;min-width:0;min-height:0}
.sidebar{border-right:1px solid var(--line);background:var(--panel)}
.bar{min-height:76px;padding:12px 22px;gap:4px;flex:none}
.bar h1{padding-left:3px}
.search{display:flex;align-items:center;gap:9px;background:var(--base);color:var(--muted);padding:0 14px;border-radius:10px;flex:none}
.sidebar>.search{margin:0 20px}
.search svg{width:19px}
.search input{background:none;color:var(--ink);padding:10px 0;min-height:44px;border:0;outline:none}
.search:focus-within{outline:2px solid var(--focus);outline-offset:1px}
.tabs{display:flex;gap:5px;padding:12px 16px}
.sidebar>.tabs{gap:0;padding:6px 16px 8px;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:6px}
.sidebar>.tabs button{min-height:44px;padding:6px 10px;position:relative}
.sidebar>.tabs button.active{background:transparent;font-weight:650}
.sidebar>.tabs button.active:after{content:'';position:absolute;bottom:-8px;left:10px;right:10px;background:var(--green);height:3px;border-radius:3px}
.sidebar>.bar .glyph:last-child{color:var(--panel);background:var(--green);border-radius:50%;border:4px solid var(--panel)}
.sidebar>.bar .glyph:last-child:hover{opacity:.86}
.tabs button{font-size:.9rem;color:var(--muted);min-height:36px;padding:6px 12px;border-radius:10px}
.tabs button.active,.active,.selected,.selected:hover{background:var(--tint);color:var(--green)}
.scroll,.content,.messages,.choices{overflow:auto;overscroll-behavior:contain;min-height:0}
.scroll{padding:0 9px 12px;flex:1}
.listitem,.option,.identity{width:100%;justify-content:flex-start;text-align:left}
.listitem{padding:14px 12px;gap:12px;position:relative}
.listitem+.listitem:before{content:'';height:1px;background:var(--line);position:absolute;top:0;right:12px;left:72px}
.listitem.selected:before,.listitem.selected+.listitem:before{display:none}
.listitem .stack,.identity .stack{gap:4px}
.listitem time{font-size:.79rem;flex:none}
.avatar{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:14px;background:var(--tint);font-size:1.18rem;font-weight:600;color:var(--green);flex:none;overflow:hidden}
.avatar img{width:100%;height:100%}
.selected .avatar{background:var(--button);color:white}
.pane{background:var(--base)}
.pane>.empty{flex:1}
.start-icon{width:210px;height:142px;overflow:hidden;border-radius:120px 120px 14px 14px;margin-bottom:12px}
.start-icon img{width:100%;height:100%;object-position:54% 60%}
.pane>.bar,.page>.bar{background:var(--panel);border-bottom:1px solid var(--line)}
.back{display:none}
.identity{padding:0 8px;flex:1;width:auto}
.identity>.avatar{width:42px;height:42px}
.messages{flex:1;padding:16px max(24px,calc((100% - 850px) / 2));overflow-anchor:none}
.older,.day{display:block;text-align:center;margin:5px auto 16px;color:var(--muted);font-size:.83rem}
.older{color:var(--green)}
.line{display:flex;align-items:flex-end;gap:8px;margin:0 0 12px}
.line.mine{flex-direction:row-reverse}
.sender{padding:0;min-height:36px}
.sender .avatar{width:36px;height:36px;border-radius:11px;font-size:1rem}
.bubble{max-width:min(74%,640px);min-width:76px;border-radius:12px 12px 12px 3px;background:var(--panel);padding:10px 15px 7px;box-shadow:0 1px 2px #14261a0d;overflow-wrap:anywhere}
.mine .bubble{border-radius:12px 12px 3px 12px;background:var(--sent)}
.bubble .meta{display:block;text-align:right;font-size:.75rem;color:var(--muted);margin-top:2px}
.mine .meta,.author,.state{color:var(--green)}
.author{font-size:.88rem}
.bubble .file{padding:4px 0;max-width:100%;text-align:left}
.quote{width:100%;text-align:left;max-width:100%;padding:6px 10px;min-height:36px;background:var(--soft);color:var(--green);border-radius:8px;font-size:.89rem;margin-bottom:6px}
.actions{opacity:0;align-self:center}
.line:hover .actions,.actions:focus-visible{opacity:1}
@media(hover:none){.actions{opacity:1;width:30px}}
.composer,.outbox{display:flex;flex-direction:column;gap:6px;flex:none;background:var(--panel);padding:12px max(18px,calc((100% - 878px) / 2));border-top:1px solid var(--line)}
.outbox{flex-direction:row;justify-content:space-between}
.composer .row{gap:6px;width:100%}
.composer textarea{border:0;resize:none;background:var(--base);field-sizing:content;max-height:155px}
.composer .primary{border-radius:50%}
.replybar{flex-direction:column;gap:0}
.emoji{display:grid;grid-template-columns:repeat(6,1fr);gap:0}
.emoji button{font-size:1.35rem;padding:4px}
.page>.bar{padding-inline:max(24px,calc((100% - 860px) / 2))}
.content{width:min(100%,908px);align-self:center;padding:22px 24px 65px}
.content>.tabs{padding:0 0 16px}
.content>.search{margin-bottom:18px;background:var(--soft)}
.content>.stack{gap:0}
.profile{padding:12px 10px 30px;gap:20px}
.profile .avatar{width:72px;height:72px;font-size:1.5rem;border-radius:22px}
.profile .stack{gap:4px}
.option{padding:14px 12px;gap:16px;min-height:56px;border-radius:8px}
.option svg{color:var(--green)}
.option.danger svg{color:inherit}
.content>.option{position:relative}
.content>.option+.option:before{content:'';height:1px;background:var(--line);position:absolute;left:50px;right:12px;top:0}
.content>.option:not(.danger)>svg:last-child{margin-left:auto;opacity:.72;width:17px;height:17px}
.content>.option.requests{padding:14px 12px;gap:12px}
.friend-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#e98d2a}
.friend-icon svg{color:white;width:26px;height:26px;stroke-width:2}
.content>.option.requests+.stack{border-top:1px solid var(--line);margin-top:4px;padding-top:4px}
.posts{columns:2;column-gap:18px}
.posts>.empty{column-span:all}
.post:hover,.event:hover{background:var(--panel);border-color:var(--muted)}
.post,.event{display:inline-flex;width:100%;align-items:stretch;padding:0;margin-bottom:18px;border-radius:16px;overflow:hidden;text-align:left;background:var(--panel);border:1px solid var(--line);break-inside:avoid}
.post{flex-direction:column;gap:0}
.post>.stack,.event>.stack{padding:20px;flex:1}
.post .row{font-size:.84rem;gap:8px;color:var(--muted)}
.post .row svg{width:18px}
.post .avatar{width:28px;height:28px;font-size:.82rem;border-radius:9px}
.excerpt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;overflow:hidden;overflow-wrap:anywhere}
.event{gap:0}
.event-time,.venue{display:flex;align-items:center;gap:7px;font-size:.91rem;overflow-wrap:anywhere}
.event-time{font-weight:550;color:var(--green)}
.event-time svg,.venue svg{width:17px;height:17px}
.venue{color:var(--muted)}
.event .row{padding-top:12px;border-top:1px solid var(--line)}
.post>.stack>.row{margin-top:4px}
.post:only-child{column-span:all;display:flex;max-width:100%}
.post:only-child .photo{aspect-ratio:auto;max-height:45vh}
.post:only-child .photo img{object-fit:contain;max-height:45vh}

.event .row{justify-content:space-between;font-size:.9rem}
.photo{display:grid;place-items:center;min-height:88px;background:var(--soft);color:var(--muted);overflow:hidden}
.photo img{width:100%;max-height:55vh;object-fit:contain}
.post .photo{aspect-ratio:4/5;width:100%}
.event .photo{width:30%;max-width:225px}
.event .photo img,.post .photo img{width:100%;height:100%;max-height:none;object-fit:cover}
.more{text-align:center}
dialog{width:min(448px,calc(100% - 28px));max-height:88dvh;border:0;border-radius:18px;padding:0;background:var(--panel);color:var(--ink);box-shadow:0 18px 80px #0a231e24;overscroll-behavior:contain}
dialog::backdrop{background:#0f271e63}
dialog>.bar{min-height:64px;padding:10px 12px 8px 22px;position:sticky;top:0;z-index:2;background:var(--panel)}
dialog>.stack{padding:8px 22px 24px}
dialog .option{padding:10px 8px;min-height:44px}
dialog .listitem{padding:7px}
dialog .identity{padding:0;flex:none}
dialog .row{flex-wrap:wrap}
.choices{max-height:40vh}
.request{gap:6px;border-top:1px solid var(--line);padding:14px 0;overflow-wrap:anywhere}
#notice,.network,.notice{background:var(--ink);color:var(--paper);padding:10px 16px;border-radius:12px;max-width:90%;z-index:5}
#notice,.network{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);width:max-content}
.network{top:12px;bottom:auto;padding:0 12px}
.network .link{color:inherit}
.notice{position:sticky;bottom:14px;margin:0 auto 14px;width:fit-content}
button:active:not(:disabled){filter:brightness(.94)}
@keyframes opening{from{transform:scale(1.035)}}
@keyframes rise{from{transform:translateY(5px);opacity:.85}}
@keyframes locate{from{box-shadow:0 0 0 2px var(--focus)}to{box-shadow:0 0 0 2px transparent}}
@media(prefers-reduced-motion:no-preference){
  .scenery>img{animation:opening 1.5s cubic-bezier(.17,.8,.3,1)}
  .login .primary svg{transition:transform .2s}
  .login .primary:hover svg{transform:translateX(3px)}
  .login .form,.pairing .qr,dialog[open]{animation:rise .22s cubic-bezier(.2,1,.4,1)}
  .flash .bubble{animation:locate 1.6s ease-out}
}
@media(max-width:760px){
  .workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}
  .rail{grid-row:2;flex-direction:row;padding:6px 10px max(6px,env(safe-area-inset-bottom));gap:4px}
  .rail>.logo{display:none}
  .navitem:last-child{margin-top:0}
  .navitem{transition:none}
  .navitem{flex:1;min-height:56px;padding:6px 0;gap:2px}
  .navitem svg{width:22px;height:22px}
  .split{grid-template-columns:1fr}
  .split:not(.opened)>.pane,.split.opened>.sidebar,.workspace:has(.opened)>.rail{display:none}
  .back{display:inline-flex}
  .bar{min-height:64px;padding:8px 14px}
  .pane .bar{padding:6px 8px;gap:0}
  .pane .identity{gap:8px;padding-left:0}
  .messages{padding:14px 10px}
  .line{gap:4px}
  .bubble{max-width:calc(100% - 90px)}
  .composer{padding:9px 6px max(9px,env(safe-area-inset-bottom))}
  .composer .row{gap:0}
  .composer textarea{margin:0 4px}
  .content{padding:16px 14px 56px}
  .page>.bar{padding-inline:16px}
  input,textarea,.field input,.field textarea{font-size:16px}
}
@media(max-width:540px){
  .posts{column-gap:10px}
  .post>.stack{padding:12px;gap:8px}
  .post h2{font-size:1rem}
  .post .row{gap:4px}
  .post:not(:only-child) .avatar{display:none}
  .event>.stack{padding:14px}
  .posts .excerpt{font-size:.9rem}
  .event .photo{width:26%}
  .tabs{gap:2px;padding-inline:12px}
  .tabs button{padding-inline:10px}
}
dialog.viewer{width:min(740px,calc(100% - 28px))}
dialog.viewer video,dialog.viewer img,dialog audio{max-width:100%;max-height:65dvh;align-self:center;object-fit:contain}
dialog.viewer img{border-radius:8px}
@media(max-width:390px){.composer .glyph{width:39px}.composer textarea{padding-inline:8px}}
.announcement:empty{display:none}
.announcement{background:var(--panel);padding:4px 18px;border-bottom:1px solid var(--line)}
.banner{width:100%;justify-content:flex-start;gap:16px;text-align:left}
.banner strong{flex:none;color:var(--green)}
select{font:inherit;border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:12px;padding:12px}
.row>.listitem{flex:1}
