.feed-view{width:min(100%,470px);margin:0 auto;padding-bottom:48px}
.feed-heading{padding:0 0 18px}
.feed-heading h1{font-size:27px;font-weight:600;letter-spacing:-.7px;line-height:1.25;margin:0 0 24px}
.feed-intro{font-size:14px;color:var(--muted);margin:0 0 23px}
.feed-tabs{display:flex;align-items:stretch;gap:28px;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;max-width:100%}
.feed-tab{position:relative;min-height:46px;background:transparent;border:0;border-radius:0;padding:8px 0 16px;color:var(--muted);font:inherit;font-size:15px;font-weight:400;line-height:21px;cursor:pointer;transition:color .16s ease}
.feed-tab.active{color:var(--text);background:transparent;font-weight:600}
.feed-tab.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:2px;border-radius:1px;background:var(--text)}
.feed-tab:hover{color:var(--text)}
.feed-tab:focus-visible{outline-offset:-2px}
:root:not([data-theme="dark"]) body:has(.feed-view){background:#fff}
.post-card{display:flow-root;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none;margin:0 0 28px;padding:0;overflow:visible}
.post-header{position:relative;z-index:3;display:flex;align-items:center;gap:10px;min-height:56px;padding:0 0 12px;color:var(--text);line-height:1.2}
.post-header::before{content:none}
.post-header button{pointer-events:auto;touch-action:manipulation}
.post-author{display:flex;align-items:center;gap:10px;min-height:44px;color:inherit;background:none;border:0;text-align:left;font:inherit;padding:0;cursor:pointer;min-width:0;flex:1;overflow:visible}
.post-author>.avatar{flex:none;width:36px!important;height:36px!important}
.post-author-text{display:flex;flex:1;flex-direction:column;gap:2px;min-width:0;overflow:hidden}
.post-author-line{display:flex;align-items:baseline;gap:5px;min-width:0;overflow:hidden}
.post-author-separator{flex:none;color:var(--muted);font-size:11px}
.post-author strong{flex:0 1 auto;min-width:0;display:block;font-size:14px;font-weight:600;line-height:1.2;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.post-subline{display:block;font-size:12px;line-height:1.2;margin:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.post-date{flex:0 1 auto;min-width:0;max-width:60%;font-size:11px;color:var(--muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-header-actions{display:flex;align-items:center;gap:0;flex:none}
.post-follow-slot{display:flex;align-items:center;flex:0 0 124px;width:124px;height:44px}
.post-follow{position:relative;display:inline-flex;align-items:center;justify-content:flex-end;width:100%;min-width:44px;min-height:44px;border:0;border-radius:4px;background:transparent;color:#fff;box-shadow:none;padding:0 2px 0 8px;font-family:var(--font-ui,inherit);font-size:12px;font-weight:700;line-height:1.2;white-space:nowrap;cursor:pointer}
.post-follow[hidden]{display:none}
.post-follow:disabled{opacity:1;cursor:pointer}
:root .post-card .post-header .icon-btn{width:44px;height:44px;min-width:44px;flex:none;margin:0;padding:8px;background:transparent;color:var(--muted);opacity:1;transition:color .16s ease;transform:none}
:root .post-card .post-header .icon-btn:is(:hover,:focus-visible,:active,[aria-expanded="true"]){color:var(--text);background:transparent;transform:none}
:root .post-card .post-header .icon-btn>.icon-more{width:18px;height:18px;opacity:1}
.post-header button:is(:hover,:active){background:transparent;transform:none}
.post-header button:focus-visible{outline:2px solid var(--text);outline-offset:-3px;border-radius:4px}
.post-visual{--feed-controls-inset:0px;position:relative;isolation:isolate;width:100%;margin:0;aspect-ratio:var(--feed-media-ratio,1);max-height:600px;max-height:min(600px,75svh);background:var(--panel);border-radius:10px;overflow:hidden;line-height:0}
.post-visual.is-video{background:#20242c;min-height:184px;min-height:min(184px,62svh);max-height:520px;max-height:min(520px,62svh)}
.post-image,.post-video{position:absolute;z-index:1;inset:0;display:block;width:100%;height:100%;max-height:none;min-height:0;object-fit:contain;margin:0;background:transparent}
/* Fill the photo preview without letterboxing or stretching. The detail
   viewer keeps the complete original; videos retain their separate fit. */
.post-image{object-fit:cover;object-position:center}
/* Native fallback retains its complete frame and controls above the footer. */
.post-visual.is-video:not(.has-feed-video-controls)>.post-video{height:calc(100% - var(--feed-controls-inset))}
.post-image[role="button"]{cursor:pointer;touch-action:manipulation}
.post-image[role="button"]:focus-visible{outline:none}
/* An inset, two-tone keyboard ring stays visible on light and dark photos.
   The overlay never changes media geometry or intercepts a click. */
.post-visual:has(>.post-image[role="button"]:focus-visible)::after{content:"";position:absolute;inset:4px;z-index:2;pointer-events:none;border:2px solid #ffffffd9;outline:1px solid #0008;outline-offset:0}
.post-visual .post-media-error{position:absolute;inset:0;z-index:4;background:var(--panel);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;line-height:1.5;font-size:14px}
/* Custom feed controls preserve the original media box and decoder. Only the
   actual 44px controls receive pointers; the rest passes through to the video. */
.feed-video-controls{position:absolute;inset:0;z-index:2;pointer-events:none;color:#fff;line-height:1}
.feed-video-controls>button,.feed-video-controls>.feed-video-seek{pointer-events:auto;touch-action:manipulation}
.feed-video-controls>[hidden]{display:none!important}
.feed-video-toggle{position:absolute;left:50%;top:50%;display:flex;align-items:center;justify-content:center;width:64px;height:64px;min-width:64px;padding:16px;transform:translate(-50%,-50%);border:0;border-radius:50%;background:#14141480;color:#fff;opacity:1;cursor:pointer}
.feed-video-toggle>.icon{display:block;width:32px;height:32px;flex:none}
.feed-video-toggle:not(.is-feedback)>.icon{animation:feed-playback-glyph-enter .16s ease-out both}
@keyframes feed-playback-glyph-enter{from{opacity:0}to{opacity:1}}
.feed-video-toggle.is-feedback{animation:feed-playback-feedback .5s ease-out both}
@keyframes feed-playback-feedback{0%,35%{opacity:1}100%{opacity:0}}
.feed-video-toggle:is(:hover,:active){background:#14141499;transform:translate(-50%,-50%)}
.feed-video-mute,.feed-video-fullscreen{position:absolute;bottom:12px;z-index:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:12px;border:0;border-radius:50%;background:transparent;color:#fff;cursor:pointer;isolation:isolate}
.feed-video-mute{right:52px}
.feed-video-fullscreen{left:auto;right:8px}
.feed-video-mute::before,.feed-video-fullscreen::before{content:"";position:absolute;inset:4px;z-index:-1;border-radius:50%;background:#14141480;backdrop-filter:blur(8px);pointer-events:none}
.feed-video-mute>.icon,.feed-video-fullscreen>.icon{display:block;width:20px;height:20px;flex:none}
.feed-video-mute:is(:hover,:active),.feed-video-fullscreen:is(:hover,:active){background:transparent;transform:none}
.feed-video-controls>button:focus-visible{outline:2px solid #fff;outline-offset:-3px}
/* Keep the 44px native seek target inside media; a pointer-transparent bar
   touches the bottom edge while the optional thumb remains fully inside. */
.feed-video-seek{position:absolute;left:0;right:0;bottom:0;width:100%;height:44px;min-height:44px;margin:0;padding:28px 0 0;border:0;border-radius:0;background:transparent;color:#fff;appearance:none;-webkit-appearance:none;cursor:pointer;outline:none;opacity:.55;transition:opacity .16s ease}
.feed-video-progress{position:absolute;left:0;right:0;bottom:0;height:3px;pointer-events:none;background:linear-gradient(to right,#fff 0 var(--feed-video-progress,0%),#ffffff73 var(--feed-video-progress,0%) 100%)}
.feed-video-seek:is(:hover,:focus-visible,:active){opacity:1}
.feed-video-seek::-webkit-slider-runnable-track{height:2px;border:0;border-radius:2px;background:transparent}
.feed-video-seek::-moz-range-track{height:2px;border:0;border-radius:2px;background:transparent}
.feed-video-seek::-moz-range-progress{height:2px;border:0;border-radius:2px;background:transparent}
.feed-video-seek::-webkit-slider-thumb{width:12px;height:12px;margin-top:-5px;border:0;border-radius:50%;background:#fff;appearance:none;-webkit-appearance:none;opacity:0;transition:opacity .16s ease}
.feed-video-seek::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:#fff;opacity:0;transition:opacity .16s ease}
.feed-video-seek:is(:hover,:focus-visible,:active)::-webkit-slider-thumb{opacity:0}
.feed-video-seek:is(:hover,:focus-visible,:active)::-moz-range-thumb{opacity:0}
.feed-video-seek:focus-visible{outline:2px solid #fff;outline-offset:-4px;border-radius:4px}
.feed-video-seek:disabled{opacity:.4;cursor:default}
.feed-video-status{position:absolute;left:12px;right:12px;bottom:calc(94px + var(--feed-controls-inset));color:#fff;font-size:12px;line-height:1.4;text-align:center;text-shadow:0 1px 3px #0009;pointer-events:none}
.post-video.feed-controlled-video{cursor:pointer}
.post-video.feed-controlled-video:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.post-visual.has-feed-video-controls:fullscreen{margin:0;width:100vw;height:100dvh;min-height:0;max-height:none;aspect-ratio:auto;border-radius:0}
.post-visual:fullscreen,.post-video:fullscreen{--feed-controls-inset:0px}
.post-footer{position:relative;z-index:1;margin-top:0;padding:0;border-radius:0;background:transparent}
.post-footer:has(>.post-caption:empty):has(>.post-tags:empty):not(:has(>.post-location:not(:empty))){padding-bottom:0}
.post-actions{display:flex;align-items:center;gap:2px;min-width:0;min-height:50px;padding:6px 0 0}
.post-actions .icon-btn{width:64px;min-width:44px;height:44px;flex:none;color:var(--text);border:0;background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:flex-start;padding:6px 4px;border-radius:6px}
.post-actions .post-action-with-count{width:64px;gap:5px;padding:6px 4px}
.post-actions>.icon-btn:last-child{width:44px;justify-content:center}
.post-action-count{font-size:13px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--text);display:inline-block;inline-size:3.5ch;min-inline-size:3.5ch;block-size:1.2em;overflow:hidden;text-overflow:ellipsis;text-align:left}
.post-actions .icon-btn svg{width:23px;height:23px}
.post-actions .icon-btn:hover{background:transparent}
.post-actions .icon-btn:active{transform:none}
.post-actions .icon-btn{transition:color .16s ease}
.post-actions .icon-btn .icon{transition:color .16s ease,scale .16s ease}

.post-actions .is-liked{color:var(--pink)}
.post-actions .is-saved{color:var(--accent)}
.post-actions .is-liked svg,.post-actions .is-saved svg{fill:currentColor}
.post-action-spacer{flex:1;min-width:0}
.post-caption{font-size:14px;font-weight:400;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap;margin:0;padding:2px 0 0}
.text-author{border:0;background:none;color:var(--text);font:inherit;font-weight:600;padding:0;cursor:pointer;text-align:left;max-width:100%;overflow-wrap:anywhere}
.post-caption-text{white-space:pre-wrap;overflow-wrap:anywhere}
.post-caption-toggle{display:inline-flex;align-items:center;justify-content:flex-start;vertical-align:baseline;min-width:44px;min-height:28px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--muted);font:inherit;font-size:14px;font-weight:500;cursor:pointer;white-space:nowrap}
.post-caption-toggle{transition:color .16s ease}
.post-caption-toggle:is(:hover,:focus-visible){color:var(--text);background:transparent}
@media(prefers-reduced-motion:reduce){.post-caption-toggle{transition:none}}
.post-tags{color:var(--muted);font-size:12px;font-weight:500;line-height:1.45;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:8px 0 0}
.post-location{margin:0;padding:6px 0 0;color:var(--muted);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.post-tags[hidden],.post-tags:empty,.post-caption:empty,.post-location:empty{display:none}
.feed-status{text-align:center;color:var(--muted);font-size:14px;padding:16px 0}
.feed-status:empty{display:none}
.feed-load-more{display:block;margin:8px auto 0}
.feed-pagination-sentinel{min-height:1px;pointer-events:none}
.feed-load-more[hidden]{display:none}
.feed-refresh-slot{position:fixed;inset:auto 16px max(24px,env(safe-area-inset-bottom));z-index:30;display:flex;justify-content:center;pointer-events:none}
.feed-refresh-slot[hidden],.feed-new-posts[hidden]{display:none}
.feed-new-posts{margin:0;display:block;pointer-events:auto;color:var(--text)!important;background:var(--surface);box-shadow:0 6px 24px #0002;border-radius:14px;max-width:100%;min-height:44px}
.feed-empty{padding:56px 24px;text-align:center;border:1px dashed var(--line);border-radius:12px}
.feed-empty>svg{color:var(--accent);margin-bottom:15px}
.feed-empty h2{font-size:20px;color:var(--text);line-height:1.4;margin:5px 0 9px}
.feed-empty p{font-size:14px;line-height:1.6;max-width:310px;margin:0 auto 22px}
.post-menu{display:flex;flex-direction:column;gap:12px}
.post-menu>.btn{display:flex;gap:10px;align-items:center;justify-content:center}
.danger-text{color:var(--danger)!important}
.post-danger{color:white!important;background:#b52d49!important}
.post-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}
.post-skeleton{position:relative;display:flow-root;border:0;border-radius:0;background:transparent;box-shadow:none;margin:0 0 28px;padding:0;overflow:hidden}
:root[data-theme="dark"] .post-card,:root[data-theme="dark"] .post-skeleton{box-shadow:none}
.skeleton-head{position:relative;z-index:1;height:44px;width:min(190px,calc(100% - 32px));border-radius:12px;background:var(--button-bg);margin:0 0 12px}
.post-skeleton::after{content:"";position:relative;z-index:1;display:block;height:50px;margin-top:0;border-radius:0;background:transparent}
.skeleton-photo{width:100%;margin:0;aspect-ratio:1;border-radius:10px;max-height:600px;max-height:min(600px,75svh);background:linear-gradient(110deg,var(--panel) 25%,var(--button-bg) 42%,var(--panel) 60%);background-size:200% 100%;animation:skeleton-shimmer 2s ease-in-out infinite}
.react-pop>.icon{animation:reaction-pop .25s ease-out;transform-origin:center}
@keyframes skeleton-shimmer{0%{background-position:100% 0}
100%{background-position:-100% 0}
}
@keyframes reaction-pop{0%{transform:scale(.86)}
55%{transform:scale(1.16)}
100%{transform:scale(1)}
}
@media(max-width:700px){.feed-view{width:100%;max-width:none}
.feed-heading{padding:0 16px 18px}
.feed-heading h1{font-size:24px;margin-bottom:20px}
.feed-intro{font-size:12px;margin-bottom:20px}
.feed-tabs{gap:28px}
.feed-tab{font-size:14px;padding:8px 0 16px}
.post-card,.post-skeleton{margin:0 0 18px;border-radius:0;border-left:0;border-right:0;box-shadow:none}
:root[data-theme="dark"] .post-card,:root[data-theme="dark"] .post-skeleton{box-shadow:none}
.post-visual,.skeleton-photo{width:100%;margin-inline:0;border-radius:10px}
.post-header{gap:6px;min-height:56px;padding:0 12px 12px}
.post-author{gap:6px}
.post-author>.avatar{width:32px!important;height:32px!important}
.post-author-line{gap:3px}
.post-author strong{font-size:13px}
.post-author-separator{font-size:10px}
.post-follow-slot{flex-basis:96px;width:96px}
.post-follow{font-size:11.5px;padding:0 2px}
:root .post-card .post-header .icon-btn>.icon-more{width:18px;height:18px}
.post-visual:not(.is-video),.skeleton-photo{max-height:600px;max-height:min(600px,75svh)}
.post-date{font-size:10px}
.post-caption-toggle{min-height:32px}
.post-author strong,.post-subline{max-width:100%}
.post-actions{gap:2px;min-height:50px;padding:6px 0 0}
.post-actions .icon-btn{height:44px}
.feed-empty{margin:0 16px}
.skeleton-head{width:min(190px,calc(100% - 24px));margin:0 12px 12px}
.post-skeleton::after{height:50px}
.feed-refresh-slot{bottom:max(84px,calc(env(safe-area-inset-bottom) + 72px))}
}
@media(max-width:380px){.post-actions{gap:4px}
.post-action-count{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.react-pop>.icon,.skeleton-photo{animation:none}
.feed-video-toggle.is-feedback{animation:none;opacity:.72}
.feed-video-toggle:not(.is-feedback)>.icon{animation:none;opacity:1}
:root .post-card .post-header .icon-btn{transition:none}
.feed-video-seek{transition:none}
.feed-video-seek::-webkit-slider-thumb{transition:none}
.feed-video-seek::-moz-range-thumb{transition:none}
}


@media(prefers-reduced-motion:reduce){.post-actions .icon-btn .icon{transition:none;animation:none!important}}


.post-actions .icon-btn[aria-pressed]:disabled{opacity:1;cursor:pointer}
.post-actions .icon-btn:not(.is-liked):not(.is-saved):hover{color:color-mix(in srgb,var(--text) 80%,var(--muted))}

/* Variant A shell proportions; other pages retain their own column layouts. */
@media(min-width:701px){.content-columns:has(>.main-view>.feed-view){padding:28px 24px 48px}}
@media(min-width:961px){
 .content-columns:has(>.main-view>.feed-view){grid-template-columns:minmax(0,470px) 300px;gap:56px;padding:28px 24px 48px}
}
/* Photo follow is a quiet gray pill; video receives an explicit overlay below. */
:root .post-card .post-header .post-follow{position:relative;isolation:isolate;justify-content:center;color:var(--text)!important;background:transparent!important;font-size:13px;transition:color .16s ease}
:root .post-card .post-header .post-follow::before{content:"";display:block;position:absolute;inset:6px 2px;z-index:-1;border-radius:8px;background:var(--panel);transition:background .16s ease}
:root .post-card .post-header .post-follow:is(:hover,:active)::before{background:var(--button-hover)}
:root .post-card .post-header .post-follow:is(.is-followed,[aria-pressed="true"]){color:#383842!important}
:root .post-card .post-header .post-follow:is(.is-followed,[aria-pressed="true"])::before{background:#ececf0}
:root .post-card .post-header .post-follow:focus-visible{outline-color:var(--text)}
:root[data-theme="dark"] .post-card .post-header .post-follow{color:var(--text)!important}
:root[data-theme="dark"] .post-card .post-header .post-follow::before{background:#2b2b31}
:root[data-theme="dark"] .post-card .post-header .post-follow:is(.is-followed,[aria-pressed="true"]){color:#d3d3dc!important}
:root[data-theme="dark"] .post-card .post-header .post-follow:is(.is-followed,[aria-pressed="true"])::before{background:#35353f}
.post-visual>.media-reflection{position:absolute;inset:-40px;z-index:0;width:calc(100% + 80px);height:calc(100% + 80px);filter:blur(40px);opacity:.65;pointer-events:none}
.post-caption-link,.post-caption-tag,.post-caption-mention{color:#2b5fd9}
.post-caption-link:hover{text-decoration:underline;color:#244cc7}
:root[data-theme="dark"] :is(.post-caption-link,.post-caption-tag,.post-caption-mention,.post-tags){color:#9abaff}
@media(max-width:700px){
 :root .post-card .post-header .post-follow-slot{flex-basis:108px;width:108px}
 :root .post-card .post-header .post-follow{font-size:12px}
}
@media(prefers-reduced-motion:reduce){:root .post-card .post-header .post-follow{transition:none}}

@media(prefers-reduced-motion:reduce){:root .post-card .post-header .post-follow::before{transition:none}}

.content-columns:has(>.main-view>.feed-view)>.discovery-rail{padding-top:0}

/* New photo/video references keep the shell and all existing interactions. */
.post-card.is-video-post>.post-visual>.post-header{position:absolute;inset:0 0 auto;min-height:68px;padding:12px 10px 12px 12px;gap:10px;color:#fff;pointer-events:none}
.post-card.is-video-post>.post-visual>.post-header::before{content:"";position:absolute;inset:0 0 -30px;z-index:-1;background:linear-gradient(180deg,#0000006b,transparent);pointer-events:none}
.post-card.is-video-post .post-header button{pointer-events:auto}
.post-card.is-video-post .post-author>.avatar{width:34px!important;height:34px!important;border:0;box-shadow:none}
.post-card.is-video-post .post-author-text{text-shadow:0 1px 2px #0006}
.post-card.is-video-post :is(.post-subline,.post-date,.post-author-separator){color:#ffffffe0}
:root .post-card.is-video-post .post-header .icon-btn,:root .post-card.is-video-post .post-header .icon-btn:is(:hover,:focus-visible,:active,[aria-expanded="true"]){color:#fff}
:root .post-card.is-video-post .post-header .post-follow,:root .post-card.is-video-post .post-header .post-follow:is(.is-followed,[aria-pressed="true"]){color:#fff!important}
:root .post-card.is-video-post .post-header .post-follow::before{background:#ffffff38}
:root .post-card.is-video-post .post-header .post-follow:is(:hover,:active)::before{background:#ffffff50}
:root .post-card.is-video-post .post-header .post-follow:is(.is-followed,[aria-pressed="true"])::before{background:#ffffff24}
:root .post-card.is-video-post .post-header button:focus-visible{outline-color:#fff}
.post-tags>.post-caption-tag{display:inline-flex;align-items:center;padding:5px 10px;border-radius:8px;background:var(--panel);color:var(--muted);font-size:12px;font-weight:500;line-height:1.45;overflow-wrap:anywhere;max-width:100%}
:root[data-theme="dark"] .post-tags>.post-caption-tag{background:#2b2b31;color:#c1c1c8}
@media(max-width:700px){
 .post-footer{padding-inline:12px}
 .post-card.is-video-post>.post-visual>.post-header{gap:6px;padding:10px 8px 10px 12px;min-height:64px}
 .post-card.is-video-post .post-author>.avatar{width:32px!important;height:32px!important}
}

.feed-video-time{position:absolute;left:12px;bottom:18px;max-width:calc(100% - 120px);overflow:hidden;color:#fff;font-size:12px;font-weight:600;line-height:1.4;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #0008;pointer-events:none}

/* Portrait video previews fill the same compact frame as portrait photos.
   The original player and all native/fullscreen controls remain intact. */
.post-visual.is-portrait-video:not(:fullscreen){min-height:0;max-height:600px;max-height:min(600px,75svh)}
.post-visual.is-portrait-video:not(:fullscreen)>.post-video:not(:fullscreen){object-fit:cover;object-position:center}
.post-visual.is-portrait-video:not(:fullscreen)>.media-reflection{display:none}
.post-visual.is-portrait-video:fullscreen>.post-video,.post-video:fullscreen{object-fit:contain}

/* Narrow bookmark: match its visible right inset to the heart's visible left inset. */
.post-actions>.icon-btn:last-child{justify-content:flex-end;padding-right:1px}
