/* GreenBook — platform app */
body.app{background:var(--bg);padding-top:64px}
.app-wrap{width:min(1280px,100% - 24px);margin-inline:auto}
.muted{color:var(--muted)} .faint{color:var(--faint)} .small{font-size:13px} .xs{font-size:12px}
.row{display:flex;align-items:center;gap:10px} .row.wrap{flex-wrap:wrap} .grow{flex:1;min-width:0}
.stack{display:grid;gap:12px}
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.link{color:var(--accent);font-weight:600}.link:hover{text-decoration:underline}
hr.sep{border:0;border-top:1px solid var(--line);margin:0}

/* Topbar */
.topbar{position:fixed;top:0;left:0;right:0;height:64px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:saturate(1.6) blur(14px);border-bottom:1px solid var(--line);z-index:100}
.topbar .app-wrap{display:flex;align-items:center;height:100%;gap:14px}
.topbar .brand img{height:30px}
.topbar .brand{font-size:20px}
.search{position:relative;flex:0 1 300px}
.search .ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--faint)}
.search input{width:100%;height:40px;border-radius:999px;border:1px solid transparent;background:var(--surface-2);padding:0 14px 0 38px;font-size:14px;transition:all .15s}
.search input:focus{outline:none;background:var(--surface);border-color:var(--g500);box-shadow:0 0 0 4px color-mix(in srgb,var(--g500) 15%,transparent)}
.search-pop{position:absolute;top:46px;left:0;width:min(420px,92vw);background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-3);padding:8px;display:none;max-height:70vh;overflow:auto}
.search-pop.open{display:block}
.search-pop .it{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:10px;cursor:pointer}
.search-pop .it:hover,.search-pop .it.on{background:var(--surface-2)}
.search-pop h6{margin:8px 10px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--faint)}
.topnav{display:flex;align-items:stretch;height:100%;margin-left:auto}
.topnav a,.topnav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:74px;padding:0 6px;font-size:11.5px;font-weight:550;color:var(--muted);position:relative;border-bottom:2px solid transparent;transition:color .15s}
.topnav a:hover,.topnav button:hover{color:var(--ink)}
.topnav a.on{color:var(--ink);border-bottom-color:var(--ink)}
.topnav .ic{width:22px;height:22px}
.badge{position:absolute;top:9px;left:calc(50% + 4px);min-width:18px;height:18px;border-radius:999px;background:var(--danger);color:#fff;font-size:10.5px;font-weight:700;display:grid;place-items:center;padding:0 5px;border:2px solid var(--surface)}
.me-btn .av{width:24px;height:24px;font-size:10px}
.dropdown{position:absolute;right:0;top:58px;width:280px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-3);padding:8px;display:none;z-index:120}
.dropdown.open{display:block;animation:pop .18s ease}
.dd-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;font-size:14px;font-weight:500;width:100%;text-align:left;color:var(--ink)}
.dd-item:hover{background:var(--surface-2)}
.dd-item .ic{width:18px;height:18px;color:var(--muted)}
@media (max-width:1100px){.topnav a span.lbl,.topnav button span.lbl{display:none}.topnav a,.topnav button{min-width:52px}}
@media (max-width:760px){.topnav .hide-m{display:none}.search{flex:1}.topbar .brand span{display:none}}

/* Layout */
.layout{display:grid;grid-template-columns:240px minmax(0,1fr) 310px;gap:22px;padding:22px 0 80px;align-items:start}
.layout.two{grid-template-columns:240px minmax(0,1fr)}
.layout.wide{grid-template-columns:minmax(0,1fr) 310px}
.layout.full{grid-template-columns:minmax(0,1fr)}
.rail{position:sticky;top:86px;display:grid;gap:14px;max-height:calc(100vh - 100px);overflow:auto;scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.main{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-width:0}
@media (max-width:1180px){.layout{grid-template-columns:220px minmax(0,1fr)}.layout .rail-r{display:none}.layout.wide{grid-template-columns:minmax(0,1fr)}}
@media (max-width:860px){.layout,.layout.two{grid-template-columns:minmax(0,1fr)}.rail-l{display:none}body.app{padding-bottom:64px}}

/* Panels */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-1)}
.panel-pad{padding:18px}
.panel h3{font-size:16px;letter-spacing:-.01em}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 8px}
.panel-head h3{font-size:15.5px}
.panel-foot{padding:10px 18px;border-top:1px solid var(--line);text-align:center}
.panel-foot a,.panel-foot button{font-size:13.5px;font-weight:600;color:var(--muted)}
.panel-foot a:hover,.panel-foot button:hover{color:var(--accent)}
.page-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.page-title h1{font-size:26px;letter-spacing:-.03em}

