/* Mobile discovery keeps the photo in the first viewport. Appearance and intent
   controls live in the dedicated preferences card; desktop remains unchanged. */
.mobile-discovery-bar,.mobile-discovery-status,.mobile-search-panel{display:none}
.mobile-results-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.discovery-preferences{scroll-margin-top:100px;min-width:0}
.discovery-preferences-heading h2{font-family:var(--sans);font-size:21px;font-weight:650;line-height:1.3;letter-spacing:-.02em;margin:0 0 8px}
.discovery-preferences-heading p{color:var(--muted);font-size:13px;line-height:1.7;margin:0 0 22px}
.discovery-preferences-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px;min-width:0}
.discovery-preferences-form label.field{min-width:0;font-size:13px;line-height:1.55;gap:8px}
.discovery-preferences-form select,.discovery-preferences-form input:not([type=checkbox]){width:100%;min-width:0;min-height:48px;font-size:16px;line-height:1.4}
.discovery-preferences-form label:has(input[type=checkbox]){display:flex;align-items:center;gap:11px;min-height:48px;font-size:13px;line-height:1.6}
.discovery-preferences-form input[type=checkbox]{flex:0 0 21px;width:21px;height:21px;min-height:21px;margin:0;accent-color:var(--rose)}
.discovery-preferences-form #demo-preference-status,.discovery-preferences #demo-preference-status{grid-column:1/-1;color:var(--muted);font-size:12px;line-height:1.7;margin:0;overflow-wrap:anywhere}
.discovery-preferences-form #discovery-return{grid-column:1/-1;justify-self:start;min-height:48px;font-size:13px;line-height:1.5;white-space:normal;text-align:center}
.discovery-preferences>#discovery-return{margin-top:20px;min-height:48px}
.discovery-preferences .field-help{font-size:12px;line-height:1.6}
.discovery-settings-actions{grid-column:1/-1;display:grid;gap:6px;min-width:0}
.discovery-settings-actions>.text-link{justify-self:start;min-height:44px;font-size:12px;line-height:1.5}
.discovery-preferences :focus-visible{outline:3px solid var(--gold);outline-offset:3px}

