*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#f7f7fb}body{background:#0b0b12}.site-bg{position:fixed;inset:0;z-index:-2;background:linear-gradient(135deg,var(--bg1),var(--bg2));background-size:cover}.site-bg:before{content:"";position:absolute;inset:0;background:var(--bg-image) var(--bg-position)/var(--bg-size) no-repeat;opacity:.9}.site-bg:after{content:"";position:absolute;inset:0;background:rgba(5,7,12,var(--bg-overlay))}.topbar{position:sticky;top:0;z-index:20;height:68px;display:flex;align-items:center;gap:20px;padding:0 max(18px,calc((100% - 1120px)/2));background:rgba(9,10,18,.72);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.1)}.brand{font-size:23px;font-weight:900;text-decoration:none;color:#fff;display:flex;align-items:center;gap:9px}.brand-dot{width:14px;height:14px;border-radius:50%;background:linear-gradient(135deg,#a855f7,#22c55e);box-shadow:0 0 18px #7c3aed}.search{flex:1;max-width:440px;display:flex;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.1);border-radius:14px;overflow:hidden}.search input{width:100%;background:none;border:0;outline:0;color:#fff;padding:11px 14px}.search button{background:none;border:0;color:#fff;padding:0 15px}.navlinks{display:flex;align-items:center;gap:12px}.navlinks a{color:#ddd;text-decoration:none;font-size:14px}.admin-link{color:#86efac!important}.container{width:min(1120px,calc(100% - 28px));margin:28px auto 70px}.grid{display:grid;grid-template-columns:minmax(0,680px) 320px;gap:22px}.card{background:rgba(14,15,25,.78);border:1px solid rgba(255,255,255,.1);border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.22);backdrop-filter:blur(16px);overflow:hidden}.pad{padding:20px}.muted{color:#a8a9b8}.btn{border:0;border-radius:12px;padding:10px 16px;color:#fff;background:linear-gradient(135deg,#7c3aed,#16a34a);cursor:pointer;font-weight:700;text-decoration:none;display:inline-block}.btn.secondary{background:rgba(255,255,255,.09)}.input,.textarea{width:100%;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:12px;color:#fff;outline:none}.textarea{min-height:100px;resize:vertical}.form-row{margin-bottom:14px}.form-row label{display:block;margin-bottom:7px;font-size:13px;color:#c7c8d2}.avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#7c3aed,#22c55e);display:grid;place-items:center;font-weight:800}.userline{display:flex;align-items:center;gap:11px}.post{margin-bottom:18px}.post-head{padding:16px;display:flex;justify-content:space-between;align-items:center}.post-media{width:100%;display:block;max-height:720px;object-fit:cover;background:#050507}.post-body{padding:14px 16px}.actions{display:flex;gap:18px;margin-bottom:9px}.actions form{display:inline}.icon-btn{background:none;border:0;color:#eee;font-size:20px;cursor:pointer;padding:0}.liked{color:#fb7185}.stories{display:flex;gap:14px;overflow:auto;padding:16px;margin-bottom:18px}.story{min-width:68px;text-align:center;font-size:11px}.story-ring{width:60px;height:60px;padding:3px;border-radius:50%;background:linear-gradient(135deg,#a855f7,#22c55e);margin:auto}.story-ring img{width:100%;height:100%;object-fit:cover;border-radius:50%;border:3px solid #11121a}.flash{padding:12px 15px;border-radius:12px;background:rgba(34,197,94,.13);border:1px solid rgba(34,197,94,.3);margin-bottom:15px}.error{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.3)}.profile-hero{padding:25px;display:flex;gap:20px;align-items:center}.profile-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#7c3aed,#22c55e)}.statbar{display:flex;gap:25px;margin-top:12px}.statbar b{display:block}.comment{padding:9px 0;border-top:1px solid rgba(255,255,255,.07)}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.center{max-width:460px;margin:50px auto}.h1{font-size:30px;margin:0 0 8px}.admin-shell{display:grid;grid-template-columns:230px 1fr;gap:20px}.sidebar{padding:16px;position:sticky;top:88px;height:max-content}.sidebar a{display:block;color:#d7d7df;text-decoration:none;padding:11px;border-radius:10px}.sidebar a:hover{background:rgba(255,255,255,.07)}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.metric{padding:18px}.metric strong{font-size:26px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:12px;border-bottom:1px solid rgba(255,255,255,.08);white-space:nowrap}.color-input{height:44px;width:100%;padding:4px;background:#fff;border-radius:10px;border:0}.preview{min-height:220px;border-radius:18px;border:1px solid rgba(255,255,255,.12);position:relative;overflow:hidden;background:linear-gradient(135deg,var(--p1),var(--p2))}.preview:after{content:"";position:absolute;inset:0;background:rgba(0,0,0,var(--po));}.preview span{position:absolute;z-index:2;inset:0;display:grid;place-items:center;font-size:24px;font-weight:900}@media(max-width:850px){.grid,.admin-shell{grid-template-columns:1fr}.sidebar{position:static}.metrics{grid-template-columns:1fr 1fr}.navlinks a:nth-child(-n+2){display:none}.search{max-width:none}.topbar{gap:10px}.container{width:min(100% - 18px,680px)}}@media(max-width:560px){.metrics{grid-template-columns:1fr 1fr}.two{grid-template-columns:1fr}.topbar{height:auto;min-height:62px;flex-wrap:wrap;padding:10px 12px}.search{order:3;flex-basis:100%}.navlinks{margin-left:auto}.post-media{max-height:500px}}
/* Instagram-style profile v4 */
.profile-page{max-width:980px;margin:0 auto}.profile-cover{position:relative;padding:34px;overflow:hidden;background:linear-gradient(135deg,rgba(16,15,37,.94),rgba(11,31,32,.92))}.cover-glow{position:absolute;width:360px;height:360px;right:-100px;top:-170px;background:radial-gradient(circle,rgba(124,58,237,.5),transparent 68%);pointer-events:none}.profile-main{position:relative;display:flex;gap:28px;align-items:center}.profile-avatar{display:grid;place-items:center;overflow:hidden;flex:none;background:linear-gradient(135deg,#7c3aed,#22c55e);font-weight:900;color:#fff}.profile-avatar img{width:100%;height:100%;object-fit:cover}.profile-avatar.xl{width:86px;height:86px;border-radius:50%;font-size:30px}.profile-avatar.lg{width:74px;height:74px;border-radius:50%;font-size:26px}.profile-avatar.xxl{width:132px;height:132px;border-radius:50%;font-size:48px;border:5px solid rgba(255,255,255,.12);box-shadow:0 12px 35px rgba(0,0,0,.25)}.profile-main-info{flex:1;min-width:0}.profile-name-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.profile-actions form{margin:0}.profile-bio{line-height:1.6;max-width:680px;margin:15px 0 8px;color:#e9e9ef}.profile-meta{display:flex;gap:16px;flex-wrap:wrap;font-size:13px;color:#aeb0bd}.profile-meta a{color:#9ee6ba;text-decoration:none}.profile-stats{position:relative;display:flex;gap:45px;margin-top:28px;padding-top:22px;border-top:1px solid rgba(255,255,255,.1)}.profile-stats div{text-align:center;min-width:70px}.profile-stats b{font-size:18px;display:block}.profile-stats span{font-size:12px;color:#a8a9b8}.profile-tabs{margin:18px 0;display:flex;justify-content:center;gap:8px;padding:8px}.profile-tabs a{flex:1;max-width:190px;padding:14px 10px;text-align:center;color:#aeb0bd;text-decoration:none;border-radius:12px;font-size:14px;font-weight:700}.profile-tabs a.active{color:#fff;background:linear-gradient(135deg,rgba(124,58,237,.35),rgba(34,197,94,.2));box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}.profile-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.gallery-item{position:relative;aspect-ratio:1/1;display:block;background:#151521;overflow:hidden}.gallery-item img,.gallery-item video{width:100%;height:100%;display:block;object-fit:cover}.gallery-item:hover img,.gallery-item:hover video{transform:scale(1.035)}.gallery-item img,.gallery-item video{transition:transform .25s}.gallery-hover{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.42);opacity:0;color:#fff;font-weight:800;transition:.2s}.gallery-item:hover .gallery-hover{opacity:1}.media-badge{position:absolute;right:10px;top:10px;background:rgba(0,0,0,.55);padding:6px 8px;border-radius:10px}.text-tile{height:100%;display:grid;place-items:center;padding:20px;text-align:center;color:#e6e6ee;background:linear-gradient(135deg,rgba(124,58,237,.45),rgba(34,197,94,.25))}.empty-state{grid-column:1/-1;text-align:center;padding:60px 20px}.empty-icon{font-size:44px;margin-bottom:10px}.story-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.story-tile{position:relative;aspect-ratio:3/4;border-radius:18px;overflow:hidden;text-decoration:none;color:#fff;background:#14141f}.story-tile img{width:100%;height:100%;object-fit:cover}.story-tile:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.85))}.story-tile div{position:absolute;z-index:2;bottom:14px;left:14px;display:flex;flex-direction:column;gap:3px}.story-tile small{color:#ddd}.profile-settings{max-width:1000px;margin:auto}.settings-head{display:flex;gap:18px;align-items:center;padding:25px;margin-bottom:18px}.eyebrow{font-size:11px;letter-spacing:1.5px;color:#8ee6b1;font-weight:800;margin-bottom:5px}.settings-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px}.section-title{display:flex;justify-content:space-between;margin-bottom:20px}.section-title b{font-size:18px}.section-title small{display:block;color:#9b9ca9;margin-top:4px}.avatar-upload{display:flex;align-items:center;gap:12px;margin-bottom:22px;flex-wrap:wrap}.file-label{cursor:pointer}.field-hint{font-size:11px;color:#777987;margin-top:5px}.settings-note{margin-top:25px;padding:15px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.03)}.settings-note p{margin-bottom:0}.bio-text{min-height:130px}.story-create{display:flex;align-items:center;justify-content:space-between;gap:20px}.story-upload{display:flex;gap:10px;align-items:center}.story-list{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:18px}.story-card{background:rgba(14,15,25,.82);border:1px solid rgba(255,255,255,.1);border-radius:18px;overflow:hidden}.story-card-head{padding:13px}.story-card>img{width:100%;aspect-ratio:4/5;object-fit:cover;display:block}.avatar.sm{width:34px;height:34px;border-radius:50%;font-size:13px}.post-video{background:#050507}.center-wide{max-width:720px;margin:50px auto}
@media(max-width:760px){.profile-cover{padding:22px}.profile-main{align-items:flex-start}.profile-avatar.xxl{width:92px;height:92px;font-size:34px}.profile-name-row{display:block}.profile-actions{margin-top:12px}.profile-stats{gap:15px;justify-content:space-between}.profile-stats div{min-width:0}.profile-tabs span{display:block;font-size:11px;margin-top:4px}.story-gallery{grid-template-columns:repeat(3,1fr)}.settings-grid{grid-template-columns:1fr}.story-create,.story-upload{align-items:stretch;flex-direction:column}.story-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.profile-main{flex-direction:column;align-items:center;text-align:center}.profile-main-info{width:100%}.profile-meta{justify-content:center}.profile-name-row{display:block}.profile-stats{margin-top:20px}.profile-grid{gap:2px}.story-gallery{grid-template-columns:repeat(2,1fr)}.story-list{grid-template-columns:1fr}.settings-head{align-items:flex-start}}


/* XSocial Responsive UI v6 - phone / tablet / desktop */
:root{--safe-bottom:env(safe-area-inset-bottom,0px)}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{overflow-x:hidden;min-width:0}
img,video{max-width:100%}
button,input,textarea,select{font:inherit}
.topbar{width:100%;min-width:0}
.navlinks{min-width:0;white-space:nowrap}
.navlinks a{padding:8px 5px}
.mobile-nav{display:none}
.mobile-nav a{color:#aeb0bd;text-decoration:none;text-align:center;font-size:10px;font-weight:700;min-width:48px;padding:7px 4px 5px;border-radius:12px}
.mobile-nav a span{display:block;font-size:19px;line-height:20px;margin-bottom:2px}
.mobile-nav a.active{color:#fff;background:linear-gradient(135deg,rgba(124,58,237,.32),rgba(34,197,94,.18))}
.profile-cover{box-shadow:0 25px 70px rgba(0,0,0,.22)}
.profile-tabs{position:sticky;top:78px;z-index:10;backdrop-filter:blur(18px);background:rgba(12,13,22,.78)}
.gallery-item{touch-action:manipulation}
.gallery-hover{pointer-events:none}
.btn{min-height:42px}
.input,.textarea{min-height:44px}
.table-wrap{-webkit-overflow-scrolling:touch}
.card{max-width:100%}
@media(max-width:980px){
  .topbar{padding-left:16px;padding-right:16px}
  .container{width:min(100% - 24px,900px)}
  .grid{grid-template-columns:minmax(0,1fr)}
  .grid>aside{display:none}
  .admin-shell{grid-template-columns:190px minmax(0,1fr)}
  .profile-page{width:100%}
}
@media(max-width:760px){
  body{padding-bottom:calc(74px + var(--safe-bottom))}
  .topbar{height:62px;padding:8px 12px;gap:9px}
  .brand{font-size:20px;gap:7px}
  .brand-dot{width:11px;height:11px}
  .search{height:42px;flex:1;max-width:none;border-radius:13px}
  .search input{min-width:0;padding:9px 11px;font-size:13px}
  .search button{padding:0 11px}
  .navlinks{display:none}
  .mobile-nav{position:fixed;display:flex;align-items:center;justify-content:space-around;gap:3px;left:0;right:0;bottom:0;z-index:100;height:68px;padding:6px 6px calc(6px + var(--safe-bottom));background:rgba(8,9,16,.9);backdrop-filter:blur(22px);border-top:1px solid rgba(255,255,255,.1);box-shadow:0 -12px 35px rgba(0,0,0,.28)}
  .container{width:calc(100% - 14px);margin:14px auto 30px}
  .card{border-radius:16px}
  .pad{padding:15px}
  .two{grid-template-columns:1fr}
  .metrics{gap:8px}
  .metric{padding:14px}
  .metric strong{font-size:22px}
  .post{margin-bottom:12px}
  .post-head{padding:12px}
  .post-body{padding:12px}
  .post-media{max-height:none;aspect-ratio:auto}
  .profile-cover{padding:18px 15px;border-radius:18px}
  .profile-main{gap:15px}
  .profile-avatar.xxl{width:84px;height:84px;font-size:30px;border-width:3px}
  .profile-name-row h1{font-size:25px;line-height:1.1}
  .profile-bio{font-size:14px;margin:11px 0 7px}
  .profile-meta{gap:9px;font-size:12px}
  .profile-stats{gap:6px;margin-top:17px;padding-top:15px}
  .profile-stats div{flex:1}
  .profile-stats b{font-size:16px}
  .profile-stats span{font-size:10px}
  .profile-tabs{top:68px;margin:10px 0;padding:5px;border-radius:14px}
  .profile-tabs a{padding:11px 4px;font-size:18px}
  .profile-tabs a span{display:block;font-size:10px;margin-top:3px}
  .profile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px}
  .gallery-hover{display:none}
  .story-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .story-tile{border-radius:12px}
  .settings-head{padding:17px;margin-bottom:12px}
  .settings-grid{gap:12px}
  .story-list{gap:10px}
  .admin-shell{grid-template-columns:1fr}
  .sidebar{display:flex;overflow-x:auto;gap:5px;padding:7px;position:sticky;top:69px;z-index:9}
  .sidebar a{white-space:nowrap;padding:9px 11px;font-size:12px}
  .sidebar a:hover{background:rgba(255,255,255,.07)}
  .table th,.table td{padding:9px;font-size:12px}
  .center,.center-wide{width:100%;margin:22px auto}
}
@media(max-width:480px){
  .topbar{gap:7px}
  .brand{font-size:18px}
  .brand-dot{width:9px;height:9px}
  .search input{font-size:12px}
  .search button{padding:0 9px}
  .container{width:calc(100% - 10px);margin-top:10px}
  .h1{font-size:24px}
  .btn{padding:9px 12px;font-size:13px;border-radius:11px}
  .profile-main{flex-direction:row;align-items:flex-start;text-align:left}
  .profile-avatar.xxl{width:72px;height:72px;font-size:25px;flex:0 0 72px}
  .profile-main-info{min-width:0}
  .profile-name-row h1{font-size:21px;overflow-wrap:anywhere}
  .profile-actions .btn{width:100%;margin-top:8px}
  .profile-stats{gap:2px}
  .profile-stats b{font-size:15px}
  .profile-stats span{font-size:9px}
  .story-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .story-tile{border-radius:10px}
  .story-tile div{left:9px;bottom:9px}
  .story-tile small{font-size:10px}
  .avatar-upload{align-items:flex-start}
  .story-create{padding:14px}
  .actions{gap:14px}
  .icon-btn{font-size:19px}
}
@media(min-width:761px) and (max-width:1100px){
  .topbar{padding-left:18px;padding-right:18px}
  .navlinks{gap:5px}
  .navlinks a{font-size:12px}
  .search{max-width:320px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


/* XSocial v7 - cache-safe responsive profile polish */
.mobile-nav{display:none!important}
.profile-page{width:100%;max-width:1040px;margin:0 auto}
.profile-cover{isolation:isolate}
.profile-cover:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 8% 15%,rgba(168,85,247,.18),transparent 28%),radial-gradient(circle at 92% 70%,rgba(34,197,94,.14),transparent 30%);pointer-events:none;z-index:-1}
.profile-main{min-width:0}
.profile-main-info{min-width:0}
.profile-name-row h1{letter-spacing:-.5px}
.profile-actions{flex-shrink:0}
.profile-actions .btn{box-shadow:0 8px 24px rgba(124,58,237,.2)}
.profile-stats{align-items:stretch}
.profile-stats div{padding:0 12px}
.profile-tabs{border:1px solid rgba(255,255,255,.09);box-shadow:0 12px 35px rgba(0,0,0,.12)}
.profile-tabs a{transition:background .2s ease,color .2s ease,transform .2s ease}
.profile-tabs a:hover{color:#fff;background:rgba(255,255,255,.06);transform:translateY(-1px)}
.profile-grid{border-radius:18px;overflow:hidden;box-shadow:0 18px 45px rgba(0,0,0,.16)}
.gallery-item{min-width:0}
.empty-state.card{margin:0}
@media(max-width:980px) and (min-width:761px){
  .profile-page{max-width:900px}
  .profile-cover{padding:28px}
  .profile-main{gap:22px}
  .profile-avatar.xxl{width:112px;height:112px;font-size:40px}
  .profile-stats{gap:20px}
  .profile-stats div{padding:0 8px}
}
@media(max-width:760px){
  .mobile-nav{display:flex!important}
  .profile-page{max-width:none}
  .profile-cover{padding:18px 15px;margin:0}
  .profile-main{gap:14px}
  .profile-name-row{gap:10px}
  .profile-actions{width:100%}
  .profile-actions form,.profile-actions .btn{width:100%}
  .profile-stats div{padding:0 2px}
  .profile-tabs{box-shadow:0 10px 25px rgba(0,0,0,.15)}
  .profile-tabs a{min-width:0}
}
@media(max-width:480px){
  .profile-cover{padding:16px 12px}
  .profile-avatar.xxl{width:70px;height:70px;flex-basis:70px}
  .profile-name-row h1{font-size:20px}
  .profile-stats{width:100%}
  .profile-stats div{padding:0}
  .profile-tabs a{font-size:17px}
}


/* XSocial v7.1 - avatar + account menu fix */
.avatar{overflow:hidden;flex:0 0 auto}
.avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.nav-profile{display:inline-flex!important;align-items:center;gap:7px!important}
.nav-profile img,.nav-profile>span{width:28px;height:28px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:linear-gradient(135deg,#7c3aed,#22c55e);font-size:11px;font-weight:900;color:#fff}
.nav-profile em{font-style:normal}
.profile-account-menu{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:22px;padding-top:20px;border-top:1px solid rgba(255,255,255,.09)}
.profile-account-menu a{min-width:0;text-decoration:none;color:#f5f5f7;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:12px 10px;display:flex;flex-direction:column;gap:3px;transition:.18s ease}
.profile-account-menu a:hover{background:rgba(255,255,255,.1);transform:translateY(-1px);border-color:rgba(255,255,255,.15)}
.profile-account-menu span{font-size:19px;line-height:1.1}
.profile-account-menu b{font-size:12px}
.profile-account-menu small{font-size:10px;color:#9ea0ae;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-account-menu .danger{background:rgba(239,68,68,.08);border-color:rgba(239,68,68,.16)}
.profile-account-menu .danger b{color:#fecaca}
@media(max-width:760px){
 .nav-profile em{display:none}
 .nav-profile img,.nav-profile>span{width:30px;height:30px}
 .profile-account-menu{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px;padding-top:15px}
 .profile-account-menu a{padding:11px}
 .profile-account-menu a:last-child{grid-column:1/-1}
}
@media(max-width:480px){
 .profile-account-menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .profile-account-menu a{border-radius:12px;padding:10px 9px}
 .profile-account-menu small{font-size:9px}
}

/* XSocial v8 - edit/delete controls */
.post,.story-card,.comment-row{position:relative}
.content-menu{position:absolute;right:12px;top:12px;z-index:8}
.content-menu summary{list-style:none;cursor:pointer;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(12,15,25,.68);border:1px solid rgba(255,255,255,.12);color:#fff;font-weight:900;backdrop-filter:blur(10px)}
.content-menu summary::-webkit-details-marker{display:none}
.content-menu[open] summary{background:rgba(124,58,237,.5)}
.content-menu-pop{position:absolute;right:0;top:40px;min-width:170px;padding:7px;border-radius:14px;background:#171a26;border:1px solid rgba(255,255,255,.1);box-shadow:0 18px 40px rgba(0,0,0,.35);display:grid;gap:3px}
.content-menu-pop a,.content-menu-pop button{width:100%;border:0;background:transparent;color:#f5f5f7;text-decoration:none;text-align:left;padding:10px 11px;border-radius:9px;font:inherit;font-size:13px;cursor:pointer}
.content-menu-pop a:hover,.content-menu-pop button:hover{background:rgba(255,255,255,.07)}
.content-menu-pop .danger-link{color:#fca5a5}
.comment-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-right:2px}
.comment-row .content-menu{position:relative;right:auto;top:auto;flex:0 0 auto}
.comment-row .content-menu summary{width:28px;height:28px;background:transparent;border-color:transparent;color:#9ea0ae}
.comment-row .content-menu-pop{top:34px}
.editor-page{width:100%;max-width:760px;margin:0 auto}
.editor-card{overflow:hidden}
.editor-preview{border-radius:16px;overflow:hidden;background:#0b0d14;border:1px solid rgba(255,255,255,.08);margin:0 0 18px;max-height:520px;display:grid;place-items:center}
.editor-preview img,.editor-preview video{display:block;width:100%;max-height:520px;object-fit:contain;background:#05060a}
@media(max-width:760px){.content-menu{right:9px;top:9px}.content-menu-pop{min-width:155px}.editor-page{max-width:none}.editor-card{padding:16px}.editor-preview{max-height:420px}}
/* XSocial v9 - responsive redesign, role separation, admin controls */
:root{--accent:#7c3aed;--green:#22c55e;--panel:rgba(12,15,25,.84)}
body{overflow-x:hidden}
a,button,input,textarea,select{font:inherit}
.mobile-nav{display:none!important}
.admin-badge{font-size:9px;letter-spacing:1px;padding:4px 7px;border-radius:999px;background:linear-gradient(135deg,#7c3aed,#22c55e);color:#fff;vertical-align:middle}
.admin-page-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.admin-page-head>div:first-child{min-width:0}.admin-role-note{padding:10px 13px;border-radius:12px;background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.22);color:#bbf7d0;font-weight:800;white-space:nowrap}.admin-quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.admin-quick{padding:18px;text-decoration:none;color:#fff;display:flex;flex-direction:column;gap:7px;transition:.2s}.admin-quick:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.2)}.admin-quick span{font-size:25px}.admin-quick small{color:#aeb0bd}.admin-editor{border:1px solid rgba(124,58,237,.25)}.admin-search{display:flex;gap:9px}.admin-search .input{flex:1}.admin-user-cell{display:flex;align-items:center;gap:10px;min-width:180px}.avatar.sm{width:38px;height:38px;border-radius:50%;font-size:13px}.status-pill,.role-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.status-pill.ok{background:rgba(34,197,94,.12);color:#86efac}.status-pill.off{background:rgba(239,68,68,.12);color:#fca5a5}.role-pill.admin{background:rgba(124,58,237,.18);color:#d8b4fe}.role-pill.user{background:rgba(255,255,255,.08);color:#d1d5db}.admin-actions{display:flex;gap:6px;flex-wrap:wrap}.admin-actions form{display:inline}.danger-btn{background:rgba(239,68,68,.15);color:#fecaca;border:1px solid rgba(239,68,68,.2)}button:disabled{opacity:.45;cursor:not-allowed}.broadcast-card{max-width:760px;margin:0 auto}.broadcast-icon{font-size:40px;margin-bottom:8px}.notification-item{display:flex;gap:13px;padding:15px 0;border-bottom:1px solid rgba(255,255,255,.08)}.notification-item:last-child{border-bottom:0}.notification-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(255,255,255,.07);flex:0 0 auto}.notification-copy{min-width:0}.notification-copy b{font-size:14px}.notification-copy p{margin:5px 0;color:#d6d7df;line-height:1.5}.notification-copy small{color:#8f91a0}.notification-item.announcement .notification-icon{background:linear-gradient(135deg,rgba(124,58,237,.35),rgba(34,197,94,.2))}.profile-page{max-width:1040px}.profile-cover{padding:30px}.profile-main{align-items:flex-start}.profile-main-info{padding-top:3px}.profile-name-row{align-items:center}.profile-stats{flex-wrap:wrap}.profile-account-menu{grid-template-columns:repeat(5,1fr)}.profile-tabs{position:sticky;top:78px;z-index:8}.profile-grid{background:rgba(0,0,0,.12)}.gallery-item{min-width:0}.story-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.profile-bio{overflow-wrap:anywhere}.profile-meta a,.profile-meta span{overflow-wrap:anywhere}.topbar{z-index:100}.search{min-width:0}
@media(max-width:980px){.admin-quick-grid{grid-template-columns:repeat(2,1fr)}.admin-page-head{align-items:flex-start}.profile-account-menu{grid-template-columns:repeat(3,1fr)}.story-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
 body{padding-bottom:calc(76px + var(--safe-bottom));}
 .mobile-nav{display:flex!important}
 .topbar{position:sticky;height:60px;padding:8px 10px;gap:8px}
 .brand{font-size:19px;flex:0 0 auto}.brand-dot{width:10px;height:10px}
 .search{height:40px;max-width:none;flex:1}.search input{font-size:12px;padding:8px 10px}.search button{padding:0 10px}
 .container{width:calc(100% - 12px);margin:12px auto 22px}.grid{display:block}.grid>aside{display:none}
 .mobile-nav{height:70px;padding:6px 5px calc(6px + var(--safe-bottom));background:rgba(7,9,15,.94);backdrop-filter:blur(20px)}
 .mobile-nav a{flex:1;min-width:0;text-decoration:none;color:#aeb0bd;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;font-weight:700;border-radius:12px}.mobile-nav a span{font-size:20px;line-height:1}.mobile-nav a:hover,.mobile-nav a:focus{color:#fff;background:rgba(255,255,255,.06)}
 .profile-page{width:100%;}.profile-cover{padding:16px 13px;border-radius:18px}.profile-main{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start}.profile-avatar.xxl{width:76px;height:76px;font-size:27px}.profile-name-row{display:block}.profile-name-row h1{font-size:21px;line-height:1.15;margin-bottom:3px}.profile-actions{margin-top:9px}.profile-actions form,.profile-actions .btn{width:100%}.profile-bio{font-size:13px;line-height:1.45;margin:10px 0 7px}.profile-meta{font-size:11px;gap:7px}.profile-stats{grid-column:1/-1;margin-top:8px;padding-top:12px;gap:2px}.profile-stats div{flex:1;min-width:0;padding:0}.profile-stats b{font-size:14px}.profile-stats span{font-size:9px}.profile-account-menu{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px;padding-top:13px;gap:7px}.profile-account-menu a{padding:10px;border-radius:11px}.profile-account-menu a:last-child{grid-column:1/-1}.profile-account-menu small{font-size:9px}.profile-tabs{top:62px;margin:9px 0 7px;padding:4px;border-radius:13px}.profile-tabs a{padding:9px 3px;font-size:16px;max-width:none}.profile-tabs a span{display:block;font-size:9px;margin-top:2px}.profile-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;border-radius:12px}.story-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.admin-shell{display:block}.sidebar{display:flex;overflow-x:auto;position:sticky;top:60px;z-index:20;gap:4px;padding:6px;margin-bottom:12px;border-radius:13px}.sidebar a{white-space:nowrap;font-size:11px;padding:8px 9px}.admin-page-head{display:block}.admin-page-head .btn{margin-top:8px}.admin-role-note{display:inline-block;margin-top:8px}.admin-quick-grid{grid-template-columns:1fr 1fr;gap:9px}.admin-quick{padding:13px}.admin-quick span{font-size:21px}.admin-quick b{font-size:13px}.admin-quick small{font-size:10px}.admin-search{flex-direction:column}.broadcast-card{max-width:none}.table-wrap{overflow:visible}.user-admin-table,.user-admin-table tbody,.user-admin-table tr,.user-admin-table td{display:block;width:100%}.user-admin-table thead{display:none}.user-admin-table tr{padding:12px 0;border-bottom:1px solid rgba(255,255,255,.08)}.user-admin-table tr:last-child{border-bottom:0}.user-admin-table td{border:0;padding:5px 0;white-space:normal}.user-admin-table td:before{content:attr(data-label);display:block;font-size:10px;color:#858896;text-transform:uppercase;letter-spacing:.6px;margin-bottom:3px}.user-admin-table td:last-child:before{margin-bottom:6px}.admin-actions{gap:5px}.admin-actions .btn{font-size:11px;padding:8px 9px}.settings-grid{grid-template-columns:1fr}.settings-head{padding:15px}.notifications-page{width:100%}
}
@media(max-width:430px){.brand{font-size:17px}.search input{font-size:11px}.profile-main{grid-template-columns:64px minmax(0,1fr);gap:10px}.profile-avatar.xxl{width:64px;height:64px;font-size:23px}.profile-name-row h1{font-size:18px}.profile-stats b{font-size:13px}.profile-stats span{font-size:8px}.profile-tabs a{font-size:15px}.profile-tabs a span{font-size:8px}.admin-quick-grid{grid-template-columns:1fr}.admin-user-cell{min-width:0}.admin-actions .btn{flex:1}.admin-actions form{flex:1}.admin-actions form .btn{width:100%}}
@media(max-width:340px){.brand{display:none}.search{width:100%}.profile-account-menu{grid-template-columns:1fr}.profile-account-menu a:last-child{grid-column:auto}.profile-tabs a span{display:none}.profile-tabs a{font-size:14px}.mobile-nav a{font-size:9px}.mobile-nav a span{font-size:18px}}
.profile-role{margin-left:5px;font-size:8px;vertical-align:middle}.admin-user-cell .avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
/* XSocial v10 - complete direct messages */
.dm-page{max-width:1180px;margin:0 auto}.dm-shell{display:grid;grid-template-columns:330px minmax(0,1fr);min-height:680px;overflow:hidden}.dm-sidebar{background:rgba(7,9,17,.48);border-right:1px solid rgba(255,255,255,.08);min-width:0}.dm-side-head{display:flex;align-items:center;justify-content:space-between;padding:22px 18px 15px}.dm-side-head h1{font-size:24px;margin:0 0 3px}.dm-side-head span{font-size:11px;color:#8f93a4}.dm-new-btn{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#7c3aed,#22c55e);display:grid;place-items:center;color:#fff;text-decoration:none;font-size:22px}.dm-search-wrap{margin:0 14px 12px;display:flex;align-items:center;gap:8px;padding:0 12px;border-radius:13px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08)}.dm-search-wrap span{color:#a5a8b6}.dm-search-wrap input{width:100%;height:42px;background:none;border:0;outline:0;color:#fff}.dm-search-results{margin:0 10px}.dm-search-results>a{display:flex;align-items:center;gap:10px;padding:9px;border-radius:12px;text-decoration:none;color:#fff}.dm-search-results>a:hover{background:rgba(255,255,255,.06)}.dm-search-results>a>span{display:flex;flex-direction:column;min-width:0}.dm-search-results small{color:#9295a4}.dm-section-title{font-size:10px;text-transform:uppercase;letter-spacing:1px;color:#777b8b;padding:8px 18px}.dm-conversations{padding:0 8px 14px}.dm-conversation{display:flex;align-items:center;gap:11px;padding:11px 10px;border-radius:15px;text-decoration:none;color:#fff;min-width:0}.dm-conversation:hover{background:rgba(255,255,255,.06)}.dm-conversation.active{background:linear-gradient(135deg,rgba(124,58,237,.28),rgba(34,197,94,.12));border:1px solid rgba(124,58,237,.25)}.dm-avatar{width:46px;height:46px;border-radius:50%;flex:0 0 auto;background:linear-gradient(135deg,#7c3aed,#22c55e);display:grid;place-items:center;font-weight:900;overflow:hidden}.dm-avatar img{width:100%;height:100%;object-fit:cover;display:block}.dm-avatar.small{width:42px;height:42px}.dm-conv-main{min-width:0;flex:1}.dm-conv-top{display:flex;justify-content:space-between;gap:8px}.dm-conv-top b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dm-conv-top small{font-size:9px;color:#777b89}.dm-conv-preview{position:relative;color:#9b9eac;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:22px;margin-top:3px}.dm-conv-preview i{position:absolute;right:0;top:0;min-width:17px;height:17px;border-radius:9px;background:#22c55e;color:#04110a;font-size:9px;font-style:normal;display:grid;place-items:center;font-weight:900}.dm-no-conv,.dm-no-result{padding:20px;text-align:center;color:#808392;font-size:12px}.dm-chat{min-width:0;display:flex;flex-direction:column;background:rgba(10,11,19,.38);position:relative}.dm-chat.empty{align-items:center;justify-content:center}.dm-chat-head{height:76px;flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(9,10,18,.55);backdrop-filter:blur(16px)}.dm-back{display:none;color:#fff;text-decoration:none;font-size:29px;line-height:1}.dm-person{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;min-width:0;flex:1}.dm-person>div:last-child{display:flex;flex-direction:column;min-width:0}.dm-person b{font-size:14px}.dm-person small{font-size:10px;color:#8e92a1}.dm-head-icon{width:36px;height:36px;border-radius:11px;background:rgba(255,255,255,.07);display:grid;place-items:center;color:#fff;text-decoration:none}.dm-messages{flex:1;min-height:0;overflow:auto;padding:22px 20px 14px;scroll-behavior:smooth}.dm-message-row{display:flex;align-items:flex-end;gap:8px;margin:4px 0 9px}.dm-message-row.mine{justify-content:flex-end}.dm-message-row.theirs{justify-content:flex-start}.dm-mini-avatar{width:28px;height:28px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#7c3aed,#22c55e);display:grid;place-items:center;flex:0 0 auto;font-size:9px;font-weight:900}.dm-mini-avatar img{width:100%;height:100%;object-fit:cover}.dm-bubble-wrap{max-width:min(72%,560px);position:relative}.dm-bubble{padding:9px 12px;border-radius:17px 17px 17px 5px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.07);line-height:1.45;word-break:break-word;font-size:13px}.mine .dm-bubble{border-radius:17px 17px 5px 17px;background:linear-gradient(135deg,rgba(124,58,237,.9),rgba(34,197,94,.72));border-color:transparent}.dm-bubble.deleted{font-style:italic;color:#999ca9;background:rgba(255,255,255,.045)}.dm-body-text{white-space:pre-wrap}.dm-media{margin:-2px -4px 7px;border-radius:12px;overflow:hidden}.dm-media:last-child{margin-bottom:-2px}.dm-media img,.dm-media video{display:block;max-width:100%;width:auto;max-height:360px;border-radius:10px;background:#050507}.dm-meta{display:flex;justify-content:flex-end;gap:5px;font-size:8px;color:#777b89;margin:3px 5px 0}.mine .dm-meta{color:#a8e8bf}.dm-actions{position:absolute;right:4px;top:-2px;transform:translateY(-100%);z-index:5}.dm-actions summary{list-style:none;cursor:pointer;color:#777b89;font-size:13px;padding:2px 5px}.dm-actions summary::-webkit-details-marker{display:none}.dm-actions>div{display:flex;gap:5px;padding:5px;border-radius:10px;background:#171923;border:1px solid rgba(255,255,255,.1);box-shadow:0 12px 30px rgba(0,0,0,.35)}.dm-actions a,.dm-actions button{border:0;background:none;color:#ddd;text-decoration:none;font-size:10px;white-space:nowrap;cursor:pointer;padding:6px 8px;border-radius:7px}.dm-actions a:hover,.dm-actions button:hover{background:rgba(255,255,255,.08)}.dm-actions button{color:#fca5a5}.dm-composer{margin:8px 15px 0;display:flex;align-items:flex-end;gap:8px;padding:8px;border-radius:18px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1)}.dm-attach{width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.06);display:grid;place-items:center;cursor:pointer;flex:0 0 auto;color:#ddd;font-size:22px}.dm-attach input{display:none}.dm-input-wrap{flex:1;min-width:0}.dm-input-wrap textarea{display:block;width:100%;max-height:120px;min-height:38px;resize:none;border:0;outline:0;background:none;color:#fff;font:inherit;font-size:13px;padding:9px 4px;line-height:20px}.dm-preview{font-size:9px;color:#aeb1bf;max-height:24px;overflow:hidden}.dm-send{width:42px;height:42px;border:0;border-radius:13px;background:linear-gradient(135deg,#7c3aed,#22c55e);color:#fff;font-size:18px;cursor:pointer;flex:0 0 auto}.dm-file-note{font-size:8px;color:#666a78;padding:5px 18px 12px}.dm-empty{text-align:center;padding:30px}.dm-empty-icon{width:82px;height:82px;border-radius:28px;margin:0 auto 15px;display:grid;place-items:center;font-size:35px;background:linear-gradient(135deg,rgba(124,58,237,.22),rgba(34,197,94,.12));border:1px solid rgba(255,255,255,.08)}.dm-empty h2{margin:0 0 5px}.dm-empty p{color:#9295a4;font-size:13px;margin:0 0 18px}.dm-typing{min-height:0;font-size:9px;color:#777b89;padding:0 20px}.dm-page .flash{margin:10px}
@media(max-width:850px){.dm-shell{grid-template-columns:290px minmax(0,1fr)}.dm-bubble-wrap{max-width:78%}}
@media(max-width:700px){.dm-page{margin:0 -1px}.dm-shell{display:block;min-height:calc(100vh - 95px);border-radius:16px}.dm-sidebar{display:none}.dm-chat.has-person{min-height:calc(100vh - 95px)}.dm-chat-head{height:60px;padding:0 10px}.dm-back{display:block}.dm-messages{padding:16px 10px 10px}.dm-bubble-wrap{max-width:82%}.dm-composer{margin:5px 7px 0;border-radius:16px}.dm-file-note{padding-bottom:7px}.dm-head-icon{display:none}.dm-page{width:100%}}
@media(min-width:701px){.dm-chat.empty{min-height:680px}}
.nav-dm-link{position:relative;display:inline-flex!important;align-items:center}.nav-badge{position:absolute;top:-9px;right:-9px;min-width:15px;height:15px;padding:0 4px;border-radius:8px;background:#ef4444;color:#fff;font-size:8px;display:grid;place-items:center;font-weight:900}.nav-profile img{width:28px!important;height:28px!important;border-radius:50%;object-fit:cover}.nav-profile{display:flex;align-items:center;gap:5px}.nav-profile span{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#7c3aed,#22c55e);font-size:11px;font-weight:800}.mobile-nav{display:none}.mobile-nav a{position:relative}

/* XSocial DM Bubble Polish */
.dm-page{padding:8px 0 24px}
.dm-shell{border:1px solid rgba(255,255,255,.11);box-shadow:0 24px 70px rgba(0,0,0,.28);background:rgba(10,12,22,.72);backdrop-filter:blur(22px)}
.dm-sidebar{background:linear-gradient(180deg,rgba(18,20,34,.78),rgba(8,10,18,.58))}
.dm-side-head h1{font-size:25px;letter-spacing:-.5px}
.dm-side-head span{display:block;margin-top:2px}
.dm-new-btn{box-shadow:0 10px 25px rgba(124,58,237,.22);transition:transform .18s ease,box-shadow .18s ease}
.dm-new-btn:hover{transform:translateY(-2px) rotate(3deg);box-shadow:0 14px 32px rgba(34,197,94,.18)}
.dm-search-wrap{transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}
.dm-search-wrap:focus-within{border-color:rgba(124,58,237,.55);background:rgba(255,255,255,.09);box-shadow:0 0 0 4px rgba(124,58,237,.09)}
.dm-conversation{transition:transform .16s ease,background .16s ease}
.dm-conversation:hover{transform:translateX(2px)}
.dm-conversation.active{box-shadow:inset 3px 0 0 #22c55e,0 8px 24px rgba(0,0,0,.12)}
.dm-avatar{box-shadow:0 0 0 2px rgba(255,255,255,.07);background:linear-gradient(135deg,#7c3aed 0%,#5b7cf5 45%,#22c55e 100%)}
.dm-chat{background:radial-gradient(circle at 85% 10%,rgba(124,58,237,.10),transparent 25%),radial-gradient(circle at 15% 90%,rgba(34,197,94,.08),transparent 26%),rgba(7,9,17,.42)}
.dm-chat-head{background:rgba(10,11,20,.68);box-shadow:0 6px 24px rgba(0,0,0,.12)}
.dm-person .dm-avatar{box-shadow:0 0 0 2px rgba(34,197,94,.25),0 6px 18px rgba(0,0,0,.18)}
.dm-messages{padding:26px 24px 18px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}
.dm-message-row{margin:7px 0 13px;animation:dmPop .18s ease both}
.dm-message-row.theirs{padding-right:4%}
.dm-message-row.mine{padding-left:4%}
@keyframes dmPop{from{opacity:0;transform:translateY(4px) scale(.985)}to{opacity:1;transform:none}}
.dm-bubble-wrap{max-width:min(68%,560px)}
.dm-bubble{position:relative;padding:11px 14px;border-radius:19px 19px 19px 7px;background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.055));border:1px solid rgba(255,255,255,.09);box-shadow:0 8px 22px rgba(0,0,0,.10);font-size:13.5px}
.dm-bubble:before{content:"";position:absolute;left:-6px;bottom:0;width:12px;height:12px;background:inherit;border-left:1px solid rgba(255,255,255,.09);border-bottom:1px solid rgba(255,255,255,.09);clip-path:polygon(0 100%,100% 100%,100% 0)}
.mine .dm-bubble{background:linear-gradient(135deg,#7140d9 0%,#536fd9 48%,#20a967 100%);box-shadow:0 10px 25px rgba(34,197,94,.10),0 8px 24px rgba(124,58,237,.18);border:0;border-radius:19px 19px 7px 19px}
.mine .dm-bubble:before{left:auto;right:-6px;transform:scaleX(-1);border:0;border-right:1px solid rgba(34,197,94,.18);border-bottom:1px solid rgba(34,197,94,.18)}
.dm-bubble.deleted{border-style:dashed;box-shadow:none}
.dm-body-text{letter-spacing:.01em}
.dm-meta{font-size:9px;margin:4px 7px 0;opacity:.9}
.dm-mini-avatar{box-shadow:0 0 0 2px rgba(255,255,255,.06);margin-bottom:1px}
.dm-media{margin:-4px -5px 8px;border-radius:14px;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.dm-media img,.dm-media video{max-height:380px;border-radius:13px}
.dm-actions summary{opacity:.55;transition:opacity .15s ease}
.dm-actions summary:hover{opacity:1}
.dm-composer{margin:10px 17px 0;padding:9px;border-radius:22px;background:rgba(255,255,255,.075);box-shadow:0 10px 30px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.05);transition:border-color .18s ease,box-shadow .18s ease}
.dm-composer:focus-within{border-color:rgba(124,58,237,.5);box-shadow:0 0 0 4px rgba(124,58,237,.08),0 12px 32px rgba(0,0,0,.18)}
.dm-attach{width:40px;height:40px;border-radius:14px;transition:transform .15s ease,background .15s ease}
.dm-attach:hover{transform:rotate(-8deg) scale(1.04);background:rgba(124,58,237,.18)}
.dm-send{width:44px;height:44px;border-radius:15px;box-shadow:0 8px 20px rgba(34,197,94,.18);transition:transform .15s ease,filter .15s ease}
.dm-send:hover{transform:translateY(-2px) scale(1.03);filter:brightness(1.08)}
.dm-empty-icon{box-shadow:0 14px 35px rgba(124,58,237,.12)}
.dm-empty h2{letter-spacing:-.4px}
@media(max-width:700px){
  .dm-page{padding:0;margin:0 -1px 12px}
  .dm-shell{border-radius:18px;min-height:calc(100dvh - 88px);box-shadow:0 16px 45px rgba(0,0,0,.2)}
  .dm-chat.has-person{min-height:calc(100dvh - 88px)}
  .dm-chat-head{height:62px}
  .dm-messages{padding:18px 9px 12px}
  .dm-message-row.theirs{padding-right:7%}
  .dm-message-row.mine{padding-left:7%}
  .dm-bubble-wrap{max-width:84%}
  .dm-bubble{font-size:13px;padding:10px 12px}
  .dm-composer{margin:5px 6px 0;padding:7px;border-radius:19px}
  .dm-send{width:40px;height:40px}
  .dm-attach{width:37px;height:37px}
  .dm-file-note{padding:4px 10px 8px;font-size:8px}
}
@media(max-width:380px){
  .dm-message-row.theirs,.dm-message-row.mine{padding-left:0;padding-right:0}
  .dm-bubble-wrap{max-width:88%}
  .dm-mini-avatar{width:24px;height:24px}
  .dm-meta{font-size:8px}
  .dm-input-wrap textarea{font-size:12px}
}

/* Admin logout */
.admin-menu-divider{display:block;height:1px;background:rgba(255,255,255,.08);margin:8px 4px}.sidebar .admin-logout{color:#fecaca;background:rgba(239,68,68,.08);font-weight:800}.sidebar .admin-logout:hover{background:rgba(239,68,68,.16);color:#fff}
@media(max-width:560px){.sidebar .admin-menu-divider{display:none}.sidebar .admin-logout{background:rgba(239,68,68,.12)}}

/* XSocial v11 - hardening for DM/mobile rendering */
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{min-height:100vh;background:#0b0b12}
.site-bg{position:fixed!important;inset:0!important;width:100vw;height:100vh;pointer-events:none!important;z-index:-10!important}
.topbar{width:100%!important;box-sizing:border-box!important;position:sticky!important;left:0!important;right:0!important}
.container{box-sizing:border-box!important;max-width:1120px!important}
.dm-page{width:100%!important;max-width:1180px!important;margin:0 auto!important;padding:14px 0 80px!important;box-sizing:border-box!important}
.dm-shell{width:100%!important;max-width:1180px!important;min-width:0!important;display:grid!important;grid-template-columns:minmax(250px,330px) minmax(0,1fr)!important;min-height:680px!important;overflow:hidden!important;border-radius:22px!important;background:rgba(10,12,22,.82)!important}
.dm-sidebar,.dm-chat{min-width:0!important;box-sizing:border-box!important}
.dm-chat{display:flex!important;flex-direction:column!important;min-height:680px!important}
.dm-chat.empty{align-items:center!important;justify-content:center!important}
.dm-messages{min-width:0!important;overflow:auto!important}
.dm-composer{box-sizing:border-box!important;max-width:calc(100% - 30px)!important}
.dm-input-wrap{min-width:0!important}
.dm-input-wrap textarea{box-sizing:border-box!important;min-width:0!important}
.dm-search-wrap input{min-width:0!important}
.dm-bubble-wrap{min-width:0!important;max-width:min(68%,560px)!important}
.dm-body-text{overflow-wrap:anywhere!important}
@media(max-width:850px){
 .dm-shell{grid-template-columns:minmax(220px,290px) minmax(0,1fr)!important}
 .dm-bubble-wrap{max-width:78%!important}
}
@media(max-width:760px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
 .topbar{height:60px!important;padding:8px 10px!important;gap:8px!important}
 .topbar .navlinks{display:none!important}
 .mobile-nav{display:flex!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:9999!important;width:100%!important}
 .container{width:calc(100% - 12px)!important;margin:12px auto 22px!important}
 .dm-page{width:100%!important;margin:0!important;padding:0 0 10px!important}
 .dm-shell{display:block!important;width:100%!important;min-height:calc(100dvh - 88px)!important;border-radius:18px!important}
 .dm-sidebar{display:none!important}
 .dm-chat,.dm-chat.has-person{width:100%!important;min-height:calc(100dvh - 88px)!important}
 .dm-chat-head{width:100%!important;height:62px!important;flex:0 0 62px!important}
 .dm-back{display:block!important}
 .dm-messages{width:100%!important;flex:1 1 auto!important;padding:18px 9px 12px!important}
 .dm-bubble-wrap{max-width:84%!important}
 .dm-composer{width:auto!important;max-width:none!important;margin:5px 6px 0!important}
 .dm-file-note{width:100%!important;box-sizing:border-box!important}
}
@media(max-width:430px){
 .container{width:calc(100% - 8px)!important}
 .dm-bubble-wrap{max-width:88%!important}
 .dm-mini-avatar{width:24px!important;height:24px!important}
 .dm-bubble{font-size:13px!important;padding:10px 12px!important}
 .dm-message-row.theirs,.dm-message-row.mine{padding-left:0!important;padding-right:0!important}
 .dm-side-head h1{font-size:21px!important}
}


/* XSocial v12 - DM reliability + responsive states */
.dm-shell.no-chat .dm-chat.empty{display:flex!important}
.dm-shell.no-chat .dm-sidebar{display:block!important}
.dm-shell.has-chat .dm-chat.has-person{display:flex!important}
@media(max-width:760px){
  .dm-page{min-height:calc(100dvh - 76px)!important}
  .dm-shell{min-height:calc(100dvh - 76px)!important}
  .dm-shell.no-chat .dm-sidebar{display:block!important;min-height:calc(100dvh - 76px)!important;border-right:0!important}
  .dm-shell.no-chat .dm-chat.empty{display:none!important}
  .dm-shell.has-chat .dm-sidebar{display:none!important}
  .dm-shell.has-chat .dm-chat.has-person{display:flex!important;min-height:calc(100dvh - 76px)!important}
  .dm-chat-head{padding:0 10px!important}
  .dm-messages{overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
  .dm-composer{position:sticky!important;bottom:0!important;z-index:20!important;background:rgba(12,14,23,.94)!important;backdrop-filter:blur(14px)!important}
  .dm-file-note{background:rgba(12,14,23,.94)!important}
}
@media(max-width:430px){
  .dm-side-head{padding:16px 12px 12px!important}
  .dm-side-head h1{font-size:21px!important}
  .dm-search-wrap{margin:0 10px 10px!important}
  .dm-conversations{padding:0 6px 12px!important}
  .dm-conversation{padding:10px 8px!important}
  .dm-messages{padding-left:7px!important;padding-right:7px!important}
  .dm-bubble-wrap{max-width:86%!important}
  .dm-composer{margin:4px 5px 0!important}
}
@media(max-width:340px){
  .dm-avatar{width:40px!important;height:40px!important}
  .dm-bubble-wrap{max-width:89%!important}
  .dm-attach{width:35px!important;height:35px!important}
  .dm-send{width:38px!important;height:38px!important}
}

.story-tile video{width:100%;height:100%;object-fit:cover;display:block}.story-card>video{width:100%;max-height:720px;display:block;background:#050507}.editor-preview video{width:100%;max-height:650px;display:block;object-fit:contain;background:#050507}.media-hint{display:block;font-size:11px;line-height:1.4;padding-top:4px}.post-compose-actions{align-items:center}.post-compose-actions .media-hint{grid-column:1/-1;order:3}@media(max-width:560px){.post-compose-actions .media-hint{font-size:10px}.story-card>video{max-height:75vh}}

.site-bg-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.site-bg-video+*{}

/* XSocial v16 — DM full responsive layout */
:root{--xs-mobile-nav:70px;--xs-topbar-mobile:60px}
.container:has(.dm-page){width:100%!important;max-width:1180px!important;margin:0 auto!important;padding-left:0!important;padding-right:0!important}
.dm-page{isolation:isolate}
.dm-shell.has-chat{height:calc(100dvh - 118px);max-height:calc(100dvh - 118px);min-height:560px!important}
.dm-shell.has-chat .dm-chat{height:100%;min-height:0!important;overflow:hidden!important}
.dm-shell.has-chat .dm-messages{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
.dm-shell.has-chat .dm-composer{flex:0 0 auto!important}
.dm-shell.has-chat .dm-file-note{flex:0 0 auto!important}
.dm-composer textarea{overflow-y:auto!important;overflow-x:hidden!important}
.dm-media img,.dm-media video{max-width:100%!important;width:auto;object-fit:contain}
@media(max-width:760px){
 .container:has(.dm-page){width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
 .dm-page{width:100%!important;height:auto!important;margin:0!important;padding:0!important}
 .dm-shell.has-chat{display:block!important;width:100%!important;height:calc(100dvh - var(--xs-topbar-mobile) - var(--xs-mobile-nav))!important;max-height:calc(100dvh - var(--xs-topbar-mobile) - var(--xs-mobile-nav))!important;min-height:0!important;margin:0!important;border-radius:0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
 .dm-shell.has-chat .dm-chat,.dm-shell.has-chat .dm-chat.has-person{width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important}
 .dm-shell.has-chat .dm-chat-head{height:60px!important;min-height:60px!important;flex:0 0 60px!important;padding:0 9px!important}
 .dm-shell.has-chat .dm-messages{flex:1 1 auto!important;min-height:0!important;height:auto!important;padding:14px 8px 10px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important}
 .dm-shell.has-chat .dm-composer{position:relative!important;bottom:auto!important;width:calc(100% - 10px)!important;max-width:none!important;margin:4px 5px 0!important;padding:6px!important;border-radius:18px!important;flex:0 0 auto!important}
 .dm-shell.has-chat .dm-file-note{padding:3px 9px calc(5px + env(safe-area-inset-bottom,0px))!important;line-height:1.25!important;flex:0 0 auto!important}
 .dm-shell.has-chat .dm-input-wrap textarea{min-height:38px!important;max-height:92px!important;font-size:14px!important;line-height:19px!important;padding:9px 3px!important}
 .dm-shell.has-chat .dm-attach{width:38px!important;height:38px!important;flex:0 0 38px!important}
 .dm-shell.has-chat .dm-send{width:40px!important;height:40px!important;flex:0 0 40px!important}
 .dm-shell.has-chat .dm-bubble-wrap{max-width:min(86%,520px)!important}
 .dm-shell.has-chat .dm-message-row{margin:6px 0 10px!important}
 .dm-shell.has-chat .dm-body-text{overflow-wrap:anywhere!important;word-break:break-word!important}
 .dm-shell.has-chat .dm-media{max-width:100%!important}
 .dm-shell.has-chat .dm-media img,.dm-shell.has-chat .dm-media video{max-width:min(100%,280px)!important;max-height:45dvh!important}
 .dm-shell.has-chat .dm-head-icon{display:none!important}
}
@media(max-width:430px){
 .dm-shell.has-chat .dm-bubble-wrap{max-width:90%!important}
 .dm-shell.has-chat .dm-messages{padding:10px 6px 8px!important}
 .dm-shell.has-chat .dm-composer{width:calc(100% - 8px)!important;margin-left:4px!important;margin-right:4px!important}
 .dm-shell.has-chat .dm-file-note{font-size:8px!important;text-align:center!important}
 .dm-shell.has-chat .dm-bubble{font-size:13px!important;padding:9px 11px!important}
}
@media(max-width:360px){
 :root{--xs-mobile-nav:68px;--xs-topbar-mobile:56px}
 .dm-shell.has-chat .dm-chat-head{height:56px!important;min-height:56px!important}
 .dm-shell.has-chat .dm-attach{width:35px!important;height:35px!important;flex-basis:35px!important}
 .dm-shell.has-chat .dm-send{width:38px!important;height:38px!important;flex-basis:38px!important}
 .dm-shell.has-chat .dm-input-wrap textarea{font-size:13px!important}
}
@media(min-width:761px) and (max-width:1100px){
 .container:has(.dm-page){width:calc(100% - 24px)!important}
 .dm-shell.has-chat{height:calc(100dvh - 88px);max-height:calc(100dvh - 88px)}
 .dm-bubble-wrap{max-width:76%!important}
}
@media(prefers-reduced-motion:reduce){.dm-message-row{animation:none!important}.dm-send,.dm-attach,.dm-conversation{transition:none!important}}