/* Avatar */
.av{border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;flex:none;overflow:hidden;font-family:var(--font-display);letter-spacing:-.02em;position:relative;background:var(--g600)}
.av img{width:100%;height:100%;object-fit:cover}
.av.org{border-radius:12px;background:#fff;border:1px solid var(--line)}
.av.org img{object-fit:contain;padding:7%}
.av-24{width:24px;height:24px;font-size:10px}.av-32{width:32px;height:32px;font-size:12px}.av-40{width:40px;height:40px;font-size:14px}.av-48{width:48px;height:48px;font-size:16px}.av-56{width:56px;height:56px;font-size:19px}.av-72{width:72px;height:72px;font-size:24px}.av-96{width:96px;height:96px;font-size:32px}.av-152{width:152px;height:152px;font-size:52px}
.av .on-dot{position:absolute;right:2%;bottom:2%;width:26%;height:26%;border-radius:50%;background:#31c45a;border:2px solid var(--surface)}
.verified{display:inline-flex;color:var(--g600);vertical-align:-3px}
.verified .ic{width:16px;height:16px}

/* Left profile card */
.pcard{overflow:hidden;text-align:center}
.pcard .cover{height:64px;background:linear-gradient(120deg,var(--g700),var(--lime)) center/cover}
.pcard .av{margin:-36px auto 8px;border:3px solid var(--surface)}
.pcard h4{font-size:16px}
.pcard .hl{font-size:12.5px;color:var(--muted);padding:2px 16px 14px}
.pcard .kv{display:flex;justify-content:space-between;padding:8px 16px;font-size:12.5px;color:var(--muted);border-top:1px solid var(--line)}
.pcard .kv b{color:var(--accent)}
.navlist{padding:8px}
.navlist a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:10px;font-size:14px;font-weight:550;color:var(--ink-2)}
.navlist a:hover{background:var(--surface-2)}
.navlist a.on{background:var(--g100);color:var(--g800)}
:root[data-theme="dark"] .navlist a.on{color:var(--g300)}
.navlist a .ic{width:19px;height:19px;color:var(--muted)}
.navlist a.on .ic{color:var(--accent)}
.navlist .cnt{margin-left:auto;font-size:11.5px;background:var(--danger);color:#fff;border-radius:999px;padding:1px 7px}
.mini-list{padding:4px 8px 10px}
.mini-list a{display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:10px;font-size:13.5px;font-weight:500}
.mini-list a:hover{background:var(--surface-2)}
.mini-list img{width:28px;height:28px;border-radius:8px;object-fit:cover}

/* Preview banner */
.preview-bar{background:linear-gradient(90deg,var(--g900),var(--g700));color:#e5f7e7;border-radius:14px;padding:10px 14px;font-size:13px;display:flex;gap:10px;align-items:center}
.preview-bar .ic{color:var(--lime);width:18px;height:18px}
.preview-bar button{margin-left:auto;color:#fff;opacity:.8}

/* Stories */
.stories{display:flex;gap:10px;overflow-x:auto;padding:14px;scrollbar-width:none;scroll-snap-type:x mandatory}
.stories::-webkit-scrollbar{display:none}
.story{flex:none;width:112px;height:190px;border-radius:14px;overflow:hidden;position:relative;cursor:pointer;scroll-snap-align:start;background:var(--surface-2);transition:transform .2s}
.story:hover{transform:translateY(-2px)}
.story img.bg{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.story:hover img.bg{transform:scale(1.05)}
.story::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.25),transparent 35%,transparent 55%,rgba(0,0,0,.7))}
.story .av{position:absolute;top:8px;left:8px;z-index:1;box-shadow:0 0 0 3px var(--g500)}
.story.seen .av{box-shadow:0 0 0 3px rgba(255,255,255,.6)}
.story .nm{position:absolute;left:8px;right:8px;bottom:8px;color:#fff;font-size:12px;font-weight:650;z-index:1;line-height:1.25}
.story.add{background:var(--surface);border:1px solid var(--line)}
.story.add::after{display:none}
.story.add .top{height:120px;overflow:hidden}
.story.add .top img{width:100%;height:100%;object-fit:cover}
.story.add .plus{position:absolute;left:50%;top:120px;transform:translate(-50%,-50%);width:36px;height:36px;border-radius:50%;background:var(--g600);color:#fff;display:grid;place-items:center;border:3px solid var(--surface)}
.story.add .nm{color:var(--ink);text-align:center;bottom:14px}
.story-viewer{position:fixed;inset:0;background:#050b07;z-index:1200;display:none;align-items:center;justify-content:center}
.story-viewer.open{display:flex}
.sv-card{position:relative;width:min(420px,100vw);height:min(760px,100vh);border-radius:18px;overflow:hidden;background:#111}
.sv-card img{width:100%;height:100%;object-fit:cover}
.sv-bars{position:absolute;top:10px;left:10px;right:10px;display:flex;gap:4px;z-index:2}
.sv-bars i{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);overflow:hidden}
.sv-bars i b{display:block;height:100%;width:0;background:#fff}
.sv-head{position:absolute;top:22px;left:12px;right:12px;display:flex;align-items:center;gap:10px;color:#fff;z-index:2}
.sv-head .x{margin-left:auto;color:#fff}
.sv-cap{position:absolute;left:0;right:0;bottom:70px;padding:0 22px;color:#fff;font-size:20px;font-weight:650;font-family:var(--font-display);text-shadow:0 2px 12px rgba(0,0,0,.6);text-align:center;z-index:2}
.sv-reply{position:absolute;left:12px;right:12px;bottom:14px;display:flex;gap:8px;z-index:2}
.sv-reply input{flex:1;height:42px;border-radius:999px;border:1px solid rgba(255,255,255,.5);background:rgba(0,0,0,.3);color:#fff;padding:0 16px}
.sv-reply input::placeholder{color:rgba(255,255,255,.7)}
.sv-nav{position:absolute;top:0;bottom:0;width:35%;z-index:1}
.sv-nav.l{left:0}.sv-nav.r{right:0}
.sv-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.45),transparent 20%,transparent 65%,rgba(0,0,0,.6));pointer-events:none}

/* Composer */
.composer{padding:14px 16px}
.composer .row1{display:flex;gap:12px;align-items:center}
.composer .fake{flex:1;height:48px;border-radius:999px;border:1px solid var(--line-2);text-align:left;padding:0 18px;color:var(--muted);font-weight:500;transition:background .15s}
.composer .fake:hover{background:var(--surface-2)}
.composer .acts{display:flex;justify-content:space-around;margin-top:10px;flex-wrap:wrap}
.composer .acts button{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:10px;font-size:14px;font-weight:600;color:var(--muted)}
.composer .acts button:hover{background:var(--surface-2)}
.c-photo{color:#2b7bd6!important}.c-video{color:#16a34a!important}.c-event{color:#d97706!important}.c-action{color:#15803d!important}.c-poll{color:#7c3aed!important}.c-article{color:#dc2626!important}
.compose-ta{width:100%;border:0;resize:none;min-height:130px;font-size:17px;line-height:1.5;background:transparent;padding:4px 0}
.compose-ta:focus{outline:none}
.compose-tools{display:flex;gap:6px;flex-wrap:wrap;align-items:center;border:1px solid var(--line);border-radius:14px;padding:8px 10px;margin-top:10px}
.compose-tools .icon-btn{width:36px;height:36px}
.aud-sel{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--line-2);border-radius:999px;font-size:12.5px;font-weight:650;background:var(--surface)}
.aud-sel .ic{width:15px;height:15px}
.attach-prev{position:relative;margin-top:10px;border-radius:14px;overflow:hidden;border:1px solid var(--line)}
.attach-prev img,.attach-prev video{width:100%;max-height:360px;object-fit:cover}
.attach-prev .rm{position:absolute;top:8px;right:8px;background:rgba(0,0,0,.6);color:#fff}
.gallery-pick{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px}
.gallery-pick img{aspect-ratio:1;object-fit:cover;border-radius:10px;cursor:pointer;border:2px solid transparent}
.gallery-pick img:hover,.gallery-pick img.on{border-color:var(--g500)}
.poll-edit input{margin-bottom:8px}
.chip{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);font-size:13.5px;font-weight:600;background:var(--surface);color:var(--ink-2);transition:all .15s;white-space:nowrap}
.chip:hover{border-color:var(--g600);color:var(--accent)}
.chip.on{background:var(--g800);border-color:var(--g800);color:#fff}
:root[data-theme="dark"] .chip.on{background:var(--g600);border-color:var(--g600);color:#04170b}
.chip .ic{width:16px;height:16px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chips.scroll{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.feed-tabs{display:flex;gap:6px;align-items:center}
.feed-tabs .sort{margin-left:auto;font-size:12.5px;color:var(--muted)}

/* Post */
.post{overflow:visible}
.post-head{display:flex;gap:12px;padding:14px 16px 6px;align-items:flex-start}
.post-head .who{flex:1;min-width:0}
.post-head .nm{font-weight:650;font-size:14.5px}
.post-head .nm:hover{color:var(--accent);text-decoration:underline}
.post-head .hl{font-size:12.5px;color:var(--muted);line-height:1.35}
.post-head .meta{font-size:12px;color:var(--faint);display:flex;align-items:center;gap:4px}
.post-head .meta .ic{width:13px;height:13px}
.follow-inline{color:var(--accent);font-weight:650;font-size:13.5px;display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:8px}
.follow-inline:hover{background:var(--g50)}
.post-ctx{font-size:12.5px;color:var(--muted);padding:10px 16px 0;display:flex;align-items:center;gap:6px}
.post-ctx .ic{width:15px;height:15px}
.post-body{padding:4px 16px 12px;font-size:14.5px;white-space:pre-wrap;word-wrap:break-word}
.post-body .tag-link{color:var(--accent);font-weight:600}
.post-body .more{color:var(--muted);font-weight:600}
.post-media{background:var(--surface-2);cursor:zoom-in}
.post-media img,.post-media video{width:100%;max-height:560px;object-fit:cover}
.media-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px}
.media-grid img{aspect-ratio:1;object-fit:cover;height:100%}
.action-badge{margin:0 16px 12px;border-radius:14px;padding:12px 14px;background:linear-gradient(120deg,var(--g50),color-mix(in srgb,var(--lime) 18%,var(--surface)));border:1px solid var(--g100);display:flex;align-items:center;gap:12px}
.action-badge .ai{width:42px;height:42px;border-radius:12px;background:var(--g700);color:#fff;display:grid;place-items:center;font-size:20px}
.action-badge b{font-size:15px}
.action-badge .pts{margin-left:auto;font-weight:750;color:var(--g700);font-family:var(--font-display)}
.embed{margin:0 16px 12px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.embed .post-head{padding-top:12px}
.event-embed{margin:0 16px 12px;border:1px solid var(--line);border-radius:14px;overflow:hidden;display:block}
.event-embed img{height:180px;width:100%;object-fit:cover}
.event-embed .in{padding:12px 14px;display:flex;gap:12px;align-items:center}
.article-card{margin:0 16px 12px;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.article-card img{width:100%;height:220px;object-fit:cover}
.article-card .in{padding:14px}
.article-card h4{font-size:18px;margin-bottom:4px}
.poll{margin:0 16px 12px;border:1px solid var(--line);border-radius:14px;padding:14px}
.poll h5{font-size:15px;margin:0 0 10px;font-family:var(--font-display)}
.poll-opt{position:relative;display:block;width:100%;text-align:left;border:1.5px solid var(--g600);border-radius:999px;padding:9px 16px;margin-bottom:8px;font-weight:600;color:var(--accent);overflow:hidden;transition:background .15s}
.poll-opt:hover{background:var(--g50)}
.poll-opt.res{border-color:var(--line);color:var(--ink);border-radius:10px;cursor:default}
.poll-opt.res .bar{position:absolute;inset:0 auto 0 0;background:var(--g100);z-index:0;transition:width .6s ease}
.poll-opt.res.mine .bar{background:color-mix(in srgb,var(--g500) 35%,var(--surface))}
.poll-opt.res span{position:relative;z-index:1;display:flex;justify-content:space-between}
.post-stats{display:flex;align-items:center;gap:8px;padding:6px 16px 8px;font-size:12.5px;color:var(--muted)}
.post-stats .emj{display:inline-flex}
.post-stats .emj i{font-style:normal;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--surface);border:1.5px solid var(--surface);margin-left:-5px;font-size:12px;box-shadow:0 0 0 1px var(--line)}
.post-stats .emj i:first-child{margin-left:0}
.post-stats button:hover{color:var(--accent);text-decoration:underline}
.post-actions{display:grid;grid-template-columns:repeat(4,1fr);padding:4px 8px;border-top:1px solid var(--line);position:relative}
.post-actions>button,.post-actions .react-wrap>button{display:flex;align-items:center;justify-content:center;gap:7px;height:42px;border-radius:10px;font-weight:600;font-size:14px;color:var(--muted);width:100%;transition:background .15s,color .15s}
.post-actions>button:hover,.post-actions .react-wrap>button:hover{background:var(--surface-2);color:var(--ink)}
.post-actions .ic{width:19px;height:19px}
.post-actions .reacted{color:var(--g600)}
.post-actions .reacted.love{color:var(--love)}
.post-actions .reacted.celebrate{color:#d97706}
.post-actions .reacted.insightful{color:#ca8a04}
.post-actions .reacted.support{color:#7c3aed}
.post-actions .reacted .emo{font-size:18px}
.react-wrap{position:relative}
.react-pick{position:absolute;bottom:46px;left:0;background:var(--surface);border:1px solid var(--line);border-radius:999px;box-shadow:var(--shadow-3);padding:6px 8px;display:flex;gap:2px;opacity:0;visibility:hidden;transform:translateY(8px) scale(.95);transition:all .18s ease;z-index:20}
.react-wrap:hover .react-pick,.react-pick.open{opacity:1;visibility:visible;transform:none;transition-delay:.35s}
.react-pick.open{transition-delay:0s}
.react-pick button{width:42px;height:42px;font-size:26px;border-radius:50%;display:grid;place-items:center;transition:transform .15s;position:relative}
.react-pick button:hover{transform:scale(1.3) translateY(-4px)}
.react-pick button::after{content:attr(data-label);position:absolute;bottom:50px;left:50%;transform:translateX(-50%);background:var(--g950);color:#fff;font-size:11px;padding:3px 8px;border-radius:999px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}
.react-pick button:hover::after{opacity:1}
@media (max-width:560px){.post-actions>button span.t,.post-actions .react-wrap>button span.t{display:none}}

/* Comments */
.comments{padding:6px 16px 14px;border-top:1px solid var(--line)}
.c-new{display:flex;gap:10px;align-items:flex-start;margin:10px 0 12px}
.c-input{flex:1;display:flex;align-items:center;border:1px solid var(--line-2);border-radius:22px;padding:0 6px 0 14px;background:var(--surface)}
.c-input input{flex:1;height:40px;border:0;background:transparent;font-size:14px}
.c-input input:focus{outline:none}
.comment{display:flex;gap:10px;margin-bottom:10px}
.comment .bub{background:var(--surface-2);border-radius:4px 16px 16px 16px;padding:9px 12px;font-size:14px}
.comment .bub b{font-size:13.5px}
.comment .bub .hl{font-size:11.5px;color:var(--muted);margin-bottom:3px}
.comment .ca{display:flex;gap:12px;font-size:12px;color:var(--muted);font-weight:600;padding:4px 10px}
.comment .ca button:hover{color:var(--accent)}
.comment .ca .liked{color:var(--g600)}
.comment .replies{margin-top:8px}

/* Menu popover */
.pop{position:absolute;right:10px;top:46px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-3);padding:6px;min-width:240px;z-index:40;animation:pop .15s ease}
.post{position:relative}

/* Right rail widgets */
.countdown{background:linear-gradient(140deg,var(--g800),var(--g950));color:#e8f6e9;border:0;overflow:hidden;position:relative}

.countdown h3{color:#fff}
.cd-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:12px 0}
.cd-grid div{background:rgba(255,255,255,.08);border-radius:10px;padding:8px 4px;text-align:center}
.cd-grid b{display:block;font-family:var(--font-display);font-size:22px;color:var(--lime)}
.cd-grid small{font-size:10.5px;text-transform:uppercase;letter-spacing:.08em;color:#b8d4bd}
.trend{display:block;padding:8px 18px}
.trend:hover{background:var(--surface-2)}
.trend b{font-size:14px}
.trend small{display:block;color:var(--muted);font-size:12px}
.sugg{display:flex;gap:10px;align-items:flex-start;padding:8px 18px}
.sugg .nm{font-weight:650;font-size:14px}
.sugg .hl{font-size:12.5px;color:var(--muted);line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.mini-footer{font-size:12px;color:var(--faint);display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:center;padding:4px 10px}
.mini-footer a:hover{color:var(--accent)}

/* Cards grid */
.grid{display:grid;gap:14px}
.grid.c2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.c3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.c4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1180px){.grid.c4{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:980px){.grid.c3,.grid.c4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.grid.c2,.grid.c3,.grid.c4{grid-template-columns:minmax(0,1fr)}}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;transition:transform .2s,box-shadow .2s}
.tile:hover{transform:translateY(-3px);box-shadow:var(--shadow-2)}
.tile .cv{height:120px;object-fit:cover;width:100%}
.tile .bd{padding:14px 16px;flex:1;display:flex;flex-direction:column;gap:6px}
.tile h4{font-size:15.5px;letter-spacing:-.01em}
.tile .ft{padding:0 16px 16px}
.person-tile{text-align:center}
.person-tile .cv{height:62px;background:linear-gradient(120deg,var(--g700),var(--lime))}
.person-tile .av{margin:-34px auto 0;border:3px solid var(--surface)}
.person-tile .x{position:absolute;right:8px;top:8px;background:rgba(0,0,0,.35);color:#fff;width:28px;height:28px}
.person-tile{position:relative}

/* Tabs */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);padding:0 8px;overflow-x:auto;scrollbar-width:none}
.tabs button,.tabs a{padding:14px 14px;font-weight:600;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}
.tabs .on{color:var(--accent);border-bottom-color:var(--accent)}
.tabs button:hover,.tabs a:hover{color:var(--ink)}

/* Profile */
.prof-cover{height:220px;background:var(--g800) center/cover;border-radius:var(--radius) var(--radius) 0 0;position:relative}
.prof-cover .edit-cv{position:absolute;right:14px;top:14px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-2)}
.prof-main{padding:0 24px 20px;position:relative}
.prof-main .av{margin-top:-80px;border:4px solid var(--surface);box-shadow:var(--shadow-2)}
.prof-main h1{font-size:26px;margin-top:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.prof-main .hl{font-size:16px;color:var(--ink-2);margin-top:4px}
.prof-main .loc{font-size:13.5px;color:var(--muted);margin-top:6px}
.prof-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.prof-edit{position:absolute;right:16px;top:14px}
.open-to{margin-top:14px;background:var(--g50);border:1px solid var(--g100);border-radius:12px;padding:12px 14px;font-size:13.5px;max-width:360px}
.open-to b{display:block}
.sect{padding:20px 24px}
.sect+.sect{border-top:1px solid var(--line)}
.sect h3{font-size:19px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between}
.exp{display:flex;gap:14px;padding:12px 0}
.exp+.exp{border-top:1px solid var(--line)}
.exp .lg{width:48px;height:48px;border-radius:10px;background:var(--g100);color:var(--g700);display:grid;place-items:center;flex:none}
.exp h4{font-size:15px}
.exp p{font-size:13.5px;color:var(--muted)}
.skill{display:flex;align-items:center;justify-content:space-between;padding:12px 0;gap:12px}
.skill+.skill{border-top:1px solid var(--line)}
.skill b{font-size:15px}
.skill small{display:flex;align-items:center;gap:6px;color:var(--muted);margin-top:2px}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px}
.bdg{text-align:center;padding:14px 8px;border-radius:14px;background:var(--surface-2);border:1px solid var(--line)}
.bdg .e{font-size:30px;line-height:1}
.bdg b{display:block;font-size:12.5px;margin-top:6px;line-height:1.25}
.bdg small{font-size:11px;color:var(--muted)}
.bdg.locked{opacity:.45;filter:grayscale(1)}
.ring{--p:60;width:120px;height:120px;border-radius:50%;background:conic-gradient(var(--g500) calc(var(--p)*1%),var(--line) 0);display:grid;place-items:center}
.ring>div{width:96px;height:96px;border-radius:50%;background:var(--surface);display:grid;place-items:center;text-align:center}
.ring b{font-family:var(--font-display);font-size:26px;display:block;line-height:1}
.ring small{font-size:11px;color:var(--muted)}
.progress{height:8px;border-radius:999px;background:var(--surface-2);overflow:hidden}
.progress>i{display:block;height:100%;background:linear-gradient(90deg,var(--g600),var(--lime));border-radius:999px;transition:width .5s ease}
.kpi{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.kpi .k{background:var(--surface-2);border-radius:14px;padding:14px}
.kpi .k b{font-family:var(--font-display);font-size:24px;display:block}
.kpi .k small{color:var(--muted);font-size:12.5px}
@media (max-width:640px){.kpi{grid-template-columns:1fr 1fr}.prof-cover{height:140px}.prof-main .av{width:110px;height:110px;margin-top:-60px}}

/* Group / page header */
.g-head .cv{height:200px;width:100%;object-fit:cover;border-radius:var(--radius) var(--radius) 0 0}
.g-head .in{padding:18px 22px;display:flex;gap:16px;align-items:flex-end;flex-wrap:wrap}
.g-head h1{font-size:24px}

/* Events */
.ev-date{width:56px;flex:none;text-align:center;border-radius:12px;border:1px solid var(--line);overflow:hidden;background:var(--surface)}
.ev-date small{display:block;background:var(--danger);color:#fff;font-size:11px;font-weight:700;letter-spacing:.08em;padding:2px 0}
.ev-date b{display:block;font-family:var(--font-display);font-size:22px;padding:4px 0}
.ev-tile .cv{height:150px}
.ev-tile .when{color:var(--danger);font-weight:700;font-size:12.5px;text-transform:uppercase;letter-spacing:.04em}
.kind{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;padding:3px 9px;border-radius:999px;background:var(--surface-2);color:var(--ink-2)}
.kind .ic{width:13px;height:13px}
.kind.g{background:var(--g100);color:var(--g800)}
:root[data-theme="dark"] .kind.g{color:var(--g300)}

/* Jobs */
.jobs-layout{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.25fr);gap:0;overflow:hidden;min-height:640px}
.job-list{border-right:1px solid var(--line);max-height:calc(100vh - 220px);overflow:auto}
.job-item{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);cursor:pointer;position:relative;border-left:3px solid transparent}
.job-item:hover{background:var(--surface-2)}
.job-item.on{background:var(--g50);border-left-color:var(--g600)}
.job-item h4{font-size:15px;color:var(--accent)}
.job-item p{font-size:13px}
.job-detail{padding:24px;max-height:calc(100vh - 220px);overflow:auto}
.job-detail h2{font-size:23px;margin:10px 0 6px}
.job-detail .desc{font-size:14.5px;color:var(--ink-2);white-space:pre-line}
.job-detail ul{padding-left:18px;color:var(--ink-2);font-size:14.5px}
.status-pill{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;color:var(--g700);background:var(--g100);padding:3px 9px;border-radius:999px}
.status-pill .ic{width:13px;height:13px}
@media (max-width:860px){.jobs-layout{grid-template-columns:1fr}.job-detail{display:none}.jobs-layout.show-d .job-list{display:none}.jobs-layout.show-d .job-detail{display:block}}

/* Learning */
.course .cv{height:140px}
.course .prov{font-size:12px;color:var(--muted)}
.lesson{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.lesson .chk{width:26px;height:26px;border-radius:50%;border:2px solid var(--line-2);display:grid;place-items:center;flex:none;color:transparent}
.lesson.done .chk{background:var(--g600);border-color:var(--g600);color:#fff}
.lesson .chk .ic{width:15px;height:15px}
.paper{display:flex;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line)}
.paper .ic-b{width:44px;height:56px;border-radius:6px;background:linear-gradient(160deg,var(--g700),var(--g900));color:#fff;display:grid;place-items:center;flex:none}

/* Projects */
.proj .cv{height:160px}
.sdg{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:6px;color:#fff;font-size:11px;font-weight:800;font-family:var(--font-display)}
.vote{display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid var(--line-2);border-radius:12px;width:56px;height:56px;font-weight:750;font-size:14px;flex:none}
.vote .ic{width:18px;height:18px}
.vote.on{background:var(--g700);color:#fff;border-color:var(--g700)}

/* Messages */
.msg-layout{display:grid;grid-template-columns:340px minmax(0,1fr);height:calc(100vh - 110px);overflow:hidden}
.conv-list{border-right:1px solid var(--line);overflow:auto}
.conv{display:flex;gap:12px;padding:12px 16px;cursor:pointer;border-left:3px solid transparent}
.conv:hover{background:var(--surface-2)}
.conv.on{background:var(--g50);border-left-color:var(--g600)}
.conv .nm{font-weight:650;font-size:14px}
.conv .pv{font-size:13px;color:var(--muted)}
.conv.unread .pv{color:var(--ink);font-weight:650}
.thread{display:flex;flex-direction:column;min-height:0}
.thread-head{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.thread-body{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:6px;background:linear-gradient(180deg,var(--surface),var(--bg))}
.bubble{max-width:72%;padding:9px 14px;border-radius:18px;font-size:14.5px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.bubble.them{background:var(--surface-2);align-self:flex-start;border-bottom-left-radius:6px}
.bubble.me{background:linear-gradient(135deg,var(--g600),var(--g800));color:#fff;align-self:flex-end;border-bottom-right-radius:6px}
.bubble a{text-decoration:underline}
.msg-time{align-self:center;font-size:11.5px;color:var(--faint);margin:10px 0 4px}
.typing{align-self:flex-start;background:var(--surface-2);border-radius:18px;padding:12px 14px;display:flex;gap:4px}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--faint);animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.thread-foot{display:flex;gap:8px;padding:12px 14px;border-top:1px solid var(--line);align-items:flex-end}
.thread-foot textarea{flex:1;resize:none;border:1px solid var(--line-2);border-radius:20px;padding:10px 16px;max-height:120px;height:42px;background:var(--surface)}
.thread-foot textarea:focus{outline:none;border-color:var(--g500)}
.quick{display:flex;gap:6px;padding:0 14px 10px;flex-wrap:wrap}
.quick button{font-size:12.5px;border:1px solid var(--line-2);border-radius:999px;padding:5px 12px;color:var(--accent);font-weight:600}
.quick button:hover{background:var(--g50)}
@media (max-width:860px){.msg-layout{grid-template-columns:1fr;height:calc(100vh - 150px)}.msg-layout .thread{display:none}.msg-layout.show-t .conv-list{display:none}.msg-layout.show-t .thread{display:flex}}

/* Notifications */
.notif{display:flex;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line);cursor:pointer;position:relative}
.notif:hover{background:var(--surface-2)}
.notif.unread{background:color-mix(in srgb,var(--g100) 55%,var(--surface))}
.notif.unread::before{content:"";position:absolute;left:6px;top:50%;width:7px;height:7px;border-radius:50%;background:var(--g600);transform:translateY(-50%)}
.notif .ni{position:absolute;left:44px;top:40px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#fff;border:2px solid var(--surface)}
.notif .ni .ic{width:12px;height:12px}
.notif p{font-size:14px}

/* Leaderboard */
.lb{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.lb .rk{width:28px;font-family:var(--font-display);font-weight:800;color:var(--faint);text-align:center}
.lb.top .rk{color:var(--warn)}
.lb.me{background:var(--g50)}
.commit-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.commit-row .n{width:34px;height:34px;border-radius:10px;background:var(--g100);color:var(--g800);font-weight:800;display:grid;place-items:center;font-family:var(--font-display);font-size:13px}

/* Mobile bottom nav */
.bottom-nav{display:none;position:fixed;bottom:0;left:0;right:0;height:62px;background:var(--surface);border-top:1px solid var(--line);z-index:100;grid-template-columns:repeat(5,1fr)}
.bottom-nav a,.bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:600;color:var(--muted);position:relative}
.bottom-nav .on{color:var(--accent)}
.bottom-nav .plus{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,var(--g500),var(--g800));color:#fff;display:grid;place-items:center;margin:auto}
.bottom-nav .badge{top:4px}
@media (max-width:860px){.bottom-nav{display:grid}}

/* Lightbox */
.lightbox{position:fixed;inset:0;background:rgba(3,10,6,.92);z-index:1200;display:none;align-items:center;justify-content:center;padding:20px;cursor:zoom-out}
.lightbox.open{display:flex}
.lightbox img{max-width:100%;max-height:100%;border-radius:10px}

/* Empty */
.empty{text-align:center;padding:48px 24px;color:var(--muted)}
.empty .e{font-size:44px;margin-bottom:10px}
.empty h3{color:var(--ink);margin-bottom:6px}

/* Onboarding */
.onb{max-width:760px;margin:0 auto}
.onb .hero{padding:32px;text-align:center;background:linear-gradient(150deg,var(--g800),var(--g950));color:#e8f6e9;border-radius:var(--radius) var(--radius) 0 0}
.onb .hero h1{color:#fff;font-size:30px;margin:10px 0 6px}
.topic-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.topic{border:1.5px solid var(--line-2);border-radius:14px;padding:14px;text-align:left;display:flex;gap:10px;align-items:center;font-weight:600;font-size:14px;transition:all .15s}
.topic .e{font-size:22px}
.topic.on{border-color:var(--g600);background:var(--g50);color:var(--g800)}
:root[data-theme="dark"] .topic.on{color:var(--g300)}
.switch{position:relative;width:42px;height:24px;border-radius:999px;background:var(--line-2);flex:none;transition:background .2s}
.switch::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .2s}
.switch.on{background:var(--g600)}
.switch.on::after{transform:translateX(18px)}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}
.set-row b{font-size:14.5px;display:block}
.set-row small{color:var(--muted)}
.av.org img[src*="gycan-avatar"]{padding:3%}
/* Larger GreenBook logo in platform top bar */
.topbar .brand img{height:40px}
.topbar .brand{font-size:23px;gap:10px}
@media (max-width:760px){.topbar .brand img{height:34px}}
.av.org{background:#fff}
.av.org img{padding:6%}
.post-video{position:relative;background:#06240f}
.post-video video{width:100%;max-height:560px;object-fit:cover;display:block}
.pv-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;border-radius:50%;background:rgba(255,255,255,.92);color:var(--g800);display:grid;place-items:center;box-shadow:0 8px 24px rgba(0,0,0,.3);transition:transform .2s}
.pv-play:hover{transform:translate(-50%,-50%) scale(1.08)}
.pv-play .ic{width:28px;height:28px;margin-left:3px}
.pv-tag{position:absolute;left:12px;top:12px;display:inline-flex;align-items:center;gap:6px;background:rgba(6,36,15,.65);color:#fff;font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;backdrop-filter:blur(6px)}
.pv-tag .ic{width:14px;height:14px}
.topnav .lang-switch{margin:0 8px}
[dir="rtl"] .dropdown{right:auto;left:0}
[dir="rtl"] .search .ic{left:auto;right:12px}
[dir="rtl"] .search input{padding:0 38px 0 14px}
[dir="rtl"] .badge{left:auto;right:calc(50% + 4px)}
[dir="rtl"] .pop{right:auto;left:10px}
[dir="rtl"] .react-pick{left:auto;right:0}
[dir="rtl"] .job-item{border-left:0;border-right:3px solid transparent}[dir="rtl"] .job-item.on{border-right-color:var(--g600)}
[dir="rtl"] .conv{border-left:0;border-right:3px solid transparent}[dir="rtl"] .conv.on{border-right-color:var(--g600)}
[dir="rtl"] .job-list{border-right:0;border-left:1px solid var(--line)}
[dir="rtl"] .conv-list{border-right:0;border-left:1px solid var(--line)}
[dir="rtl"] .notif .ni{left:auto;right:44px}
[dir="rtl"] .notif.unread::before{left:auto;right:6px}
[dir="rtl"] .bubble.them{border-bottom-left-radius:18px;border-bottom-right-radius:6px}
[dir="rtl"] .bubble.me{border-bottom-right-radius:18px;border-bottom-left-radius:6px}
[dir="rtl"] .prof-edit{right:auto;left:16px}
[dir="rtl"] .prof-cover .edit-cv{right:auto;left:14px}
[dir="rtl"] .person-tile .x{right:auto;left:8px}
[dir="rtl"] .pv-tag{left:auto;right:12px}
[dir="rtl"] .switch::after{left:auto;right:3px}[dir="rtl"] .switch.on::after{transform:translateX(-18px)}
[dir="rtl"] .poll-opt.res .bar{inset:0 0 0 auto}
/* Small phones (≤420px) */
@media (max-width:420px){
  .topbar .app-wrap{gap:8px;width:calc(100% - 16px)}
  .topbar .brand img{height:30px}
  .search{flex:1 1 auto;min-width:0}
  .search input{padding-inline-end:8px;font-size:13.5px}
  .topnav{flex:none}
  .topnav a,.topnav button{min-width:40px;padding:0 4px}
  .topnav .lang-switch{margin:0 2px}
  .topnav .lang-btn{padding:0 7px;gap:4px}
  .me-btn .lbl{display:none}
}
.stack .btn,.panel .btn-block{white-space:normal;height:auto;min-height:42px;padding-top:8px;padding-bottom:8px;text-align:center;line-height:1.3}
@media (max-width:560px){.btn{white-space:normal;height:auto;min-height:40px;line-height:1.3}.btn-sm{min-height:34px}}
/* Language button inside the platform top bar keeps its pill shape */
.topnav .lang-btn{flex-direction:row;min-width:0;height:36px;padding:0 10px;border:1px solid var(--line-2);border-radius:999px;font-size:13px;color:var(--ink-2)}
.topnav .lang-btn:hover{color:var(--g700);border-color:var(--g600)}
.topnav .lang-menu button{flex-direction:row;min-width:0;border-bottom:0;font-size:14.5px;color:var(--ink);height:auto}
@media (max-width:1100px){.topbar .brand>span{display:none}.search{flex:1 1 180px;min-width:120px}}
@media (max-width:420px){.topnav .lang-btn{height:32px;padding:0 7px}.topnav .lang-btn .chev{display:none}}
