:root{--bg:#f4f7fb;--surface:#fff;--text:#172338;--muted:#718096;--line:#e2e8f0;--accent:#4668e8;--shadow:0 12px 35px #192b4d12}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 system-ui,Arial,sans-serif}button,input,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}a{color:var(--accent)}.topbar{height:68px;padding:0 max(18px,calc((100% - 1160px)/2));display:flex;align-items:center;justify-content:space-between;background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:4}.brand{font-weight:900;letter-spacing:.14em;color:var(--text);text-decoration:none}.brand span,.hero h1 span{color:var(--accent)}.btn,.icon-btn,.text-btn,.tab,.nav-item{border:0;border-radius:10px;padding:10px 15px;font-weight:700}.btn{background:var(--accent);color:white}.btn:hover{filter:brightness(.94)}.outline{background:transparent;color:var(--accent);border:1px solid var(--line)}.small{padding:7px 11px;font-size:.85rem}.icon-btn{background:var(--bg)}.text-btn{background:transparent;color:var(--accent);padding-left:0}.full{width:100%}.hero{max-width:1160px;min-height:570px;margin:auto;padding:70px 25px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:35px}.eyebrow{font-size:.72rem;letter-spacing:.15em;font-weight:900;color:var(--accent)}h1{font-size:clamp(2.7rem,7vw,5rem);line-height:1.04;letter-spacing:-.05em}.lead,.muted{color:var(--muted)}.art{height:300px;display:grid;place-items:center;background:radial-gradient(circle at 70% 30%,#a9baff,transparent 55%),radial-gradient(circle at 20% 80%,#a9e8dc,transparent 45%)}.art-card{width:75%;height:190px;background:#ffffffdf;border-radius:22px;box-shadow:var(--shadow);padding:25px;display:flex;flex-direction:column;justify-content:space-between;transform:rotate(-4deg);color:#172338}.art-card strong{font-size:1.5rem;max-width:210px}.art-card span{align-self:end;color:var(--accent);font-size:2rem}.auth-wrap{min-height:70vh;display:grid;place-items:center;padding:25px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.auth{width:min(440px,100%);padding:26px}.tabs{display:flex;gap:8px;margin:15px 0}.tab{flex:1;background:var(--bg);color:var(--muted)}.tab.active{background:#e9edff;color:var(--accent)}label{display:block;font-size:.9rem;font-weight:700;margin:12px 0}input,textarea{width:100%;display:block;margin-top:6px;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text)}textarea{resize:vertical}.status{min-height:1.3em;color:var(--accent);font-size:.9rem}.status.error{color:#c24141}.app{max-width:1160px;margin:25px auto;padding:0 15px;display:grid;grid-template-columns:235px minmax(0,1fr);gap:22px;align-items:start}.sidebar{padding:17px;position:sticky;top:85px}.user-mini,.profile-top{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:1px solid var(--line)}.user-mini small,.profile-top small{display:block;color:var(--muted);font-size:.75rem;overflow-wrap:anywhere}.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#e9edff;color:var(--accent);font-weight:900}.sidebar nav{display:grid;gap:5px;padding:14px 0}.nav-item{text-align:left;background:transparent;color:var(--muted)}.nav-item.active,.nav-item:hover{background:#eef1ff;color:var(--accent)}.sidebar>a{font-size:.78rem;text-decoration:none}.main-column{min-width:0}.main-column h2{margin:0 0 15px;font-size:1.8rem}.heading{display:flex;justify-content:space-between;align-items:center}.composer,.profile-form,.message-panel{padding:18px;margin:12px 0}.composer-row,.search-row,.inline-form,.message-compose{display:flex;gap:10px;align-items:end}.file-label{color:var(--accent);cursor:pointer}.file-label input{max-width:230px;border:0;padding:5px;font-size:.8rem}.stack{display:grid;gap:14px;margin:17px 0}.post{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:15px;overflow-wrap:anywhere}.post h3{margin:0 0 7px}.post p{white-space:pre-wrap}.post-media{display:block;max-width:100%;max-height:450px;object-fit:contain;margin:10px auto;border-radius:10px}.post-actions{display:flex;gap:8px;border-top:1px solid var(--line);padding-top:10px}.post-actions button{border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:8px;padding:7px 12px}.inline-form{padding:12px 15px}.inline-form label,.search-row input,.message-compose input{flex:1}.messages{max-height:350px;min-height:130px;overflow:auto;background:var(--bg);border-radius:10px;padding:10px;margin:12px 0}.message-bubble{padding:8px 10px;border-radius:10px;background:var(--surface);margin:7px 0;overflow-wrap:anywhere}.message-bubble.mine{background:#e9edff;margin-left:12%}.profile-avatar{width:70px;height:70px;object-fit:cover;border-radius:50%;background:var(--bg)}footer{max-width:1160px;margin:30px auto 0;padding:20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:var(--muted);font-size:.82rem}.dark{--bg:#0d1422;--surface:#151f30;--text:#edf2fb;--muted:#a2afc3;--line:#2a3850;--accent:#8ca6ff;--shadow:0 12px 35px #0003}.dark .art-card{background:#18243a;color:#edf2fb}.dark .tab.active,.dark .nav-item.active{background:#27375d}.dark .message-bubble.mine{background:#27375d}@media(max-width:760px){.hero{grid-template-columns:1fr;padding:40px 20px}.art{height:210px}.app{grid-template-columns:1fr;margin-top:12px}.sidebar{position:static}.sidebar nav{grid-template-columns:repeat(3,1fr)}.nav-item{font-size:.82rem;text-align:center;padding:9px 4px}.site-footer,footer{gap:10px;flex-wrap:wrap}}@media(max-width:480px){.topbar{height:58px;padding:0 13px}.auth{padding:19px}.app{padding:0 9px}.composer-row,.search-row,.inline-form,.message-compose{flex-direction:column;align-items:stretch}.file-label input{max-width:100%}}
/* Groups, short-video Reels and personal calling */
.reels-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:15px;margin:16px 0}
.reel-card{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:10px;overflow:hidden}
.reel-card video{display:block;width:100%;max-height:420px;aspect-ratio:9/16;object-fit:cover;background:#080d16;border-radius:10px}
.reel-card p{white-space:pre-wrap;overflow-wrap:anywhere}
.call-actions{display:flex;gap:9px;flex-wrap:wrap;margin:12px 0}
.active-call{border-top:1px solid var(--line);padding-top:14px;margin-top:16px}
.active-call video{width:min(100%,360px);max-height:280px;object-fit:cover;background:#080d16;border-radius:12px;margin:5px}
.active-call video.hidden{display:none}
#incomingCalls .post{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
@media(max-width:760px){.reels-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reel-card video{max-height:330px}}
@media(max-width:430px){.reels-grid{grid-template-columns:1fr}.reel-card video{max-height:480px}}

.group-call-stage{padding:14px;margin:12px 0}.group-call-media{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.group-call-media video{width:100%;max-height:260px;aspect-ratio:4/3;object-fit:cover;background:#080d16;border-radius:10px}.group-call-media audio{width:100%}.group-call-actions{margin:10px 0}

/* Post and Reel comment threads */
.comments-section{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}.comments-section h4{margin:0 0 8px}.comments-list{display:grid;gap:8px}.comment-item{padding:9px 11px;background:var(--bg);border-radius:10px;overflow-wrap:anywhere}.comment-item>p{margin:0 0 5px}.comment-compose{display:flex;gap:8px;align-items:center;margin:8px 0}.comment-compose input{flex:1;min-width:0;margin:0}.comment-replies{margin:7px 0 0 18px;padding-left:10px;border-left:2px solid var(--line)}.comment-reply{margin:5px 0;padding:6px 8px;background:var(--surface);border-radius:8px;overflow-wrap:anywhere}.comments-section>.comment-compose{margin-top:10px}

/* Animated GIFs in private conversations */
.chat-gif{display:block;width:auto;max-width:min(100%,420px);max-height:360px;object-fit:contain;border-radius:10px;margin:8px 0;background:var(--surface)}

/* Always-visible private chat attachment control */
.chat-attachment-picker{display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;margin:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--accent);font-weight:700;font-size:.88rem;cursor:pointer}.chat-attachment-picker input{display:block;width:190px;max-width:100%;margin:0;padding:0;border:0;background:transparent;color:var(--text);font-size:.78rem}.chat-attachment-picker span{white-space:nowrap}@media(max-width:760px){.chat-attachment-picker{width:100%;justify-content:flex-start}.chat-attachment-picker input{width:auto;flex:1}}

/* Built-in GIPHY picker */
.giphy-toolbar{display:flex;align-items:center;gap:10px;margin:10px 0}.giphy-picker{padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);margin:8px 0}.giphy-search-row{display:flex;gap:8px;align-items:center}.giphy-search-row input{flex:1;min-width:0;margin:0}.giphy-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0;max-height:340px;overflow:auto}.giphy-result{width:100%;height:105px;object-fit:cover;border-radius:8px;cursor:pointer;background:var(--surface)}.giphy-result:hover{outline:2px solid var(--accent)}.giphy-attribution{font-size:.78rem;font-weight:700}@media(max-width:480px){.giphy-results{grid-template-columns:repeat(2,minmax(0,1fr))}.giphy-result{height:100px}.giphy-search-row{align-items:stretch}}


/* Full-screen vertical Reels experience */
#reelsContainer.reels-grid{display:flex;flex-direction:column;align-items:center;gap:24px;margin:18px auto;max-width:680px}
.reel-card{width:100%;padding:0;border:0;background:#080808;color:#fff;border-radius:18px;overflow:hidden;box-shadow:0 12px 34px #0002}
.reel-stage{position:relative;width:100%;height:min(78vh,820px);min-height:480px;background:#050505;overflow:hidden}
.reel-stage>video{display:block;width:100%;height:100%;object-fit:contain;background:#050505}
.reel-overlay{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:space-between;padding:20px 14px;pointer-events:none;background:linear-gradient(transparent 58%,#0009)}
.reel-info{max-width:78%;padding-bottom:5px;text-shadow:0 1px 4px #000}
.reel-info b{font-size:1rem}.reel-info p{margin:7px 0 0;font-size:.92rem;line-height:1.35}
.reel-rail{display:flex;flex-direction:column;align-items:center;gap:15px;pointer-events:auto}
.reel-action,.reel-more>summary{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;border-radius:50%;background:#171717bd;color:white;font-size:1.05rem;font-weight:800;white-space:pre-line;cursor:pointer;backdrop-filter:blur(8px)}
.reel-more{position:relative}.reel-more>summary{list-style:none;font-size:1.55rem}.reel-more>summary::-webkit-details-marker{display:none}
.reel-download-option{position:absolute;right:0;bottom:54px;white-space:nowrap;border:1px solid #ffffff30;border-radius:22px;padding:10px 14px;background:#171717ed;color:#fff;font-weight:700;box-shadow:0 8px 24px #0005;cursor:pointer}
.reel-card>.comments-section{padding:12px 15px;background:var(--surface);color:var(--text);margin:0}
@media(max-width:760px){#reelsContainer.reels-grid{max-width:100%;gap:14px;margin:12px 0}.reel-card{border-radius:0}.reel-stage{height:calc(100dvh - 190px);min-height:420px;max-height:820px}.reel-overlay{padding:18px 12px}.reel-info{max-width:76%}}

/* Reel poster follow control */
.reel-info{pointer-events:auto}
.reel-poster{display:flex;align-items:center;flex-wrap:wrap;gap:10px;pointer-events:auto}
.reel-follow-btn{border:1px solid #ffffffb0;border-radius:18px;padding:5px 12px;background:#ffffff20;color:#fff;font-size:.82rem;font-weight:800;cursor:pointer;backdrop-filter:blur(8px)}
.reel-follow-btn:active{transform:scale(.97)}
.reel-download-option{font-size:.9rem}


/* Reel comments open as an overlay inside the video, like short-video apps */
.reel-stage>.reel-comments-panel{position:absolute;z-index:6;left:10px;right:10px;bottom:10px;max-height:56%;overflow-y:auto;overscroll-behavior:contain;border:1px solid #ffffff24;border-radius:16px;padding:12px 14px;background:rgba(18,18,18,.96);color:#fff;box-shadow:0 8px 30px #0008;pointer-events:auto}
.reel-stage>.reel-comments-panel h4{color:#fff}
.reel-stage>.reel-comments-panel .comment-item{background:#292929;color:#fff}
.reel-stage>.reel-comments-panel .comment-reply{background:#202020;color:#fff}
.reel-stage>.reel-comments-panel .comment-compose input{background:#292929;color:#fff;border:1px solid #ffffff35}
.reel-stage>.reel-comments-panel .comment-compose input::placeholder{color:#c7c7c7}
.reel-stage>.reel-comments-panel .comment-compose button{flex-shrink:0}


/* One-Reel-at-a-time vertical swipe feed */
#reelsContainer.reels-grid{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  height:calc(100dvh - 150px);
  max-height:900px;
  min-height:420px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  scroll-snap-type:y mandatory;
  scroll-padding-top:0;
  -webkit-overflow-scrolling:touch;
}
#reelsContainer .reel-card{
  flex:0 0 100%;
  min-height:100%;
  scroll-snap-align:start;
  scroll-snap-stop:always;
  display:flex;
  flex-direction:column;
}
#reelsContainer .reel-stage{flex:1;min-height:0;height:100%}
@media(max-width:760px){
  #reelsContainer.reels-grid{
    height:calc(100dvh - 170px);
    min-height:420px;
    max-height:none;
    margin:8px 0;
  }
  #reelsContainer .reel-card{border-radius:0}
}

/* Status updates */
.status-card{display:grid;gap:8px}
.status-author{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.status-author small{color:var(--muted);font-size:.78rem}
.status-media{display:block;max-width:100%;max-height:520px;object-fit:contain;margin:8px auto;border-radius:12px;background:var(--bg)}


/* Immersive Reels-only screen */
body.reels-mode{overflow:hidden;background:#000}
body.reels-mode .topbar,body.reels-mode .sidebar,body.reels-mode footer,body.reels-mode #dashboardStatus{display:none!important}
body.reels-mode .app{display:block;width:100%;max-width:none;margin:0;padding:0}
body.reels-mode .main-column{width:100%;min-width:0}
body.reels-mode .reels-only-page{display:block!important;width:100%;height:100dvh;min-height:100vh;background:#000;position:relative}
body.reels-mode #reelsContainer.reels-grid{width:100%;max-width:none;height:100dvh;max-height:none;min-height:100vh;margin:0;padding:0;gap:0}
body.reels-mode #reelsContainer .reel-card{width:100%;height:100dvh;min-height:100dvh;border-radius:0;box-shadow:none}
body.reels-mode #reelsContainer .reel-stage{width:100%;height:100%;min-height:100dvh;max-height:none}
body.reels-mode #reelsContainer .reel-stage>video{width:100%;height:100%;object-fit:contain}
.reels-exit{position:fixed;z-index:20;top:12px;left:12px;width:42px;height:42px;border:1px solid #ffffff66;border-radius:50%;background:#111a;color:#fff;font-size:1.5rem;line-height:1;cursor:pointer;backdrop-filter:blur(8px)}
.profile-reel-form{padding:18px;margin:14px 0}
@media(max-width:760px){body.reels-mode .app{margin:0;padding:0}body.reels-mode #reelsContainer.reels-grid{height:100dvh;min-height:100dvh}body.reels-mode #reelsContainer .reel-card{height:100dvh;min-height:100dvh}body.reels-mode #reelsContainer .reel-stage{height:100dvh;min-height:100dvh}}


/* Stories strip at the top of the Home feed */
.home-stories-wrap{margin:12px 0 18px;padding:14px;background:var(--panel);border:1px solid var(--line);border-radius:16px}
.home-stories-wrap h3{margin:0 0 10px;font-size:1rem}
.home-stories{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:thin}
.home-story{flex:0 0 76px;display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;color:var(--text);font:inherit;font-size:.75rem;cursor:pointer;min-width:0}
.home-story>span:last-child{max-width:76px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-story-ring{width:62px;height:62px;padding:3px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#f59e0b,#ec4899,#8b5cf6)}
.home-story-thumb{width:100%;height:100%;border:2px solid var(--panel);border-radius:50%;display:grid;place-items:center;background-color:var(--bg);background-position:center;background-size:cover;color:var(--text);font-size:1.2rem}
.home-story-detail{margin-top:8px}
.home-story-detail .status-media{max-height:65vh}


/* Unitary vibrant 3D social home refresh */
:root{--panel:var(--surface);--unitary-pink:#ff3d8d;--unitary-orange:#ff8a32;--unitary-violet:#8157ff;--unitary-cyan:#18c6d9;--unitary-green:#28c98b}
body{background:radial-gradient(ellipse at 8% 5%,#ffb34730,transparent 28%),radial-gradient(ellipse at 92% 12%,#a855f730,transparent 30%),radial-gradient(ellipse at 55% 95%,#20c7c030,transparent 35%),var(--bg)}
.topbar{background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(18px);box-shadow:0 8px 30px #24124b12;border-bottom:1px solid color-mix(in srgb,var(--unitary-violet) 18%,var(--line))}
.brand{font-size:1.12rem;background:linear-gradient(100deg,var(--unitary-pink),var(--unitary-violet),var(--unitary-cyan));-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 5px 18px #8157ff22}
.brand span{color:var(--unitary-orange)}
.app{max-width:1240px;gap:25px;margin-top:22px}
.sidebar{border-radius:22px;background:linear-gradient(150deg,color-mix(in srgb,var(--surface) 96%,#fff),color-mix(in srgb,var(--surface) 88%,#b8a3ff));box-shadow:0 18px 42px #38206b18, inset 0 1px 0 #ffffffb8;border:1px solid color-mix(in srgb,var(--unitary-violet) 18%,var(--line))}
.avatar{background:linear-gradient(140deg,var(--unitary-orange),var(--unitary-pink),var(--unitary-violet));color:white;box-shadow:0 6px 16px #a33c9b55}
.nav-item{border-radius:13px;transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.nav-item:hover{transform:translateX(3px);background:linear-gradient(100deg,#ff3d8d18,#8157ff1c,#18c6d918);box-shadow:0 7px 16px #5532a018}
.nav-item.active{color:white;background:linear-gradient(110deg,var(--unitary-pink),var(--unitary-violet) 58%,#477be8);box-shadow:0 9px 22px #8157ff45}
.main-column [data-section-panel="home"]{max-width:820px;margin:0 auto}
.main-column [data-section-panel="home"]>.heading{padding:20px 22px;margin-bottom:15px;border-radius:22px;color:white;background:linear-gradient(115deg,#ff6b45,#ee3f91 48%,#7555ef 100%);box-shadow:0 16px 32px #9c3f8d35;position:relative;overflow:hidden}
.main-column [data-section-panel="home"]>.heading:after{content:"✦";position:absolute;right:24px;top:-24px;font-size:8rem;color:#ffffff25;transform:rotate(18deg)}
.main-column [data-section-panel="home"]>.heading .eyebrow{color:#fff;font-weight:800}
.main-column [data-section-panel="home"]>.heading h2{margin:0;font-size:1.8rem;text-shadow:0 3px 12px #54204b44}
.main-column [data-section-panel="home"]>.heading .btn{position:relative;z-index:1;background:#ffffff20;color:#fff;border:1px solid #ffffff80;backdrop-filter:blur(8px)}
.home-stories-wrap{padding:17px 16px 10px;border:1px solid color-mix(in srgb,var(--unitary-pink) 25%,var(--line));border-radius:21px;background:linear-gradient(145deg,color-mix(in srgb,var(--surface) 94%,#ffb8d8),color-mix(in srgb,var(--surface) 92%,#bcb0ff));box-shadow:0 14px 30px #5d31951b,inset 0 1px 0 #fff}
.home-stories-wrap h3{font-size:1.05rem;letter-spacing:.01em}
.home-story-ring{background:conic-gradient(from 30deg,var(--unitary-orange),var(--unitary-pink),var(--unitary-violet),var(--unitary-cyan),var(--unitary-orange));box-shadow:0 7px 17px #8a42a53b;transition:transform .2s ease,filter .2s ease}
.home-story:hover .home-story-ring{transform:translateY(-4px) scale(1.06);filter:saturate(1.2)}
.home-story-thumb{background-color:var(--surface)}
.composer{border-radius:20px!important;border:1px solid color-mix(in srgb,var(--unitary-violet) 23%,var(--line));background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface) 93%,#d7c7ff));box-shadow:0 14px 30px #3b26721a,inset 0 1px 0 #fff}
.btn{background:linear-gradient(110deg,#ff5b62,#ee3f91 48%,#7957ef);box-shadow:0 7px 17px #a33e9d38;transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}
.btn:hover{filter:brightness(1.06);transform:translateY(-2px);box-shadow:0 11px 22px #a33e9d48}
.btn.outline{background:color-mix(in srgb,var(--surface) 90%,#e5dfff);color:var(--unitary-violet);border:1px solid color-mix(in srgb,var(--unitary-violet) 35%,var(--line));box-shadow:none}
.post{border-radius:20px;background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface) 97%,#e8dfff));border:1px solid color-mix(in srgb,var(--unitary-cyan) 18%,var(--line));box-shadow:0 12px 28px #35216c16,inset 0 1px 0 #ffffffb8;transition:transform .2s ease,box-shadow .2s ease}
.post:hover{transform:translateY(-2px);box-shadow:0 17px 34px #35216c20}
.post-actions button{border-radius:20px;background:linear-gradient(110deg,#ffeff5,#f0edff);border-color:#e7d7ff;color:#653dc4}
.post-actions button:hover{background:linear-gradient(110deg,#ffd9e9,#ded5ff)}
input,textarea{border-radius:12px;border-color:color-mix(in srgb,var(--unitary-violet) 22%,var(--line))}
input:focus,textarea:focus{outline:2px solid color-mix(in srgb,var(--unitary-violet) 35%,transparent);border-color:var(--unitary-violet)}
.dark{--panel:var(--surface)}
.dark body{background:radial-gradient(ellipse at 8% 5%,#ff7b4520,transparent 28%),radial-gradient(ellipse at 92% 12%,#a855f722,transparent 30%),radial-gradient(ellipse at 55% 95%,#20c7c020,transparent 35%),var(--bg)}
.dark .sidebar{background:linear-gradient(145deg,#1a2439,#20203c);box-shadow:0 18px 42px #0005,inset 0 1px 0 #ffffff12}
.dark .home-stories-wrap{background:linear-gradient(145deg,#1b263d,#29213f);box-shadow:0 14px 30px #0004}
.dark .composer,.dark .post{background:linear-gradient(145deg,#172338,#20213a);box-shadow:0 14px 30px #0004,inset 0 1px 0 #ffffff0b}
.dark .post-actions button{background:linear-gradient(110deg,#32233e,#252b49);border-color:#51406d;color:#f0ddff}
@media(max-width:760px){
 .app{margin-top:10px;gap:12px}
 .sidebar{border-radius:17px;padding:11px}
 .sidebar nav{display:flex;overflow-x:auto;gap:7px;padding:10px 0;scrollbar-width:none}
 .sidebar nav::-webkit-scrollbar{display:none}
 .nav-item{flex:0 0 auto;white-space:nowrap;padding:9px 12px}
 .main-column [data-section-panel="home"]>.heading{padding:17px 16px;border-radius:18px}
 .home-stories-wrap{border-radius:18px}
 .composer{border-radius:17px!important}
 .post{border-radius:17px}
}


/* Profile-first publishing controls */
.profile-publishing{display:grid;gap:12px;margin:18px 0}
.profile-publishing>h3{margin:8px 0 0}
.profile-publish-form{padding:18px;margin:0;border-radius:20px}
.profile-publish-form h4{margin:0 0 10px}
#miniAvatar{background-position:center;background-size:cover;background-repeat:no-repeat}
#profileAvatar{width:82px;height:82px;object-fit:cover;border-radius:50%;border:3px solid transparent;background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(135deg,#ff8a32,#ff3d8d,#8157ff,#18c6d9) border-box;box-shadow:0 8px 22px #8157ff30}
.profile-form .file-label{display:flex;flex-direction:column;gap:7px}
.profile-form .file-label input{max-width:100%}
@media(max-width:760px){.profile-publish-form{padding:15px}.profile-publishing{gap:10px}}

.username-suggestions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.username-suggestions button{border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:var(--surface)}.username-suggestions button.selected{outline:2px solid var(--unitary-violet)}
.unitary-feature-hub{margin:24px 0;display:grid;gap:12px}.feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.feature-card{padding:16px;display:flex;flex-direction:column;gap:10px;min-width:0}.feature-card h4{margin:0}.feature-card .btn{align-self:flex-start}.feature-list{display:grid;gap:8px;margin-top:6px;max-height:260px;overflow:auto}.feature-entry{padding:10px;border-radius:12px;background:color-mix(in srgb,var(--surface) 86%,#bda9ff);border:1px solid color-mix(in srgb,var(--unitary-violet) 18%,var(--line))}.feature-entry p{margin:5px 0 0;overflow-wrap:anywhere}.feature-entry small{display:block;margin-top:4px}@media(max-width:760px){.feature-grid{grid-template-columns:1fr}.feature-card{padding:14px}}


/* Reel layout inspired by the supplied Unitary sketch */
body.reels-mode #reelsContainer .reel-overlay{
  padding:calc(22px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(30px + env(safe-area-inset-bottom)) 16px;
  background:linear-gradient(transparent 48%,rgba(0,0,0,.12) 66%,rgba(0,0,0,.72) 100%);
}
body.reels-mode #reelsContainer .reel-info{max-width:calc(100% - 72px);padding:0 8px 6px 2px;pointer-events:auto}
body.reels-mode #reelsContainer .reel-poster{display:block;margin-bottom:7px}
body.reels-mode #reelsContainer .reel-poster b{font-size:.98rem;color:#fff}
body.reels-mode #reelsContainer .reel-info p{max-width:100%;font-size:.9rem;line-height:1.35;color:#fff;text-shadow:0 1px 5px #000}
body.reels-mode #reelsContainer .reel-rail{flex:0 0 52px;gap:17px;margin:0 0 2px;align-self:flex-end}
body.reels-mode #reelsContainer .reel-avatar-button{
  position:relative;display:grid;place-items:center;width:48px;height:48px;min-width:48px;min-height:48px;
  padding:0;border:2px solid #fff;border-radius:50%;background:#252525;color:#fff;overflow:visible;
  box-shadow:0 2px 12px #0008;cursor:pointer;
}
body.reels-mode #reelsContainer .reel-avatar-button>img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
body.reels-mode #reelsContainer .reel-avatar-initial{font-size:1.05rem;font-weight:800}
body.reels-mode #reelsContainer .reel-follow-badge{
  position:absolute;right:-3px;bottom:-5px;display:grid;place-items:center;width:19px;height:19px;
  border:2px solid #080808;border-radius:50%;background:#ff3e72;color:#fff;font-size:13px;font-weight:900;line-height:1;
}
body.reels-mode #reelsContainer .reel-action{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  width:48px;min-width:48px;min-height:40px;height:auto;padding:1px 0;border:0;border-radius:12px;
  background:transparent;color:#fff;font-size:1rem;line-height:1;box-shadow:none;backdrop-filter:none;
}
body.reels-mode #reelsContainer .reel-action svg{display:block;width:31px;height:31px;overflow:visible;filter:drop-shadow(0 2px 3px #000a)}
body.reels-mode #reelsContainer .reel-action-count{color:#fff;font-size:.72rem;font-weight:800;line-height:1.05;text-shadow:0 1px 4px #000}
body.reels-mode #reelsContainer .reel-action.is-heart{color:#ff4268}
body.reels-mode #reelsContainer .reel-action.is-bookmark{color:#ffd166}
body.reels-mode #reelsContainer .reel-more>summary{
  display:grid;place-items:center;width:44px;height:38px;min-width:44px;min-height:38px;
  border:0;border-radius:12px;background:transparent;color:#fff;font-size:1.7rem;line-height:1;
  text-shadow:0 2px 5px #000;cursor:pointer;
}
body.reels-mode #reelsContainer .reel-download-option{right:48px;bottom:0}
.saved-reel-item{display:grid;gap:9px}
.saved-reel-preview{display:block;width:min(100%,320px);max-height:480px;aspect-ratio:9/16;object-fit:contain;background:#080808;border-radius:12px}
@media(max-width:480px){
  body.reels-mode #reelsContainer .reel-rail{flex-basis:48px;gap:15px}
  body.reels-mode #reelsContainer .reel-avatar-button{width:44px;height:44px;min-width:44px;min-height:44px}
  body.reels-mode #reelsContainer .reel-action{width:44px;min-width:44px}
  body.reels-mode #reelsContainer .reel-action svg{width:29px;height:29px}
}


/* Reels interaction polish: automatic audio attempt and follow badge */
body.reels-mode #reelsContainer .reel-stage video{cursor:pointer}
body.reels-mode #reelsContainer .reel-follow-badge{
 display:grid;place-items:center;width:20px;height:20px;border:2px solid #080808;
 border-radius:50%;background:#ff3e72;color:#fff;font-size:17px;font-weight:800;line-height:1;
}
body.reels-mode #reelsContainer .reel-avatar-button[data-following="true"] .reel-follow-badge{display:none}


/* Unitary profile statistics */
.profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0 8px;padding:15px 10px;border:1px solid var(--border,rgba(128,128,128,.22));border-radius:16px;background:var(--panel,rgba(255,255,255,.72));box-shadow:0 8px 22px rgba(20,20,40,.07);text-align:center}
.profile-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0}
.profile-stat strong{font-size:1.35rem;font-weight:850;line-height:1.2;font-variant-numeric:tabular-nums}
.profile-stat span{font-size:.78rem;font-weight:650;opacity:.78}
.profile-stats-note{margin:0 2px 12px;font-size:.75rem}
@media(max-width:420px){.profile-stats{gap:4px;padding:13px 5px}.profile-stat strong{font-size:1.15rem}.profile-stat span{font-size:.7rem}}

/* Unitary branded welcome screen and rotating three-colour loader */
.unitary-splash{position:fixed;z-index:99999;inset:0;display:grid;place-items:center;background:radial-gradient(circle at 50% 38%,#f2eaff 0,#fff 58%,#f7f3ff 100%);opacity:1;visibility:visible;transition:opacity .45s ease,visibility .45s ease}
.unitary-splash.splash-hidden{opacity:0;visibility:hidden;pointer-events:none}
.splash-inner{display:flex;flex-direction:column;align-items:center;gap:18px;padding:24px;text-align:center}
.splash-logo{display:block;width:min(76vw,390px);max-height:48vh;object-fit:contain;filter:drop-shadow(0 14px 24px #4b1c8c20)}
.splash-inner p{margin:0;color:#6d4b91;font-size:.92rem;font-weight:650;letter-spacing:.03em}
.unitary-loader{position:relative;width:54px;height:54px;animation:unitary-orbit 1.2s linear infinite}
.unitary-loader i{position:absolute;width:13px;height:13px;border-radius:50%;top:0;left:20px;background:#8b35e8;box-shadow:0 2px 9px #8b35e855}
.unitary-loader i:nth-child(2){top:35px;left:0;background:#ff4fa3;box-shadow:0 2px 9px #ff4fa355}
.unitary-loader i:nth-child(3){top:35px;left:40px;background:#16c5d4;box-shadow:0 2px 9px #16c5d455}
@keyframes unitary-orbit{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.unitary-loader{animation-duration:3s}.unitary-splash{transition:none}}


/* Purple decorative opening screen */
.unitary-splash{
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 18% 18%,#d58bff55 0,transparent 34%),
    radial-gradient(ellipse at 86% 24%,#ff70c455 0,transparent 30%),
    radial-gradient(ellipse at 72% 88%,#7c5cff66 0,transparent 36%),
    linear-gradient(140deg,#260653 0%,#4b1687 48%,#24104f 100%);
}
.unitary-splash:before,.unitary-splash:after{
  content:"";
  position:absolute;
  z-index:0;
  pointer-events:none;
  border:1px solid #ffffff26;
  border-radius:50%;
}
.unitary-splash:before{
  width:min(88vw,650px);height:min(88vw,650px);
  box-shadow:0 0 0 28px #ffffff08,0 0 0 58px #ffffff06,0 0 90px #d78bff22;
  transform:translate(-5%,2%) rotate(-18deg);
}
.unitary-splash:after{
  width:min(65vw,440px);height:min(65vw,440px);
  border-style:dashed;border-color:#ffc5f044;
  transform:translate(15%,-4%) rotate(28deg);
}
.splash-inner{position:relative;z-index:1}
.splash-logo{filter:drop-shadow(0 16px 32px #12002f88) drop-shadow(0 0 22px #e7baff55)}
.splash-inner p{color:#f2e6ff;text-shadow:0 2px 12px #16002e99}
.unitary-loader i{box-shadow:0 0 15px currentColor,0 3px 12px #13002e99}
.unitary-loader i:nth-child(1){background:#e4a5ff;color:#e4a5ff}
.unitary-loader i:nth-child(2){background:#ff75bd;color:#ff75bd}
.unitary-loader i:nth-child(3){background:#65e7ef;color:#65e7ef}

.splash-tagline{
  margin:0 0 2px!important;
  color:#fff!important;
  font-size:clamp(.95rem,3.2vw,1.18rem)!important;
  font-weight:850!important;
  letter-spacing:.2em!important;
  text-transform:uppercase;
  text-shadow:0 2px 16px #f0caff88;
}