@media (max-width:767px), (max-width:1024px) and (max-height:500px) and (pointer:coarse){
 body.appmode.demo-social,body.appmode.discovery-classic,body.appmode.discovery-settings-mode{min-width:0}
 .appmode .app-main>.quiet-banner,.appmode .mode-chip{display:none}
 .discovery-classic{--demo-bg:var(--bg);--demo-surface:#21181f;--demo-raised:#2b1e27;--demo-text:var(--cream);--demo-muted:var(--muted);--demo-border:var(--line)}
 .discovery-classic .explore-intro,.discovery-classic .demo-switcher,.discovery-classic .filters-toolbar,.discovery-classic .results-top{display:none}
 .discovery-classic .profile-grid{padding:12px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));gap:12px}
 .discovery-classic #load-more{padding:12px}
 .discovery-classic .app-footer-note{margin:12px 16px 20px}
 .discovery-classic .empty-state{margin:16px 12px}
 :is(.demo-social,.discovery-classic) .app-layout,.discovery-settings-mode .app-layout{padding-left:0;padding-bottom:calc(60px + env(safe-area-inset-bottom));min-height:100dvh}
 :is(.demo-social,.discovery-classic) .app-sidebar,.discovery-settings-mode .app-sidebar{display:none}
 :is(.demo-social,.discovery-classic) .app-topbar,.discovery-settings-mode .app-topbar{height:calc(52px + env(safe-area-inset-top));min-height:52px;padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:10px;background:#160f17f5;align-items:center}
 :is(.demo-social,.discovery-classic) .app-topbar .mobile-only,.discovery-settings-mode .app-topbar .mobile-only{display:block}
 :is(.demo-social,.discovery-classic) .app-topbar .app-breadcrumb,.discovery-settings-mode .app-topbar .app-breadcrumb{display:none}
 :is(.demo-social,.discovery-classic) .app-topbar .brand,.discovery-settings-mode .app-topbar .brand{display:flex;align-items:center;gap:6px;min-height:44px}
 :is(.demo-social,.discovery-classic) .app-topbar .brand img,.discovery-settings-mode .app-topbar .brand img{width:29px;height:29px}
 :is(.demo-social,.discovery-classic) .app-topbar .brand>span,.discovery-settings-mode .app-topbar .brand>span{font-size:23px;letter-spacing:-1.3px}
 :is(.demo-social,.discovery-classic) .app-topbar .user-short,.discovery-settings-mode .app-topbar .user-short{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:6px;border-radius:50%}
 :is(.demo-social,.discovery-classic) .app-topbar .user-short>.avatar,.discovery-settings-mode .app-topbar .user-short>.avatar{width:30px;height:30px;font-size:11px}
 :is(.demo-social,.discovery-classic) .app-topbar .user-short>div:not(.avatar),.discovery-settings-mode .app-topbar .user-short>div:not(.avatar){display:none}
 :is(.demo-social,.discovery-classic) .topbar-right,.discovery-settings-mode .topbar-right{gap:5px}
 .demo-social .mode-chip,.discovery-settings-mode .mode-chip{display:none}
 :is(.demo-social,.discovery-classic) .bottom-nav,.discovery-settings-mode .bottom-nav{position:fixed;z-index:40;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-around;gap:0;min-height:calc(60px + env(safe-area-inset-bottom));height:auto;padding:5px max(4px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));border-top:1px solid #62415855;background:#211520f7;backdrop-filter:blur(18px)}
 :is(.demo-social,.discovery-classic) .bottom-nav a,.discovery-settings-mode .bottom-nav a{display:flex;flex:1 1 0;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-width:44px;min-height:49px;padding:3px 1px;position:relative;font-size:11px;line-height:1.4;text-align:center;overflow-wrap:anywhere;color:#bda9b8}
 :is(.demo-social,.discovery-classic) .bottom-nav a .icon,.discovery-settings-mode .bottom-nav a .icon{width:21px;height:21px}
 :is(.demo-social,.discovery-classic) .bottom-nav a.active,.discovery-settings-mode .bottom-nav a.active{color:var(--rose)}
 :is(.demo-social,.discovery-classic) .bottom-nav a.active::before,.discovery-settings-mode .bottom-nav a.active::before{content:"";position:absolute;top:-5px;left:calc(50% - 11px);right:auto;width:22px;height:2px;border-radius:2px;background:var(--rose)}
 :is(.demo-social,.discovery-classic) .app-main{width:100%;max-width:none;min-width:0;margin:0;padding:0}
 .demo-social .quiet-banner,.demo-social .demo-heading,.demo-social .demo-presentation,.demo-social .social-toolbar,.demo-social .filters-toolbar,.demo-social .results-top,.demo-social .social-aside,.demo-social .app-footer-note{display:none}
 .demo-social .demo-workspace{width:100%;min-width:0;max-width:none;margin:0;padding:0;border:0;border-radius:0;background:var(--demo-bg);box-shadow:none}
 .demo-social .social-layout{display:block;min-width:0;margin:0;padding:0}
 .demo-social .social-main{min-width:0;width:100%}
 :is(.demo-social,.discovery-classic) .mobile-discovery-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:3px max(12px,env(safe-area-inset-right)) 3px max(14px,env(safe-area-inset-left));border-bottom:1px solid var(--demo-border);background:var(--demo-bg)}
 :is(.demo-social,.discovery-classic) .mobile-discovery-bar h1{min-width:0;margin:0;font-family:var(--sans);font-size:20px;line-height:1.3;font-weight:650;letter-spacing:-.04em;color:var(--demo-text)}
 :is(.demo-social,.discovery-classic) .mobile-discovery-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
 :is(.demo-social,.discovery-classic) .mobile-discovery-actions>button,:is(.demo-social,.discovery-classic) .mobile-discovery-actions>a{display:flex;align-items:center;justify-content:center;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:10px;border:0;border-radius:11px;background:transparent;color:var(--demo-text);touch-action:manipulation}
 :is(.demo-social,.discovery-classic) .mobile-discovery-actions>button:hover,:is(.demo-social,.discovery-classic) .mobile-discovery-actions>a:hover{background:var(--demo-raised)}
 :is(.demo-social,.discovery-classic) .mobile-discovery-actions .icon{width:21px;height:21px}
 :is(.demo-social,.discovery-classic) .mobile-discovery-status{display:block;padding:8px max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));margin:0;color:var(--demo-muted);font-size:11px;line-height:1.5;overflow-wrap:anywhere}
 :is(.demo-social,.discovery-classic) .mobile-discovery-status:empty,:is(.demo-social,.discovery-classic) .mobile-discovery-status:has(>#mobile-discovery-summary:empty){display:none}
 :is(.demo-social,.discovery-classic) #mobile-discovery-summary{margin:0;font-size:11px;line-height:1.5;color:var(--demo-muted);overflow-wrap:anywhere}
 :is(.demo-social,.discovery-classic) #mobile-discovery-summary:empty{display:none}
 :is(.demo-social,.discovery-classic) .mobile-search-panel:not([hidden]){display:block;padding:10px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));border-bottom:1px solid var(--demo-border);background:var(--demo-surface)}
 :is(.demo-social,.discovery-classic) #mobile-search-form{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0;margin:0}
 :is(.demo-social,.discovery-classic) #mobile-search-form label{flex:1 1 100%;font-size:12px;line-height:1.5;color:var(--demo-muted)}
 :is(.demo-social,.discovery-classic) #mobile-profile-search{flex:1 1 120px;min-width:0;width:0;min-height:46px;padding:10px 12px;border-radius:10px;font-size:16px;line-height:1.4;background:var(--demo-bg);color:var(--demo-text)}
 :is(.demo-social,.discovery-classic) #mobile-search-form>button{display:flex;align-items:center;justify-content:center;flex:0 0 44px;min-width:44px;min-height:46px;margin:0;padding:10px;border:1px solid var(--demo-border);border-radius:10px;background:var(--demo-raised);color:var(--demo-text)}
 :is(.demo-social,.discovery-classic) #mobile-search-form>button .icon{width:19px;height:19px}
 .demo-social #social-highlights{min-width:0;margin:0;padding:0}
 .demo-social .demo-workspace .social-stories,.demo-social .demo-workspace[data-density=compact] .social-stories{padding:8px 0 7px;margin:0;border:0;border-bottom:1px solid var(--demo-border);border-radius:0;box-shadow:none;background:var(--demo-bg)}
 .demo-social .demo-workspace .social-stories>.social-section-heading{display:none}
 .demo-social .demo-workspace .story-list{display:flex;align-items:flex-start;gap:14px;width:100%;max-width:100%;padding:3px max(12px,env(safe-area-inset-right)) 3px max(12px,env(safe-area-inset-left));margin:0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:12px;scrollbar-width:none}
 .demo-social .story-list::-webkit-scrollbar{display:none}
 .demo-social .demo-workspace .story-item,.demo-social .demo-workspace[data-density=compact] .story-item{display:flex;flex-direction:column;align-items:center;gap:2px;flex:0 0 66px;min-width:44px;max-width:72px;min-height:96px;margin:0;padding:0;scroll-snap-align:start}
 .demo-social .demo-workspace .story-ring{padding:3px;margin:0 0 2px}
 .demo-social .demo-workspace .story-ring>.avatar,.demo-social .demo-workspace[data-density=compact] .story-ring>.avatar{width:56px;height:56px;border-width:3px;object-position:50% 28%;font-size:18px}
 .demo-social .demo-workspace .story-item strong{max-width:100%;font-size:11px;line-height:1.4;font-weight:550;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .demo-social .demo-workspace .story-item .story-state{font-size:9px;line-height:1.4}
 .demo-social .demo-workspace .social-feed{display:grid;grid-template-columns:minmax(0,1fr);width:100%;max-width:none;margin:0;padding:0;gap:14px}
 .demo-social .demo-workspace .social-post{width:100%;min-width:0;margin:0;border:0;border-bottom:1px solid var(--demo-border);border-radius:0;background:var(--demo-surface);box-shadow:none;overflow:hidden}
 .demo-social .demo-workspace .social-post-head,.demo-social .demo-workspace[data-density=compact] .social-post-head{display:flex;align-items:center;gap:8px;min-height:56px;padding:6px max(10px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left))}
 .demo-social .demo-workspace .social-person{gap:9px;min-width:0;min-height:44px}
 .demo-social .demo-workspace .social-person>.avatar{display:block;flex-shrink:0;width:36px;height:36px}
 .demo-social .demo-workspace .social-person strong{font-size:12px;line-height:1.4}
 .demo-social .demo-workspace .social-person small{font-size:10px;line-height:1.5}
 .demo-social .demo-workspace .social-post-head>.icon-btn{min-width:44px;width:44px;min-height:44px;height:44px}
 .demo-social .demo-workspace .social-photo,.demo-social .demo-workspace[data-density=compact] .social-photo{display:block;width:100%;min-width:0;aspect-ratio:4/5;max-height:calc(100svh - 160px);margin:0;padding:0;border:0;border-radius:0;background:#160f15}
 .demo-social .demo-workspace .social-photo>img,.demo-social .demo-workspace[data-density=compact] .social-photo>img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 28%;border-radius:0}
 .demo-social .demo-workspace .social-photo-label{top:12px;left:max(14px,env(safe-area-inset-left));bottom:auto;font-size:8px;line-height:1.5}
 .demo-social .demo-workspace .social-photo-identity{left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));bottom:21px;gap:7px}
 .demo-social .demo-workspace .social-photo-name{gap:8px;line-height:1.13}
 .demo-social .demo-workspace .social-photo-name strong{font-size:36px;font-weight:400;letter-spacing:-.035em}
 .demo-social .demo-workspace .social-photo-name>span{font-size:25px}
 .demo-social .demo-workspace .social-photo-location{font-size:12px;line-height:1.5;gap:6px}
 .demo-social .demo-workspace .social-photo-location>.icon{width:14px;height:14px}
 .demo-social .demo-workspace .social-photo-intent{font-size:10px;line-height:1.5;padding:5px 9px}
 .demo-social .demo-workspace .social-post>.profile-badges{padding:9px max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:6px}
 .demo-social .demo-workspace .profile-badge{max-width:100%;min-height:44px;padding:8px 9px;font-size:11px;line-height:1.4;gap:5px}
 .demo-social .demo-workspace .profile-badge>.icon{width:14px;height:14px}
 .demo-social .demo-workspace .profile-badge>small{font-size:8px;padding-left:5px}
 .demo-social .demo-workspace .social-post-body,.demo-social .demo-workspace[data-density=compact] .social-post-body{padding:6px max(14px,env(safe-area-inset-right)) 16px max(14px,env(safe-area-inset-left))}
 .demo-social .demo-workspace .social-post-actions{min-height:44px;gap:8px;margin-bottom:6px}
 .demo-social .demo-workspace .social-like.icon-btn{min-width:44px;width:44px;min-height:44px;height:44px;margin-left:-7px}
 .demo-social .demo-workspace .social-profile-link{min-height:44px;font-size:12px;line-height:1.5}
 .demo-social .demo-workspace .social-caption p{font-size:13px;line-height:1.75;margin-bottom:12px}
 .demo-social .demo-workspace .tag{font-size:10px;min-height:27px;padding:4px 8px;line-height:1.5}
 .demo-social .demo-workspace .social-connection{font-size:11px;line-height:1.6;margin-top:13px;padding-top:12px}
 .demo-social .demo-workspace .social-connection>.text-link{font-size:11px;min-height:44px}
 .demo-social .demo-workspace .social-feed.is-grid,.demo-social .demo-workspace[data-layout=grid] .social-feed{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;align-items:start;background:var(--demo-border)}
 .demo-social .demo-workspace .social-feed.is-grid .social-post{height:100%;border-bottom:0}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-head{padding:6px;gap:2px;min-height:56px}
 .demo-social .demo-workspace .social-feed.is-grid .social-person{gap:4px}
 .demo-social .demo-workspace .social-feed.is-grid .social-person>.avatar{display:none}
 .demo-social .demo-workspace .social-feed.is-grid .social-person strong{font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;gap:3px}
 .demo-social .demo-workspace .social-feed.is-grid .social-person small{font-size:9px;line-height:1.4}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo{aspect-ratio:4/5;max-height:calc(100svh - 160px)}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-label{left:8px;top:9px;max-width:calc(100% - 16px);font-size:7px;padding:4px 6px;letter-spacing:.04em}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-identity{left:10px;right:10px;bottom:12px;gap:5px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-name{gap:5px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-name strong{font-size:26px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-name>span{font-size:18px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-location{font-size:11px;line-height:1.45;gap:4px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-location>.icon{width:12px;height:12px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-intent{font-size:9px;line-height:1.4;padding:4px 6px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post>.profile-badges{padding:8px 7px 0;gap:5px}
 .demo-social .demo-workspace .social-feed.is-grid .profile-badge{min-height:44px;font-size:10px;line-height:1.35;padding:6px;gap:4px;flex-wrap:wrap;justify-content:flex-start}
 .demo-social .demo-workspace .social-feed.is-grid .profile-badge>small{font-size:8px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-body{padding:5px 8px 13px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-actions{gap:0;flex-wrap:wrap;justify-content:flex-start}
 .demo-social .demo-workspace .social-feed.is-grid .social-profile-link{font-size:10px;line-height:1.4;gap:3px}
 .demo-social .demo-workspace .social-feed.is-grid .social-profile-link>.icon{width:12px;height:12px}
 .demo-social .demo-workspace .social-feed.is-grid .social-caption p{font-size:12px;line-height:1.65}
 .demo-social .demo-workspace .social-feed.is-grid .tag{font-size:9px;line-height:1.45;padding:4px 6px;min-height:25px}
 .demo-social .demo-workspace .social-feed.is-grid .social-connection{font-size:10px;line-height:1.6}
 .demo-social .demo-workspace .social-feed.is-grid .social-connection>.text-link{font-size:10px}
 .demo-social .demo-workspace[data-density=compact] .social-feed:not(.is-grid){gap:8px}
 .demo-social .demo-workspace[data-density=compact] .social-post-body{padding-top:4px;padding-bottom:12px}
 .demo-social .demo-workspace[data-density=compact] .social-caption p{margin-bottom:8px}
 .demo-social .demo-workspace[data-density=compact] .social-connection{margin-top:9px;padding-top:9px}
 .demo-social .demo-workspace[data-density=compact] .social-stories{padding-top:6px;padding-bottom:6px}
 .demo-social .demo-workspace[data-density=compact] .story-item{min-height:90px}
 .demo-social .demo-workspace[data-density=compact] .story-ring>.avatar{width:50px;height:50px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-head{padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right))}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-label{left:max(8px,env(safe-area-inset-left))}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-identity{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}
 .demo-social .demo-workspace .social-feed.is-grid .social-post>.profile-badges{padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right))}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-body{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
 .demo-social #load-more{padding:12px}
 .demo-social .demo-workspace .empty-state{margin:16px 12px;padding:32px 18px}
 .demo-social .demo-workspace .empty-state p{font-size:13px}
 :is(.demo-social,.discovery-classic) #dialog .dialog-head>.icon-btn,.discovery-settings-mode #dialog .dialog-head>.icon-btn{width:44px;min-width:44px;height:44px;min-height:44px}
 :is(.demo-social,.discovery-classic,.discovery-settings-mode) #dialog input:not([type=checkbox]):not([type=radio]),:is(.demo-social,.discovery-classic,.discovery-settings-mode) #dialog select,:is(.demo-social,.discovery-classic,.discovery-settings-mode) #dialog textarea{font-size:16px;min-height:44px;line-height:1.5}
 :is(.demo-social,.discovery-classic,.discovery-settings-mode) #dialog label.field{font-size:14px;line-height:1.5}
 :is(.demo-social,.discovery-classic) .toast,.discovery-settings-mode .toast{bottom:calc(74px + env(safe-area-inset-bottom));font-size:13px}
 .demo-social .demo-workspace :focus-visible{outline-offset:-3px}
 .demo-social .demo-workspace .story-item:focus-visible{outline-offset:2px;border-radius:8px}
 .demo-social .demo-workspace .story-list:focus-visible{outline-offset:-3px}
 .discovery-settings-mode .app-main{width:100%;max-width:100%;padding:18px max(16px,env(safe-area-inset-right)) 28px max(16px,env(safe-area-inset-left))}
 .discovery-settings-mode .app-title-row{margin-bottom:20px}
 .discovery-settings-mode .app-title-row h1{font-size:29px;line-height:1.15}
 .discovery-settings-mode .app-title-row p{font-size:13px;line-height:1.65}
 .discovery-settings-mode .app-title-row .eyebrow{font-size:9px;line-height:1.5}
 .discovery-settings-mode .settings-grid{display:block;min-width:0}
 .discovery-settings-mode .panel{padding:18px 16px;margin-bottom:18px;min-width:0;border-radius:14px}
 .discovery-settings-mode .panel h2{font-size:19px;line-height:1.35}
 .discovery-settings-mode .panel>.muted{font-size:13px;line-height:1.7}
 .discovery-settings-mode .setting-row{gap:14px;min-width:0;flex-wrap:wrap}
 .discovery-settings-mode .setting-row>div{min-width:0;flex:1 1 150px}
 .discovery-settings-mode .setting-row strong{font-size:13px;line-height:1.55}
 .discovery-settings-mode .setting-row small{font-size:12px;line-height:1.6}
 .discovery-settings-mode .setting-row .btn{min-height:44px;font-size:12px;line-height:1.5;padding:10px 13px}
 .discovery-settings-mode .setting-row>.switch{flex:0 0 auto;width:60px;min-width:60px;height:44px;min-height:44px;border-radius:24px}
 .discovery-settings-mode .setting-row>.switch::before{top:9px;left:9px;width:26px;height:26px}
 .discovery-settings-mode .setting-row>.switch[aria-checked=true]::before{transform:translateX(16px)}
 .discovery-settings-mode .discovery-preferences{scroll-margin-top:calc(68px + env(safe-area-inset-top));padding:20px 16px}
 .discovery-settings-mode .discovery-preferences-heading h2{font-size:21px;line-height:1.3;margin-bottom:9px}
 .discovery-settings-mode .discovery-preferences-heading p{font-size:14px;line-height:1.65;margin-bottom:22px}
 .discovery-settings-mode .discovery-preferences-form{grid-template-columns:minmax(0,1fr);gap:18px}
 .discovery-settings-mode .discovery-preferences-form label.field{font-size:14px;line-height:1.5;gap:8px}
 .discovery-settings-mode .discovery-preferences-form select,.discovery-settings-mode .discovery-preferences-form input:not([type=checkbox]){width:100%;min-width:0;min-height:48px;padding:11px 12px;font-size:16px;line-height:1.5}
 .discovery-settings-mode .discovery-preferences-form label:has(input[type=checkbox]){min-height:48px;font-size:14px;line-height:1.6;gap:12px}
 .discovery-settings-mode .discovery-preferences-form #demo-preference-status,.discovery-settings-mode .discovery-preferences #demo-preference-status{font-size:12px;line-height:1.7}
 .discovery-settings-mode .discovery-preferences #discovery-return{width:100%;min-height:48px;justify-self:stretch;font-size:14px;line-height:1.5;padding:12px 16px;gap:10px}
 .discovery-settings-mode .discovery-preferences .field-help{font-size:12px;line-height:1.6}
}
@media (max-width:360px){
 :is(.demo-social,.discovery-classic) .mobile-discovery-bar h1{font-size:19px}
 .demo-social .demo-workspace .story-list{gap:12px}
 .demo-social .demo-workspace .social-photo-name strong{font-size:33px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-name strong{font-size:26px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-actions{display:flex;flex-direction:column;align-items:flex-start;gap:0}
 .demo-social .demo-workspace .social-feed.is-grid .social-profile-link{margin-left:0;font-size:10px}
 .discovery-settings-mode .panel{padding-inline:14px}
}
@media (max-width:1024px) and (max-height:500px) and (pointer:coarse){
 :is(.demo-social,.discovery-classic) .app-topbar,.discovery-settings-mode .app-topbar{position:relative}
 :is(.demo-social,.discovery-classic) .mobile-discovery-bar{min-height:44px;padding-top:0;padding-bottom:0}
 .demo-social .demo-workspace .social-stories,.demo-social .demo-workspace[data-density=compact] .social-stories{padding-top:4px;padding-bottom:4px}
 .demo-social .demo-workspace .story-list{gap:12px;padding-top:0;padding-bottom:0}
 .demo-social .demo-workspace .story-item,.demo-social .demo-workspace[data-density=compact] .story-item{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:48px 16px;gap:2px 3px;align-items:center;flex-basis:88px;min-height:66px;max-width:94px}
 .demo-social .demo-workspace .story-ring{grid-column:1/-1;justify-self:center;margin:0;padding:3px}
 .demo-social .demo-workspace .story-ring>.avatar,.demo-social .demo-workspace[data-density=compact] .story-ring>.avatar{width:42px;height:42px;border-width:3px}
 .demo-social .demo-workspace .story-item strong{grid-column:1;justify-self:end;max-width:100%;font-size:11px;line-height:1.4}
 .demo-social .demo-workspace .story-item .story-state{grid-column:2;justify-self:start;font-size:9px;line-height:1.4;white-space:nowrap}
 .demo-social .demo-workspace .social-post-head,.demo-social .demo-workspace[data-density=compact] .social-post-head,.demo-social .demo-workspace .social-feed.is-grid .social-post-head{min-height:52px;padding-top:4px;padding-bottom:4px}

 .demo-social .demo-workspace .social-photo,.demo-social .demo-workspace[data-density=compact] .social-photo{max-height:none;aspect-ratio:4/5}
 .demo-social .demo-workspace .social-feed:not(.is-grid){max-width:none;margin-inline:auto}
 .demo-social .demo-workspace .social-feed.is-grid{max-width:none}
 .demo-social .demo-workspace .social-photo>img{object-fit:cover;object-position:50% 28%}
 .discovery-settings-mode .discovery-preferences-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .discovery-settings-mode .discovery-preferences-form label:has(input[type=checkbox]),.discovery-settings-mode .discovery-preferences-form #demo-preference-status,.discovery-settings-mode .discovery-preferences #discovery-return{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){.mobile-search-panel,.mobile-discovery-actions>a,.mobile-discovery-actions>button,.discovery-preferences *{scroll-behavior:auto;transition:none}}
@media (forced-colors:active){
 .mobile-discovery-bar,.mobile-search-panel{border-color:CanvasText}
 .mobile-discovery-actions>a,.mobile-discovery-actions>button{color:ButtonText}
 .discovery-preferences{border-color:CanvasText}
 :is(.demo-social,.discovery-classic) .bottom-nav a.active::before,.discovery-settings-mode .bottom-nav a.active::before{background:Highlight}
}

/* Keep V2 image actions and identity clear in compact app layouts. */
@media(max-width:767px){
 .demo-social .demo-workspace .social-person-profile .social-person-photo{flex-basis:44px;width:44px;height:44px}
 .demo-social .demo-workspace .social-feed.is-grid .social-person-profile .social-person-photo{display:none}
 .demo-social .demo-workspace .social-photo-wrap>.social-photo-label{min-height:44px;min-width:44px;font-size:9px;padding:8px 10px;letter-spacing:.025em}
 .demo-social .demo-workspace .social-photo-wrap>.social-photo-identity{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:7px 10px}
 .demo-social .demo-workspace .social-photo-identity>.social-like.icon-btn{margin:0;width:48px;min-width:48px;height:48px;min-height:48px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-wrap>.social-photo-identity{grid-template-columns:minmax(0,1fr) 44px;gap:6px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-identity>.social-like.icon-btn{width:44px;min-width:44px;height:44px;min-height:44px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-identity>.social-photo-name strong{font-size:24px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-identity>.social-photo-name>span{font-size:17px}
 .demo-social .demo-workspace .social-feed.is-grid .social-photo-wrap>.social-photo-label{font-size:8px;padding:7px;letter-spacing:0}
 .demo-social .demo-workspace .social-post-body .social-caption{padding-top:9px}
 .demo-social .demo-workspace .social-post-body .social-post-actions{flex-direction:row;justify-content:space-between;align-items:center;min-height:44px;margin:10px 0 0;padding-top:5px;gap:4px 9px}
 .demo-social .demo-workspace .social-feed.is-grid .social-post-body .social-post-actions{align-items:flex-start;justify-content:flex-start}
}
.demo-social .demo-workspace .social-photo-identity>.social-photo-name,.demo-social .demo-workspace .social-feed.is-grid .social-photo-identity>.social-photo-name{gap:0}
