/* Final, last-loaded feed and marketplace overrides. */
.social-media-wrap,.video-preview{background:#f4f4f4!important}
.social-media-wrap .social-media,.social-media-wrap .media-preview,.social-media-wrap .media-preview .social-media,.social-media-wrap .media-preview video{max-height:min(72vh,760px)!important;object-fit:contain!important}
.social-media-wrap .media-preview .social-media{display:block;width:100%;height:auto!important}
.post-view-count-overlay{left:10px!important;right:auto!important;top:10px!important;bottom:auto!important;display:inline-flex!important;align-items:center;min-height:26px;padding:4px 9px!important;background:#0b0b0bc7!important;color:#fff!important;font-variant-numeric:tabular-nums}
.media-play{display:none!important}
.reaction-count-summary{display:flex;align-items:center;gap:5px;max-width:38vw;overflow-x:auto;white-space:nowrap;color:var(--muted,#756a68);font-size:11px}.reaction-count-summary[hidden]{display:none}.reaction-count-summary span{padding:3px 5px;border-radius:999px;background:#f4f4f4}
.market-collections{margin:18px 0 24px}.market-collections>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.market-collections>header h2{margin:0}.market-collections>header button{border:0;border-radius:999px;padding:10px 14px;background:var(--accent,#e10600);color:white;font:inherit;font-weight:700}.market-collections fieldset{min-width:0;border:1px solid var(--line,#eadfdb);border-radius:14px;padding:12px}.market-collections fieldset label{display:inline-flex;gap:6px;align-items:center;margin:5px 12px 5px 0}.collection-card h3{margin:0}
.collection-dialog{width:min(94vw,800px);max-height:90vh;overflow:auto;border:0;border-radius:20px;padding:20px;background:var(--card,#fff);color:inherit}.collection-dialog::backdrop{background:#0b0b0b88}.collection-dialog>button:first-child{float:right;border:0;border-radius:999px;padding:8px 12px;background:#f4f4f4}
@media(max-width:600px){.social-post{padding:12px}.social-media-wrap{margin-inline:-2px}.social-media-wrap .media-preview .social-media,.social-media-wrap .media-preview video{max-height:68vh!important}.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.market-card-body{padding:10px}.market-card h2{font-size:15px;overflow-wrap:anywhere}.market-price{font-size:15px}.market-description{font-size:13px}.market-photo{aspect-ratio:1/1}}
#feed-view #social-feed>.social-feed-ad{box-sizing:border-box;position:relative;display:flex;flex:0 0 100%;width:100%;height:100%;min-height:100%;max-height:100%;align-items:center;justify-content:center;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;background:#fff;color:#5b5557;text-align:center}
#feed-view #social-feed>.social-feed-ad[aria-busy="true"]{padding:24px;font-size:14px}
@media(max-width:340px){.catalog-grid{grid-template-columns:1fr}}

/* Keep the feed within the actual Android WebView safe area and navigation bar. */
@media(max-width:700px){
  #feed-view{margin:0!important;padding-top:0!important;}
  #feed-view.active{box-sizing:border-box;display:flex!important;flex-direction:column;height:calc(var(--visual-viewport-height,100dvh) - var(--effective-bottom-nav-height,76px) - var(--native-ad-height,0px) - var(--safe-top,0px) - var(--space-3,12px));min-height:0!important;overflow:hidden;}
  #feed-view .fyp-header,#feed-view .fyp-tabs{flex:0 0 auto;}
  #feed-view .fyp-tabs{position:sticky;top:0!important;z-index:18;margin:0!important;background:var(--card,#fff);}
  #feed-view .social-layout,#feed-view .social-layout>section{min-height:0;height:auto;}
  #feed-view #social-feed{min-height:0!important;max-height:none!important;overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-type:y mandatory;}
  #feed-view #social-feed>.social-post{flex:0 0 100%;width:100%;height:100%;min-height:100%;max-height:100%;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;}
  #feed-view #social-feed>.social-post>.social-media-wrap{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;background:#171317;}
  #feed-view #social-feed .social-media-wrap>.media-preview{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;}
  #feed-view #social-feed .social-media-wrap .social-media{width:100%;height:100%;max-height:none!important;margin:0;object-fit:contain!important;background:#171317;}
  #feed-view #social-feed .social-media-wrap .video-preview>video.social-media{object-fit:cover!important;background:transparent;}
}

/* Full-bleed short-video cards: crop to the frame instead of letterboxing. */
.social-post.has-video{position:relative;min-width:0;padding:0!important;overflow:visible;border:0;background:transparent!important;box-shadow:none}
.social-post.has-video .social-media-wrap{position:relative;isolation:isolate;width:100%;height:min(70svh,760px);min-height:min(420px,calc(100svh - 350px));margin:0;overflow:hidden;aspect-ratio:9/16;border:0;border-radius:20px;background:#111!important}
.social-post.has-video .media-preview.video-preview{position:absolute;inset:0;width:100%;height:100%!important;max-height:none!important;overflow:hidden;border-radius:inherit;background:#111!important}
.social-post.has-video .media-preview.video-preview video.social-media{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:center;border-radius:inherit;background:transparent!important}
.social-post.has-video .social-post-head{position:absolute;inset:12px 68px auto 12px;z-index:3;display:flex;align-items:center;gap:8px;min-width:0;color:#fff;text-shadow:0 1px 6px #000b}
.social-post.has-video .social-post-head>div,.social-post.has-video .social-post-head a,.social-post.has-video .social-post-head time{min-width:0;color:#fff!important;text-shadow:0 1px 6px #000b}
.social-post.has-video .social-post-head .social-follow{flex:0 0 auto;margin-left:auto;padding:6px 10px;border:1px solid #ffffffb0;border-radius:999px;background:#0005;color:#fff!important;text-shadow:none}
.social-post.has-video .social-body{position:absolute;z-index:3;left:14px;right:70px;bottom:70px;display:-webkit-box;max-height:4.5em;margin:0;overflow:hidden;color:#fff;line-height:1.5;text-overflow:ellipsis;text-shadow:0 1px 6px #000; -webkit-box-orient:vertical;-webkit-line-clamp:3}
.social-post.has-video .social-post-music{position:absolute;z-index:3;left:12px;right:70px;bottom:10px;display:flex;align-items:center;gap:8px;min-width:0;max-width:calc(100% - 82px);padding:7px 8px;border-radius:12px;background:linear-gradient(90deg,#0008,#0002);color:#fff;text-shadow:0 1px 5px #000}
.social-post.has-video .social-post-music-artwork{width:34px;height:34px;border-radius:7px}
.social-post.has-video .social-post-music>div{display:grid;min-width:0;overflow:hidden}
.social-post.has-video .social-post-music strong,.social-post.has-video .social-post-music small{overflow:hidden;color:#fff;text-overflow:ellipsis;white-space:nowrap}
.social-post.has-video .social-post-music audio{width:min(34vw,150px);height:30px;flex:0 1 auto}
.social-post.has-video .social-video-actions{position:absolute;z-index:4;top:50%;right:3px;display:flex;width:56px;margin:0!important;padding:8px 2px!important;transform:translateY(-50%);flex-direction:column;align-items:center;gap:3px;border:0!important;border-radius:999px;background:linear-gradient(90deg,transparent,#0003)!important;color:#fff}
.social-post.has-video .social-video-actions .post-action{display:flex;width:48px;min-width:48px;min-height:48px;padding:4px 2px;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:0;border-radius:14px;background:transparent!important;color:#fff!important;text-shadow:0 1px 5px #000;touch-action:manipulation}
.social-post.has-video .social-video-actions .post-action svg{width:25px;height:25px;stroke:currentColor;filter:drop-shadow(0 1px 2px #0008)}
.social-post.has-video .social-video-actions .post-action span,.social-post.has-video .social-video-actions .post-action b{position:static;width:auto;height:auto;overflow:visible;clip:auto;color:#fff;font-size:11px;line-height:1.15;text-shadow:0 1px 5px #000;white-space:normal}
.social-post.has-video .social-video-actions .post-action.active{color:#ff3154!important;background:#0002!important}
.social-post.has-video .social-video-actions .reaction-options-toggle{width:22px;height:22px;min-width:22px;min-height:22px;flex:0 0 22px;margin:-5px 0 0;border:1px solid #fff;background:#e10600;color:#fff;font-size:13px;box-shadow:0 1px 4px #0008}
.social-post.has-video .post-reaction-wrap{display:flex;flex-direction:column;align-items:center}
.social-post.has-video .social-video-actions .reaction-count-summary{display:none!important}
.social-post.has-video .reaction-tray{right:52px;bottom:0;left:auto;z-index:6}
.social-post.has-video .post-view-count-overlay{top:auto!important;right:66px!important;bottom:12px!important;left:auto!important;z-index:3}
.social-post.has-video .media-duration{right:66px;top:12px;bottom:auto;z-index:3}
@media(max-width:600px){
  .social-post.has-video{margin:0;padding:0!important}
  .social-post.has-video .social-media-wrap{height:min(70svh,740px);min-height:min(390px,calc(100svh - 330px));margin:0;border-radius:16px}
  .social-post.has-video .social-post-head{inset:10px 60px auto 10px}
  .social-post.has-video .social-body{left:12px;right:62px;bottom:66px}
  .social-post.has-video .social-post-music{left:8px;right:62px;bottom:7px;gap:6px;padding:6px}
  .social-post.has-video .social-post-music audio{width:min(28vw,120px)}
  .social-post.has-video .social-video-actions{right:1px;width:52px;gap:1px}
  .social-post.has-video .social-video-actions .post-action{width:46px;min-width:46px;min-height:44px}
  .social-post.has-video .post-view-count-overlay{right:60px!important;bottom:8px!important}
  .social-post.has-video .media-duration{right:60px;top:10px}
}
@media(max-height:700px){.social-post.has-video .social-media-wrap{height:min(66svh,620px);min-height:300px}}

.fyp-marketplace-link{display:inline-flex;align-items:center;justify-content:center;max-width:100%;margin:.5rem 0;padding:.65rem 1rem;border:0;border-radius:999px;background:#e10600;color:#fff;font:600 .92rem/1.2 inherit;cursor:pointer}
.fyp-marketplace-link:focus-visible{outline:3px solid #0b0b0b;outline-offset:2px}

.fyp-marketplace-link{font-family:inherit;font-size:.92rem;font-weight:600;line-height:1.2}
#profile-form,#discovery-settings-form,#privacy-settings-form{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
#profile-form label,#profile-form input,#profile-form select,#profile-form textarea,#discovery-settings-form input,#discovery-settings-form select{min-width:0;max-width:100%;box-sizing:border-box}
#profile-form input:not([type=checkbox]):not([type=file]),#profile-form select,#profile-form textarea{width:100%}
#profile-form textarea{min-height:6rem;resize:vertical}
.settings-card{min-width:0;max-width:100%;overflow-wrap:anywhere}
