/* Browsing interface overrides. Post/profile custom styles stay in their existing boundaries. */
:root{--browse-duration:240ms}
.app-shell{max-width:1440px;grid-template-columns:230px minmax(0,760px) minmax(250px,320px)}
#main{min-width:0}
.sidebar{padding:28px 20px 20px}.rightbar{padding:28px 22px}
.main-header{height:auto;min-height:104px;padding:24px 28px 0;gap:16px}
.main-header h1{font-size:23px;line-height:1.2}.main-header .tabs{gap:24px}
.site-theme-toggle{font:inherit;font-size:12px;white-space:nowrap}
.home-compose{margin:20px 24px 4px;padding:16px;display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.home-compose>.avatar{width:38px;height:38px;flex-shrink:0}.home-compose>svg{width:24px;height:24px;color:var(--muted)}
.compose-prompt{flex:1;text-align:left;line-height:1.5;color:var(--muted);font-size:14px;padding:8px 0}
.compose-open{font-size:12px;white-space:nowrap;padding:10px 12px;gap:6px}.compose-open svg{width:16px;height:16px}
[data-destination="home"] .timeline{padding:18px 24px 0}
[data-destination="home"] .timeline .post-wrap{margin:0}
[data-destination="home"] .feed-entry{margin-bottom:20px}
[data-destination="home"] .post-viewer{border-radius:16px;max-width:100%;min-width:0}
[data-destination="home"] .compact-post .post-head{padding:18px 18px 12px;min-height:0}
[data-destination="home"] .post-head .avatar{width:42px;height:42px;flex-shrink:0}
[data-destination="home"] .post-identity strong{font-size:15px}[data-destination="home"] .post-identity small{font-size:12px}
[data-destination="home"] .post-navigation{margin:0 18px 10px;font-size:11px}
[data-destination="home"] .compact-post .post-body{padding:0 18px 10px;font-size:16px;line-height:1.65}
[data-destination="home"] .compact-post .post-body h2{font-size:20px;line-height:1.4;letter-spacing:-.3px}
.viewer-content{max-width:100%;min-width:0;overflow-wrap:anywhere}.studio-section{max-width:100%;overflow-wrap:anywhere}
[data-destination="home"] .social-image img{max-height:620px;object-fit:contain}
[data-destination="home"] .timeline .post-actions{padding:10px 18px 16px;gap:18px!important;min-height:48px}
.post-actions button{min-height:32px;flex-shrink:0}.post-actions button:focus-visible,.nav-item:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.post-actions .post-time{font-size:11px}.post-actions .post-explore-link span{font-size:11px}
.post-menu{position:relative;z-index:3}.feed-profile-preview{margin:20px 24px 0}.social-feed-toolbar{padding:14px 24px 0}
@media(max-width:1200px){.app-shell{grid-template-columns:200px minmax(0,720px) 270px}.sidebar{padding:24px 14px}.rightbar{padding:24px 16px}}
@media(max-width:1050px){.app-shell{grid-template-columns:200px minmax(0,760px);max-width:960px}.rightbar{display:none}}
@media(max-width:700px){
 .app-shell{display:block;max-width:none}.main-header{padding:20px 16px 0;min-height:96px}.main-header h1{font-size:22px}
 [data-destination="home"] .timeline{padding:16px 12px 0}.feed-profile-preview{margin:16px 12px 0}.social-feed-toolbar{padding:12px 14px 0}
 .home-compose{margin:16px 12px 0;padding:12px;gap:10px}.compose-open span{display:none}.compose-prompt{font-size:13px}.home-compose>.avatar{width:32px;height:32px}
 [data-destination="home"] .compact-post .post-head{padding:16px 14px 10px}[data-destination="home"] .post-navigation{margin:0 14px 8px}
 [data-destination="home"] .compact-post .post-body{padding:0 14px 8px;font-size:15px}[data-destination="home"] .compact-post .post-body h2{font-size:19px}
 [data-destination="home"] .timeline .post-actions{padding:8px 14px 12px;gap:14px!important}.post-actions .post-time{font-size:10px}.post-actions .post-explore-link span{display:none}
}
@media(max-width:380px){[data-destination="home"] .timeline .post-actions{gap:11px!important}.post-actions svg{width:16px;height:16px}.post-actions .post-time{max-width:40px;overflow:hidden}}
@media(prefers-reduced-motion:reduce){:root{--browse-duration:0ms}}

/* Explore keeps its shell and controls fixed while only the post body moves. */
[data-destination="explore"]{overflow:hidden}
[data-destination="explore"] body{padding-bottom:0;height:100dvh}
[data-destination="explore"] .app-shell{grid-template-columns:230px minmax(0,1fr);height:100dvh;min-height:0}
[data-destination="explore"] .rightbar{display:none}
[data-destination="explore"] #main{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.explore-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 28px;border-bottom:1px solid var(--line);min-height:82px}
.explore-header h1{margin:0 0 4px;font-size:23px;letter-spacing:-.5px}.explore-header>div>span{font-size:12px;color:var(--muted)}
.explore-header-actions{display:flex;gap:8px;align-items:center}.explore-header-actions .icon-btn{width:36px;height:36px;border:1px solid var(--line);border-radius:9px}.explore-header-actions .secondary-btn{margin-left:4px}
.explore-workspace{display:flex;flex-direction:column;min-height:0;flex:1;width:100%;max-width:1000px;margin:auto;padding:20px 28px 12px}
.explore-entry{min-height:0;flex:1;display:flex;flex-direction:column;margin:0!important}
.explore-entry .post-viewer{display:flex;flex-direction:column;min-height:0;flex:1;margin:0;border-radius:18px;overflow:hidden;width:100%}
.explore-entry .post-head{padding:16px 22px 10px;flex-shrink:0;min-height:70px}.explore-entry .post-identity strong{font-size:16px}.explore-entry .post-identity small{font-size:12px}
.explore-entry .post-navigation{flex-shrink:0;padding:0 22px 10px;margin:0;min-height:30px;font-size:11px}
.explore-entry .post-stage{flex:1;min-height:0!important;overflow:hidden}
.explore-entry .viewer-layer{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:12px 24px 20px;font-size:18px;line-height:1.7;touch-action:pan-y;outline-offset:-3px}
.explore-entry .viewer-layer:focus-visible{outline:1px solid var(--accent-border)}
.explore-entry .viewer-content{margin:0 auto;max-width:820px}.explore-entry .viewer-content h2{font-size:clamp(22px,2.2vw,30px);line-height:1.35;letter-spacing:-.6px;margin-bottom:16px}
.explore-entry .viewer-layer[data-kind="text"]{display:flex;align-items:flex-start}
.explore-entry .post-viewer .viewer-layer[data-kind="text"] .viewer-content{margin:auto;max-width:620px;min-width:0;width:100%;font-size:clamp(17px,1.7vw,21px);line-height:1.75}
.explore-entry .viewer-layer[data-kind="text"].is-long-text{display:block}.explore-entry .viewer-layer[data-kind="text"].is-long-text .viewer-content{margin:0 auto;font-size:17px}
.explore-entry .social-image{margin:12px 0 0}.explore-entry .social-image img{max-height:calc(100dvh - 310px);max-width:100%;width:100%;object-fit:contain;border-radius:12px;background:transparent}
.explore-entry .social-media{border:0;padding:0;margin:16px 0 0}.explore-entry .social-media video{max-height:calc(100dvh - 320px);width:100%;object-fit:contain}
.explore-entry .studio-section{margin:14px 0;padding:20px;border-radius:12px;font-size:16px}
.explore-entry .post-actions{flex-shrink:0;padding:10px 22px 14px;border:0;gap:20px!important;min-height:52px;justify-content:flex-start;background:var(--panel)}
.explore-entry .viewer-extras{flex-shrink:0;max-height:85px;overflow:auto;font-size:11px}.explore-entry .viewer-extras:empty{display:none}
.explore-entry .viewer-explanation{margin:8px 6px;font-size:11px}.explore-entry .trail{margin:8px 4px;padding:6px 0}
.explore-entry .connection{padding:6px 0;margin:0;background:transparent;border:0}.explore-entry .connection button,.explore-entry .viewer-trail-toggle{font-size:11px;padding:6px}
.explore-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px 0;min-height:52px;flex-shrink:0}.explore-position{font-size:12px;font-weight:600;white-space:nowrap}.explore-position span{color:var(--muted);font-weight:400}
.explore-control-buttons{display:flex;align-items:center;gap:8px}.explore-control-buttons .icon-btn{height:36px;width:36px;border:1px solid var(--line);border-radius:8px}.explore-control-buttons .secondary-btn{height:36px;font-size:12px;gap:7px}.explore-divider{height:18px;width:1px;background:var(--line);margin:0 3px}
.explore-controls button:disabled{opacity:.35;cursor:default}.explore-hint{font-size:11px;line-height:1.4;color:var(--muted);text-align:center;margin:9px 0 0}
@media(max-width:1050px){[data-destination="explore"] .app-shell{grid-template-columns:200px minmax(0,1fr)}.explore-workspace{padding:16px 18px 10px}}
@media(max-width:700px){
 [data-destination="explore"] .app-shell{display:block;height:auto}
 [data-destination="explore"] #main{height:calc(100dvh - 66px - env(safe-area-inset-bottom,0px))}
 .explore-header{padding:12px 16px;min-height:66px}.explore-header h1{font-size:20px}.explore-header>div>span{display:none}.explore-header-actions{gap:6px}.explore-header-actions .secondary-btn span{display:none}
 .explore-workspace{padding:12px 10px 8px}.explore-entry .post-viewer{border-radius:14px}.explore-entry .post-head{padding:12px 14px 8px;min-height:60px}.explore-entry .post-head .avatar{height:36px;width:36px}.explore-entry .post-navigation{padding:0 14px 8px}
 .explore-entry .viewer-layer{padding:10px 16px 16px;font-size:16px}.explore-entry .viewer-content h2{font-size:22px}.explore-entry .post-viewer .viewer-layer[data-kind="text"] .viewer-content{font-size:18px;line-height:1.65}
 .explore-entry .social-image img,.explore-entry .social-media video{max-height:calc(100dvh - 335px)}
 .explore-entry .post-actions{padding:8px 14px 10px;gap:14px!important;min-height:46px}.explore-entry .post-time{font-size:10px}.explore-entry .viewer-extras{max-height:52px}
 .explore-control-buttons{gap:5px}.explore-control-buttons .icon-btn{width:32px;height:32px}.explore-control-buttons .secondary-btn{height:32px;padding:7px 9px}.explore-position{font-size:11px}.explore-divider{margin:0 1px}.explore-hint{font-size:10px;margin-top:6px}
}
@media(max-width:400px){.explore-controls{gap:6px}.explore-control-buttons .secondary-btn span{display:none}.explore-control-buttons .secondary-btn{width:32px;justify-content:center}.explore-position span{font-size:10px}}
@media(max-height:500px){.explore-header{padding:7px 16px;min-height:44px}.explore-header>div>span,.explore-hint{display:none}.explore-workspace{padding:6px 10px}.explore-entry .post-head{padding:8px 14px 4px;min-height:44px}.explore-entry .post-head .avatar{height:30px;width:30px}.explore-entry .post-navigation{padding-bottom:4px;min-height:22px}.explore-entry .post-actions{padding:4px 14px;min-height:36px}.explore-controls{padding-top:5px;min-height:39px}.explore-entry .social-image img,.explore-entry .social-media video{max-height:calc(100dvh - 210px)}.explore-entry .viewer-layer{padding-top:4px}.explore-entry .viewer-extras{max-height:35px}}

