:root{color-scheme:dark;--bg:#101817;--rail:#111b19;--surface:#182421;--surface2:#202e2a;--line:#31413b;--ink:#f3f6ed;--sub:#a6b5ac;--soft:#83968b;--accent:#d2f197;--on:#172219;--amber:#f1d69d;--radius:16px;font-family:system-ui,-apple-system,"Microsoft JhengHei","PingFang TC",sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;min-width:0}
button,input,textarea{font:inherit}
button{color:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button:disabled{opacity:.55;cursor:default}
button svg,.icon,header svg,.brand svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.symbols{position:absolute;width:0;height:0;overflow:hidden}
.shell{display:grid;grid-template-columns:218px minmax(0,1fr);min-height:100dvh}
.rail{position:sticky;top:0;height:100dvh;background:var(--rail);border-right:1px solid #283732;padding:25px 17px 16px;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:11px;padding:0 7px;font-size:18px;font-weight:800;letter-spacing:.02em}
.brand-mark,.mobile-brand{width:40px;height:40px;display:grid;place-items:center;background:var(--accent);color:var(--on);border-radius:12px}
.brand-mark svg{width:22px;height:22px}
small{display:block;color:var(--sub);font-size:12px;font-weight:500;line-height:1.45}
.brand small{margin-top:2px}
.rail-section{color:var(--soft);font-size:12px;font-weight:650;margin:38px 9px 9px;letter-spacing:.09em}
#nav{display:grid;gap:5px}
#nav button,.rail-user{width:100%;border:0;display:flex;align-items:center;text-align:left;gap:10px;background:transparent;padding:11px;border-radius:10px;color:var(--sub);font-weight:700}
#nav button:hover,.rail-user:hover{background:var(--surface2)}
#nav [aria-current]{background:#27382d;color:var(--accent)}
.rail-foot{margin-top:auto;border-top:1px solid var(--line);padding-top:10px}
.rail-user{color:var(--ink)}
.rail-user .end{margin-left:auto;color:var(--soft)}
.workspace{min-width:0}
.topbar{height:65px;border-bottom:1px solid #283732;padding:0 32px;display:flex;align-items:center;gap:10px}
.path{display:flex;align-items:center;gap:9px;min-width:0;color:var(--sub);font-size:13px}
.path svg{width:13px;height:13px;color:var(--soft)}
.path strong{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-brand,.mobile-account{display:none!important}
.canvas{max-width:1240px;margin:0 auto;padding:37px 32px 44px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:24px}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(27px,4.5vw,38px);line-height:1.17;letter-spacing:-.045em}
h2{font-size:19px;line-height:1.32}
h3{font-size:15px;line-height:1.35}
.lead{color:var(--sub);margin-top:9px;font-size:14px;line-height:1.55}
.btn,.icon-btn{border:1px solid var(--line);border-radius:10px;background:var(--surface2);display:inline-flex;gap:7px;align-items:center;justify-content:center;font-weight:750;white-space:nowrap;min-height:42px;padding:0 13px}
.btn:hover,.icon-btn:hover{filter:brightness(1.12)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on)}
.btn.quiet{background:transparent}
.btn svg{width:17px;height:17px}
.icon-btn{width:42px;padding:0;flex:none}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 252px;gap:18px;align-items:start}
.stack{display:grid;gap:12px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:17px;min-width:0}
.side-card{display:grid;gap:10px}
.side-card p,.muted{color:var(--sub);line-height:1.55;font-size:13px}
.side-card .btn{width:100%;justify-content:space-between;margin-top:2px}
.side-icon{color:var(--accent);width:38px;height:38px;background:#293b2d;border-radius:11px;display:grid;place-items:center}
.side-icon .icon{width:19px;height:19px}
.flowline{display:grid;gap:13px;margin:3px 0 0;padding:0;list-style:none}
.flowline li{display:flex;gap:9px;align-items:center;color:var(--sub);font-size:13px}
.flowline b{display:grid;place-items:center;background:#28372e;color:var(--accent);width:22px;height:22px;border-radius:50%;font-size:11px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.tabs{display:flex;gap:4px;padding:3px;border:1px solid var(--line);background:#15201d;border-radius:11px;flex:none}
.tabs button{border:0;background:transparent;color:var(--sub);border-radius:7px;padding:6px 9px;font-size:12px;font-weight:700;min-height:32px;white-space:nowrap}
.tabs button[aria-pressed=true]{background:#314238;color:var(--ink)}
.search{display:flex;min-width:0;align-items:center;gap:6px;color:var(--soft);background:#15201d;border:1px solid var(--line);border-radius:10px;padding:0 9px;max-width:170px}
.search .icon{width:15px;height:15px}
.search input{border:0;color:var(--ink);background:none;width:100%;min-width:0;padding:9px 0}
.search input:focus{outline:0}
.search:focus-within{outline:1px solid var(--accent)}
.cards{display:grid;gap:10px}
.group{width:100%;text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.group:hover{border-color:#6c8976;background:#1c2b25}
.avatar{width:45px;height:45px;display:grid;place-items:center;flex:none;border-radius:12px;background:#354b39;color:#e0f5a9;font-weight:850;font-size:18px}
.avatar.violet{background:#3d374f;color:#e0cef9}.avatar.gold{background:#4a3e2a;color:#f1d69d}
.avatar.mini{width:34px;height:34px;border-radius:9px;font-size:13px}
.group-info{min-width:0}
.group-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:1.45}
.group-info small{margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.group-end{display:flex;align-items:center;gap:8px}
.group-end svg{color:var(--soft);width:15px;height:15px}
.badge{display:inline-flex;gap:4px;align-items:center;font-size:11px;border-radius:6px;padding:4px 7px;color:#c2cdc7;background:#293630;white-space:nowrap}
.badge.owner{color:var(--accent);background:#304430}.badge.fee{color:var(--amber);background:#403823}
.group-empty{color:var(--sub);padding:22px;text-align:center}
.room-head{justify-content:flex-start;align-items:center;margin-bottom:15px}
.room-head .room-name{min-width:0;flex:1;overflow-wrap:anywhere}
.room-head h1{font-size:clamp(22px,4vw,32px)}
.room-head .lead{margin-top:4px;font-size:13px}
.announcement{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:#273421;border:1px solid #40533b;border-radius:12px;color:#e1f0c7;overflow-wrap:anywhere}
.announcement .icon{color:var(--accent);width:16px;height:16px;margin-top:2px}
.room-panel{padding:0;overflow:hidden;background:#20312c;border-color:#3d554c}
.messages{background:#263b34;min-height:220px;max-height:420px;overflow:auto;padding:17px;display:grid;gap:13px;align-content:start}
.message{display:flex;gap:9px;align-items:flex-start;min-width:0}
.message.mine{flex-direction:row-reverse}
.message > div{max-width:85%;min-width:0}
.message.mine > div{text-align:right}
.message strong{display:block;color:var(--sub);font-size:11px;margin-bottom:4px}
.message p{padding:8px 10px;border-radius:9px;background:#1d2c27;overflow-wrap:anywhere;white-space:pre-wrap}
.message.mine p{background:#3b5141}
.composer{border-top:1px solid var(--line);padding:11px;display:flex;gap:8px}
.composer input{min-width:0;flex:1}
.room-note{padding:12px;color:var(--sub);border-top:1px solid var(--line);display:flex;gap:7px;align-items:center}
.form{display:grid;gap:13px}
.field{display:grid;gap:6px;font-size:13px;font-weight:700}
.field em{font-size:11px;color:var(--sub);font-style:normal;font-weight:500}
.input{border:1px solid #45584f;border-radius:9px;min-height:42px;background:#111c19;color:var(--ink);padding:9px 11px;width:100%}
textarea.input{min-height:66px;resize:vertical}
.max-panel{max-width:520px}
.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.identity{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;background:#23342b;border:1px solid var(--line);border-radius:10px}
.identity strong{display:block;color:var(--accent);margin-top:2px;letter-spacing:.035em;overflow-wrap:anywhere}
.identity .btn{min-height:36px}
.person-result{display:flex;align-items:center;gap:10px;min-width:0}
.person-result > div{min-width:0;overflow-wrap:anywhere}
.person-result h3{margin-bottom:2px}
.dm-waiting{min-height:210px;display:grid;align-content:center;justify-items:start;gap:11px}
.dialog-body details .form{margin-top:10px}
.privacy-choice{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;background:#14201b;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.privacy-choice strong{display:block;margin-bottom:3px}
.privacy-choice input{width:19px;height:19px;accent-color:#afd774;flex:none;margin:0}
.privacy-choice:has(:checked){border-color:#a2bf7c;background:#2a3927}
.anonymous-note{border:1px solid #40533b;border-radius:10px;background:#202e24;color:#e1f0c7}
.member-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:13px;padding:8px 10px;background:#303526;border:1px solid #4b5239;border-radius:10px;color:var(--amber)}
.member-preview .btn{min-height:36px}
.moderation-summary,.member-actions{display:flex;gap:6px;flex-wrap:wrap}
.moderation-summary .btn,.member-actions .btn{font-size:12px;min-height:36px;padding:0 8px}
.member-list{display:grid;gap:8px;list-style:none;padding:0;margin:0}
.member-row{display:grid;gap:8px;padding:9px;border:1px solid var(--line);border-radius:10px;background:#14201b}
.member-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;overflow-wrap:anywhere}
.btn.danger{color:#ffd2c6;background:#472d29;border-color:#775248}
dialog{background:var(--surface);border:1px solid #46594e;color:var(--ink);padding:0;border-radius:20px;width:min(470px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 20px 80px #0009}
dialog::backdrop{background:#080f0cca}
.dialog-head{padding:17px 19px 13px;border-bottom:1px solid var(--line);display:flex;gap:10px;justify-content:space-between;align-items:center}
.dialog-head .icon-btn{background:transparent;min-height:34px;width:34px}
.dialog-body{padding:17px 19px 19px;display:grid;gap:14px}
.steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.steps li{border-top:3px solid #405148;padding-top:6px;font-size:11px;color:var(--sub)}
.steps .active{border-color:var(--accent);color:var(--accent);font-weight:800}
.actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.actions .grow{flex:1}
.choice-set{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:0;padding:0;margin:0}
.choice-set legend{font-size:13px;font-weight:750;margin-bottom:7px}
.choice{background:#14201b;border:1px solid var(--line);border-radius:10px;padding:8px;display:flex;gap:7px;align-items:center;cursor:pointer;font-size:12px}
.choice:has(:checked){border-color:#a2bf7c;background:#2a3927}
.choice input{accent-color:#afd774;margin:0}
.fee-box{display:grid;gap:8px;background:#263028;border:1px solid #4b5a49;border-radius:12px;padding:13px}
.fee-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.fee-row strong{overflow-wrap:anywhere}
.fee-note{color:var(--amber);line-height:1.5;font-size:12px}
#toast{position:fixed;z-index:4;bottom:17px;left:50%;transform:translateX(-50%);border-radius:10px;padding:9px 14px;background:#e1f5bc;color:var(--on);font-weight:750;max-width:calc(100% - 26px);box-shadow:0 5px 20px #0007}
#toast:empty{display:none}
@media(max-width:1010px){.shell{grid-template-columns:178px minmax(0,1fr)}.canvas{padding:28px 20px}.topbar{padding:0 20px}.layout{grid-template-columns:minmax(0,1fr) 205px;gap:12px}}
@media(max-width:790px){.rail{display:none}.shell{display:block}.mobile-brand{display:grid!important;width:29px;height:29px;border-radius:8px}.mobile-brand svg{color:var(--on);width:16px;height:16px}.mobile-account{display:inline-flex!important;min-height:32px;width:34px;background:transparent}.topbar{height:52px;padding:0 14px}.canvas{padding:20px 14px 30px}.layout{grid-template-columns:minmax(0,1fr)}.page-head{margin-bottom:16px}.side-stack{grid-template-columns:repeat(2,minmax(0,1fr))}.room-head{margin-bottom:12px}}
@media(max-width:460px){.canvas{padding:17px 12px 25px}.lead{font-size:12px}.page-head .btn{padding:0 8px;gap:4px;font-size:12px;min-height:37px}.page-head .btn svg{width:15px;height:15px}.toolbar{gap:6px}.tabs button{padding:5px 6px;font-size:11px}.search{max-width:125px;padding:0 6px}.search input{font-size:12px}.group{padding:11px 9px;gap:8px}.avatar{width:40px;height:40px}.group-end{gap:4px}.side-stack{grid-template-columns:1fr}.side-card{padding:13px}.room-head .icon-btn{width:36px;min-height:37px}.room-head{gap:8px}.profile-grid{grid-template-columns:1fr}.dialog-body,.dialog-head{padding-left:13px;padding-right:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}