.main-header-tools{display:flex;align-items:center;gap:8px}.mobile-header-control{display:none}
.explore-entry .viewer-layer:is([data-kind="photo"],[data-kind="video"]) .viewer-content{height:100%;display:flex;flex-direction:column;min-height:0;width:100%}
.explore-entry .viewer-layer:is([data-kind="photo"],[data-kind="video"]) .viewer-content>h2,.explore-entry .viewer-layer:is([data-kind="photo"],[data-kind="video"]) .viewer-content>p{flex-shrink:0}
.explore-entry .viewer-layer[data-kind="photo"] .social-image{flex:1;min-height:0;display:flex;flex-direction:column;margin:12px 0 0}
.explore-entry .viewer-layer[data-kind="photo"] .social-image img{flex:1;min-height:0;height:100%;max-height:100%;object-fit:contain}
.explore-entry .viewer-layer[data-kind="photo"] .social-image figcaption{flex-shrink:0}
.explore-entry .viewer-layer[data-kind="video"] .social-media{display:flex;flex-direction:column;flex:1;min-height:0}
.explore-entry .viewer-layer[data-kind="video"] video{height:100%;max-height:100%;min-height:0;flex:1;object-fit:contain}
.browse-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px;height:auto}.browse-menu .secondary-btn{justify-content:flex-start;min-height:44px;font-size:13px;text-align:left}
.browse-preference select{background:var(--panel);color:var(--text);border:1px solid var(--line);padding:10px 12px;border-radius:8px;font:inherit;font-size:13px}.browse-preference select:disabled{opacity:.55}.browse-preference p{max-width:430px}
.sidebar nav{min-height:0;overflow-y:auto;scrollbar-width:thin}.sidebar .nav-item{padding:11px 13px;font-size:14px;gap:13px;margin-bottom:3px}.sidebar .logo{margin-bottom:24px}.sidebar .account-controls{flex-shrink:0;padding-top:14px}
@media(max-width:700px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .sidebar{position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;height:calc(66px + env(safe-area-inset-bottom,0px));padding:0 6px env(safe-area-inset-bottom,0px);z-index:20;background:var(--bg);border-top:1px solid var(--line);border-right:0;display:block;backdrop-filter:blur(12px)}
 .sidebar .logo,.sidebar .create-btn,.sidebar .account-controls{display:none}
 .sidebar #main-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));height:66px;overflow:visible;margin:0;gap:2px;padding:0;align-items:center}
 .sidebar #main-nav .nav-item.mobile-secondary{display:none!important}
 .sidebar #main-nav .nav-item.mobile-primary{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;margin:0;padding:7px 2px;width:100%;height:54px;min-width:0;font-size:10px;border-radius:10px;line-height:1.2}
 .sidebar #main-nav .nav-item.mobile-primary span{display:block!important;font-size:10px}.sidebar #main-nav .nav-item svg{width:21px;height:21px}
 .mobile-header-control{display:flex;align-items:center;justify-content:center;height:32px;width:32px;border:1px solid var(--line);border-radius:8px}.mobile-header-control svg{width:17px;height:17px}.main-header-tools{gap:5px}.main-header .site-theme-toggle{font-size:10px;padding:7px 8px}
 .browse-menu{height:auto!important;grid-template-columns:1fr 1fr}.browse-preference{gap:15px;align-items:flex-start}.browse-preference select{flex-shrink:0;font-size:12px}
}
@media(max-height:650px) and (min-width:701px){.sidebar{padding-top:15px;padding-bottom:12px}.sidebar .logo{margin-bottom:12px}.sidebar .account-controls{padding-top:10px}.sidebar .nav-item{padding:8px 12px;margin:1px 0}.account-signout{padding-top:8px}}

.post-header-time{display:none}.post-actions button{min-width:28px;min-height:40px;justify-content:center}
@media(max-width:420px){.post-header-time{display:inline;color:var(--muted);font-size:10px}.post-actions .post-time{display:none}[data-destination="home"] .timeline .post-actions,.explore-entry .post-actions{gap:8px!important}}
