@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{--bg:#090D10;--surface:#141B20;--card:#1B242A;--card2:#1B242A;--nav:#10171C;--line:#344047;--text:#F5F7F8;--muted:#A9B2B9;--accent:#C6F542;--accentText:#11160a;--authMsg:#C6F542;--accentGlow:#c6f54222;--accentGlowSoft:#c6f54218;--shadow:0 8px 24px #0003}
html[data-theme="light"]{--bg:#FFFFFF;--surface:#F5F6F7;--card:#FFFFFF;--card2:#F5F6F7;--nav:#FFFFFF;--line:#E1E5E8;--text:#171A1D;--muted:#777F86;--accent:#84B800;--accentText:#11160a;--authMsg:#577406;--accentGlow:#84b80022;--accentGlowSoft:#84b80018;--shadow:0 5px 18px #17212b12}
html[data-theme="light"] .accent-link,html[data-theme="light"] .panel-title a,html[data-theme="light"] .xm-drop-foot a{color:var(--accent)}
.logo-img{height:38px;width:auto;display:block}
.auth-card .logo-img{height:32px;width:auto;margin:0 auto}
.footer-logo{height:34px;width:auto;margin:0 auto 12px;display:block}
.dashhead .logo-img,.head .logo-img{height:34px;width:auto}
.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.page-head .logo-img{height:34px;width:auto}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;font-size:14px}button,a,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit}a{color:inherit;text-decoration:none}.topbar{height:62px;display:flex;align-items:center;gap:24px;padding:0 28px;background:var(--nav);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:9px;font-size:25px;font-weight:800;white-space:nowrap}.brand>span:last-child>span,.hero-brand span{color:var(--accent)}.brand-mark{font-size:34px;font-weight:900;color:var(--accent);line-height:1}.search{height:42px;max-width:320px;min-width:180px;display:flex;align-items:center;gap:10px;padding:0 14px;border:1px solid var(--line);border-radius:30px;background:var(--card2);color:var(--muted);flex:1}.search span{font-size:24px}.search input{background:none;border:0;outline:0;color:var(--text);width:100%}.topnav{display:flex;align-items:center;gap:22px;flex:1;white-space:nowrap}.topnav a{font-weight:600;color:var(--muted)}.topnav a.active{background:var(--accent);color:var(--accentText);padding:10px 16px;border-radius:22px}.top-actions{display:flex;align-items:center;gap:10px}.primary{background:var(--accent);color:var(--accentText);border:0;border-radius:28px;padding:12px 20px;font-weight:800;box-shadow:0 3px 12px var(--accentGlow)}.primary:hover{filter:brightness(1.05);transform:translateY(-1px)}.icon-btn,.theme-toggle{width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--card2);font-size:19px}.wallet{border:1px solid var(--line);border-radius:22px;background:var(--card2);padding:10px 14px;font-weight:700}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(140deg,#9aa8b1,#34434c);border:2px solid var(--line);font-weight:800;color:#fff;flex-shrink:0}.avatar.small{width:34px;height:34px}.avatar.alt{background:linear-gradient(140deg,#d3a28c,#59453f)}.avatar.alt2{background:linear-gradient(140deg,#d2b7a0,#74615a)}.mobile-head,.mobile-bottom{display:none}.layout{max-width:1800px;margin:auto;padding:8px 14px 14px;display:grid;grid-template-columns:275px minmax(480px,1fr) 350px;gap:14px}.left-sidebar,.right-sidebar{min-width:0}.side-nav{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px;display:grid;gap:3px}.side-nav a,.side-bottom a{height:42px;display:flex;align-items:center;gap:13px;padding:0 14px;border-radius:10px;font-size:15px;font-weight:600}.side-nav a.selected{background:var(--accent);color:var(--accentText)}.side-nav a>span,.side-bottom a>span{flex:1}.live-pill,.count{background:var(--accent);color:#17200a;border-radius:14px;padding:3px 8px;font-size:11px}.creator-promo{margin:12px 6px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--card);overflow:hidden}.promo-art{height:95px;border-radius:12px;background:linear-gradient(120deg,#28343a,#69777b);display:flex;align-items:flex-start;padding:12px;color:var(--accent);font-size:34px}.creator-promo h3{margin:10px 0 5px}.creator-promo p,.creator-feature p{color:var(--muted);line-height:1.5}.full{width:100%}.side-bottom{display:grid;gap:3px;padding:10px}.side-bottom a{color:var(--muted)}
.main{min-width:0}.hero{position:relative;overflow:visible;margin-top:0px;box-shadow:var(--shadow);border-radius:20px}.hero-banner{position:relative;aspect-ratio:3/1;overflow:visible;background:linear-gradient(90deg,#0c0d11 0%,#12151a 55%,#181c22 100%);border-radius:20px}.hero-bg{display:block;width:100%;height:auto}.hero-bg{border-radius:20px}.hero-scrim{position:absolute;left:0;right:0;top:26%;bottom:0;z-index:2;background:linear-gradient(90deg,rgba(0,0,0,.58) 0%,rgba(0,0,0,.30) 52%,rgba(0,0,0,0) 78%);-webkit-mask-image:linear-gradient(180deg,transparent,black 35%);mask-image:linear-gradient(180deg,transparent,black 35%);pointer-events:none}.hero-scrim{border-radius:0 0 20px 20px}.hero-copy{position:absolute;left:26px;top:56%;transform:translateY(-50%);z-index:6;width:46%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.hero-logo{width:420px;max-width:80%;height:auto;margin-bottom:10px}.hero-copy h1{font-size:26px;line-height:1.15;margin:0 0 8px;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.65)}.hero-copy p{margin:0 0 15px;color:#e8edef;text-shadow:0 1px 8px rgba(0,0,0,.65);font-size:15px}.hero-copy .primary{box-shadow:0 3px 14px rgba(0,0,0,.35)}.filters{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}.filter-group{display:flex;align-items:stretch;background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:3px;gap:0;min-width:0}.filter{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:transparent;border:0;border-radius:20px;padding:0 15px;height:34px;font-weight:600;font-size:13px;color:var(--text);white-space:nowrap;flex:1 1 auto}.filter svg{width:17px;height:17px;flex-shrink:0}.filter:hover{color:var(--accent)}.filter + .filter{background-image:linear-gradient(var(--line),var(--line));background-size:1px 22px;background-repeat:no-repeat;background-position:left center}.filter.active{background:var(--accent);color:var(--accentText);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 2px 8px var(--accentGlow)}.filter.active + .filter{background-image:none}.filter.active svg{color:var(--accentText)}.sort-wrap{position:relative;display:inline-flex;align-items:center;flex-shrink:0}.sort-wrap select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer;font-weight:600}.sort-wrap svg{position:absolute;right:12px;width:16px;height:16px;pointer-events:none;color:var(--muted)}select{background:var(--surface);border:1px solid var(--line);border-radius:20px;color:var(--text);padding:10px 14px}.feed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#filterEmpty{text-align:center;padding:18px 0}.post-card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:12px;box-shadow:var(--shadow);min-width:0}.post-head{display:flex;align-items:center;gap:9px;margin-bottom:10px}.post-user{display:grid;gap:3px;min-width:0}.post-user small,.model-row small{color:var(--muted)}.verified{color:#85c900}.more{margin-left:auto;border:0;background:none;font-size:22px}.post-media{height:220px;border-radius:12px;position:relative;overflow:hidden;display:grid;place-items:center}.media-placeholder{width:100%;height:100%;display:grid;place-items:center;background:linear-gradient(135deg,#8d9a9c,#d1c1b7 45%,#38464d);color:#ffffff99;font-weight:900;font-size:28px;letter-spacing:5px}.status{position:absolute;top:10px;left:10px;border-radius:18px;padding:5px 10px;font-size:11px;font-weight:800}.free{background:var(--accent);color:#18200a}.premium{background:#171b20;color:#ffe15b}.caption{margin:8px 2px;color:var(--text)}.post-actions{display:flex;align-items:center;gap:18px}.post-actions button{border:0;background:none;font-size:19px;color:var(--muted);padding:3px}.post-actions span{font-size:12px}.bookmark{margin-left:auto}.locked-media{background:linear-gradient(135deg,#465057,#9c8981,#303a40);color:white;text-align:center;align-content:center;gap:7px;padding:20px}.locked-media:before{content:"";position:absolute;inset:0;background:#1118;backdrop-filter:blur(5px)}.locked-media>*{position:relative}.lock{font-size:35px}.locked-media p{margin:0;color:#eee}.locked-media .primary{padding:9px 16px}.photo-lock{background:linear-gradient(135deg,#b9a79d,#455057)}.video-placeholder{background:linear-gradient(130deg,#25343a,#927e78,#1b282d);position:relative}.play{background:#111b;color:white;border-radius:50%;padding:15px 18px;font-size:22px}.right-sidebar{display:grid;align-content:start;gap:14px}.panel{padding:14px}.panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.panel-title h3{margin:0;font-size:17px}.panel-title a{color:#82bd00;font-weight:700;font-size:12px}.model-row{display:flex;align-items:center;gap:10px;margin:12px 0}.model-row>div:nth-child(2){display:grid;gap:4px;flex:1}.model-row .avatar{width:42px;height:42px}.follow{border:1px solid var(--line);border-radius:20px;background:var(--card2);padding:8px 15px;font-weight:700}.category-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.category-grid button,.category-grid a{height:76px;border:1px solid var(--line);border-radius:13px;background:var(--card2);display:grid;place-items:center;color:var(--accent);font-size:23px;text-decoration:none;transition:border-color .15s ease,transform .15s ease}.category-grid button svg,.category-grid a svg{width:24px;height:24px}.category-grid button:hover,.category-grid a:hover{border-color:var(--accent);transform:translateY(-1px)}.category-grid span{font-size:12px;color:var(--text);font-weight:700}.creator-feature{min-height:235px;border:1px solid var(--line);border-radius:18px;padding:20px;background:linear-gradient(120deg,var(--card2),#758184);display:flex;align-items:center}.creator-feature>div{max-width:72%}.creator-feature h2{font-size:22px;margin:5px 0}.feature-crown{color:var(--accent);font-size:28px}.below-section{margin:24px 0}.category-row{display:flex;gap:10px;flex-wrap:wrap}.category-row button,.category-row a{border:1px solid var(--line);background:var(--surface);border-radius:22px;padding:12px 18px;display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:var(--text)}.category-row button svg,.category-row a svg{width:18px;height:18px;flex:none;color:var(--accent)}
.modal-backdrop{display:none;position:fixed;inset:0;background:#0009;z-index:80;align-items:center;justify-content:center;padding:16px}.modal-backdrop.open{display:flex}.modal{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:20px;width:min(520px,100%);box-shadow:var(--shadow)}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{margin:0 0 14px}.close{border:0;background:none;font-size:28px}.field-label{display:grid;gap:8px;margin:14px 0;font-weight:600}.field-label textarea,.field-label input:not([type=radio]):not([type=file]){width:100%;background:var(--card2);border:1px solid var(--line);border-radius:10px;padding:12px;color:var(--text)}.field-label input[type=file]{padding:12px;border:1px dashed var(--line);border-radius:10px}.access-options{display:flex;gap:18px;background:var(--card2);padding:12px;border-radius:10px}.notice{color:var(--muted);font-size:12px;line-height:1.5}#formMessage{color:var(--accent)}[hidden]{display:none!important}
@media(max-width:1250px){.layout{grid-template-columns:230px minmax(430px,1fr)}.right-sidebar{display:none}.topnav{gap:12px}.topbar{gap:14px;padding:0 16px}}
@media(max-width:760px){.topbar{display:none}.mobile-head{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:var(--nav);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.mobile-head .logo-img{height:28px;width:auto}.mobile-search-row{display:none;padding:10px 14px;background:var(--nav);border-bottom:1px solid var(--line)}.mobile-search-row.open{display:block}.mobile-search-row input{width:100%;min-height:42px;border:1px solid var(--line);border-radius:22px;background:var(--card2);color:var(--text);padding:0 14px;outline:none}.mobile-head .brand{font-size:22px}.mobile-head>div{display:flex;gap:8px}.layout{display:block;padding:8px 10px 12px}.left-sidebar,.right-sidebar{display:none}.hero{border-radius:15px;margin-top:0px;overflow:hidden}.hero-banner{border-radius:15px}.hero-bg{border-radius:15px}.hero-scrim{border-radius:0 0 15px 15px}.hero-copy{left:14px;width:52%;top:50%}.hero-logo{width:110px;margin-bottom:5px}.hero-copy h1{font-size:15px;margin-bottom:5px}.hero-copy p{display:none}.hero-copy .primary{padding:8px 12px;font-size:12px}.filters{flex-direction:row;align-items:center;gap:8px}.filter-group{flex:1 1 auto;min-width:0;flex-wrap:nowrap;overflow:visible}.filter{flex:1 1 0;min-width:0;padding:0 6px;font-size:12px;gap:4px}.filter svg{width:16px;height:16px}.sort-wrap select{padding:9px 34px 9px 12px;font-size:12px}.feed-grid{grid-template-columns:1fr;gap:10px}.post-card{padding:10px}.post-media{height:auto;aspect-ratio:1.15}.post-actions{gap:14px}.mobile-bottom{display:flex;position:fixed;bottom:0;left:0;right:0;height:64px;z-index:30;background:var(--surface);border-top:1px solid var(--line);justify-content:space-around;align-items:center;padding-bottom:env(safe-area-inset-bottom)}.mobile-bottom a,.mobile-bottom button{display:grid;justify-items:center;gap:3px;background:none;border:0;color:var(--muted);font-size:18px}.mobile-bottom a svg,.mobile-bottom button svg{width:22px;height:22px}.mobile-bottom span{font-size:10px}.mobile-bottom .current{color:var(--accent)}.mobile-bottom button{color:var(--accent);font-size:24px}.creator-feature{display:none}.below-section{margin-top:14px}.category-row{display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:visible}.category-row button,.category-row a{white-space:nowrap;justify-content:center;padding:11px 10px;font-size:13px;overflow:hidden}.category-row button svg,.category-row a svg{flex:none}.category-row .category-more{grid-column:1/-1}.modal{max-height:90vh;overflow:auto}html,body{overflow-x:hidden;overflow-x:clip}body.sidebar-open{overflow:hidden}}
@media(min-width:761px) and (max-width:1000px){.layout{grid-template-columns:190px minmax(400px,1fr)}.side-nav a{font-size:13px;padding:0 9px}.brand{font-size:21px}.search{max-width:230px}}

.login-link{font-weight:700;color:var(--text);padding:9px 14px;border:1px solid var(--line);border-radius:20px}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 15% 5%,var(--accentGlowSoft),transparent 30%),var(--bg)}
.auth-card{width:min(440px,100%);padding:30px;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.auth-card .brand{justify-content:center;margin-bottom:24px}.auth-card h1{text-align:center;margin:8px 0}.muted{color:var(--muted)}.center{text-align:center}.social-logins{display:grid;gap:10px;margin:22px 0}.social-btn{height:46px;border:1px solid var(--line);border-radius:12px;background:var(--card2);color:var(--text);font-weight:700}.social-btn b{display:inline-grid;place-items:center;width:24px;margin-right:8px;font-size:18px}.or{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}.or:before,.or:after{content:"";height:1px;background:var(--line);flex:1}.accent-link{color:#91c900;font-weight:700}.consent{display:flex;gap:9px;align-items:flex-start;color:var(--muted);font-size:12px;line-height:1.5;margin:14px 0}.admin-wrap{max-width:1200px;margin:36px auto;padding:0 20px}.admin-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.admin-heading h1{margin:10px 0 4px}.admin-badge{background:var(--accent);color:#17200a;border-radius:20px;padding:8px 13px;font-size:11px;font-weight:900}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.admin-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow)}.admin-card h2{margin-top:0}.empty-library{min-height:260px;border:1px dashed var(--line);border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--muted)}.empty-library span{font-size:40px;color:var(--accent)}.empty-library small{max-width:260px;text-align:center}.security-note{margin:18px 0;padding:14px;border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:12px;line-height:1.5}
@media(max-width:760px){.admin-wrap{margin:20px auto}.admin-grid{grid-template-columns:1fr}.admin-heading{align-items:flex-start;gap:10px}.auth-card{padding:22px}}

.credentials-box{margin-top:12px;padding:14px;border:1px solid var(--accent);border-radius:12px;background:var(--card2);overflow-wrap:anywhere}.credentials-box code{user-select:all;color:var(--accent);font-weight:800}.credentials-box p{margin:7px 0}

/* --- v7 frontend fixes: toast, gallery, comments, profile modal --- */
.toast{position:fixed;left:50%;bottom:84px;transform:translateX(-50%);z-index:90;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:12px 18px;box-shadow:var(--shadow);max-width:min(520px,calc(100vw - 32px));text-align:center;font-size:13px;line-height:1.5}
.mobile-search-row{display:none}
.toast[hidden]{display:none}
.post-gallery{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.post-gallery .post-media{margin-bottom:0}
.post-gallery .post-media:only-child{grid-column:1 / -1}
.post-media img,.post-media video{width:100%;height:100%;object-fit:cover;display:block}
.post-media video{max-height:260px}
.author-link{border:0;background:none;padding:0;font-weight:800;color:var(--text);cursor:pointer;text-align:left;font-size:14px}
.author-link:hover{color:var(--accent)}
.badge-draft{display:inline-block;background:var(--muted);color:var(--bg);border-radius:12px;padding:2px 8px;font-size:11px;font-weight:800;vertical-align:middle}
.comments{margin-top:10px;border-top:1px solid var(--line);padding-top:10px}
.comments[hidden]{display:none}
.comment{display:flex;gap:8px;margin:8px 0;font-size:13px;line-height:1.5}
.comment b{flex-shrink:0}
.comment small{color:var(--muted);display:block}
.comment-form{display:flex;gap:8px;margin-top:10px}
.comment-form input{flex:1;min-height:38px;border:1px solid var(--line);border-radius:20px;background:var(--card2);color:var(--text);padding:0 12px;outline:none}
.comment-form button{border:0;background:var(--accent);color:var(--accentText);border-radius:20px;padding:8px 16px;font-weight:700}
.edit-form{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--card2)}
.edit-form textarea,.edit-form select,.edit-form input{width:100%;padding:10px;margin:6px 0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}
.edit-form .row{display:flex;gap:8px;flex-wrap:wrap}
.edit-form .row button{border:0;border-radius:20px;padding:9px 16px;font-weight:700}
.edit-form .save{background:var(--accent);color:var(--accentText)}
.edit-form .cancel{background:var(--surface);border:1px solid var(--line);color:var(--text)}
.post .actions-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.post .actions-row button{border:1px solid var(--line);background:var(--card2);border-radius:18px;padding:8px 14px;font-weight:700}
.post .actions-row button.danger{border-color:#c0392b;color:#e74c3c}.post .actions-row button.danger.armed{background:#c0392b;color:#fff;border-color:#c0392b}.del-msg{color:#e74c3c;font-size:13px;margin:6px 0 0}
.theme-toggle-btn{border:1px solid var(--line);background:var(--card2);border-radius:20px;padding:8px 14px;font-weight:700;color:var(--text)}
@media(max-width:760px){.post-gallery{grid-template-columns:1fr}}

/* --- Instant Payment Verification & Video Unlock --- */
.buy-btn{margin-top:10px}
.buy-btn:disabled{opacity:.6;cursor:default}
.buy-msg{font-size:12px;line-height:1.5;margin:10px 0 0;color:#eee;max-width:340px}
.unlocked-media video{object-fit:contain;background:#000}

/* --- Shared left sidebar (sidebar.js) --- */
.xm-side-nav{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px;display:grid;grid-template-columns:minmax(0,1fr);gap:3px}
/* W12: the grid track must be capped at the container width — without
   minmax(0,1fr) an `auto` track sizes to the longest nowrap label
   (~254px) and the sidebar bleeds out of its 190px/230px column at
   761–1250px. Group wrappers also need min-width:0 so they can shrink;
   long labels then ellipsis via .xm-label (already overflow:hidden). */
.xm-side-group,.xm-side-group-items{min-width:0}
.xm-side-nav a,.xm-side-nav button.xm-logout{height:42px;display:flex;align-items:center;gap:13px;padding:0 14px;border-radius:10px;font-size:15px;font-weight:600;color:var(--text);background:none;border:0;width:100%;text-align:left;cursor:pointer}
.xm-side-nav a:hover,.xm-side-nav button.xm-logout:hover{background:var(--card2)}
.xm-side-nav a.active{background:var(--accent);color:var(--accentText)}
.xm-side-nav a.active .xm-icon{color:var(--accentText)}
.xm-icon{display:inline-flex;flex-shrink:0;width:20px;height:20px;color:var(--text)}
.xm-icon svg{width:20px;height:20px;display:block}
.xm-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.xm-badge{background:var(--accent);color:#17200a;border-radius:14px;padding:3px 8px;font-size:11px;font-weight:800;flex-shrink:0}
.xm-side-bottom{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);display:grid;gap:3px}
.xm-side-heading{padding:12px 14px 4px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.xm-side-bottom a,.xm-side-bottom button{color:var(--muted)}
.xm-backdrop{display:none}
.sidebar-toggle{display:none}
.layout .left-sidebar{position:sticky;top:76px;align-self:start}
@media(max-width:760px){
  .sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--card2);font-size:19px}
  /* [Task 81] The drawer sizes to its content (Boss 2026-11-25, phone
     screenshot): it was a fixed 280px while the longest menu label
     ('My Subscriptions') only needs ~240px, so ~90px of empty white
     sat to the right of the items. width:max-content makes the drawer
     exactly as wide as its widest link + padding; min-width:200px keeps
     short (guest) drawers from becoming a sliver; max-width:85vw still
     caps it on narrow phones. Desktop is untouched (this rule lives in
     the <=760px block; the desktop sidebar stays a 275px grid column). */
  .layout>.left-sidebar{display:block;position:fixed;top:0;left:0;bottom:0;width:max-content;min-width:200px;max-width:85vw;z-index:70;background:var(--surface);padding:14px;overflow-y:auto;transform:translateX(-105%);transition:transform .25s ease;box-shadow:var(--shadow)}
  .layout>.left-sidebar .xm-side-nav{border:0;background:transparent;box-shadow:none;padding:0}
  body.sidebar-open .layout>.left-sidebar{transform:translateX(0)}
  .xm-backdrop{display:block;position:fixed;inset:0;background:#0008;z-index:65;opacity:0;pointer-events:none;transition:opacity .25s ease}
  body.sidebar-open .xm-backdrop{opacity:1;pointer-events:auto}
}

/* --- Pages without a right rail use a two-column layout --- */
.layout.no-right{grid-template-columns:275px minmax(480px,1fr)}
@media(max-width:1250px){.layout.no-right{grid-template-columns:230px minmax(430px,1fr)}}
/* --- Simple content pages (sidebar layout) --- */
.page-shell{max-width:850px;margin:24px auto;padding:0 20px 40px}
.page-shell h1{margin:16px 0 8px}
.page-shell .card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;margin:14px 0;box-shadow:var(--shadow)}
.page-shell .row-list{display:grid;gap:12px;margin-top:14px}
.page-shell .row-item{display:flex;gap:14px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px;box-shadow:var(--shadow)}
.page-shell .row-item .info{flex:1;min-width:0}
.page-shell .row-item .info b{display:block;margin-bottom:3px}
.page-shell .row-item .info small{color:var(--muted);display:block;line-height:1.5}
.cat-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:16px}
.cat-tile{display:grid;place-items:center;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:26px 12px;font-weight:700;color:var(--text);text-align:center}
.cat-tile:hover{border-color:var(--accent)}
.cat-tile .xm-icon{width:26px;height:26px}
.cat-tile .xm-icon svg{width:26px;height:26px}

/* Shared footer (injected by /footer.js on every page). */
.xm-footer{text-align:center;padding:24px;color:var(--muted)}
.xm-footer-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px 10px}
.xm-footer-links a{color:var(--muted)}
.xm-affiliate-link svg{width:15px;height:15px;vertical-align:-2px;margin-right:4px}

/* --- Emoji picker (Creator Studio) --- */
.caption-row{display:flex;gap:8px;align-items:flex-start}
.caption-row textarea{flex:1;min-width:0}
.emoji-toggle{flex:0 0 auto;width:44px;height:44px;border:1px solid var(--line);background:var(--card2);border-radius:10px;font-size:22px;line-height:1;padding:0}
.emoji-toggle:hover{border-color:var(--accent)}
.xm-emoji-panel{position:fixed;z-index:80;width:min(360px,calc(100vw - 24px));background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:10px}
.xm-emoji-search{display:flex;gap:8px;margin-bottom:8px}
.xm-emoji-search input{flex:1;min-width:0;min-height:38px;border:1px solid var(--line);border-radius:20px;background:var(--card2);color:var(--text);padding:0 12px;outline:none}
.xm-emoji-search input:focus{border-color:var(--accent)}
.xm-emoji-close{flex:0 0 auto;width:38px;height:38px;border:1px solid var(--line);background:var(--card2);border-radius:50%;color:var(--text);font-size:14px}
.xm-emoji-tabs{display:flex;gap:4px;overflow-x:auto;padding-bottom:6px;margin-bottom:8px;border-bottom:1px solid var(--line);scrollbar-width:thin}
.xm-emoji-tabs button{white-space:nowrap;border:1px solid transparent;background:var(--card2);color:var(--text);border-radius:16px;padding:6px 10px;font-size:12px;font-weight:700}
.xm-emoji-tabs button.active{background:var(--accent);color:var(--accentText);border-color:var(--accent)}
.xm-emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;max-height:216px;overflow-y:auto}
.xm-emoji-grid button{font-size:24px;line-height:1.2;padding:7px 0;background:none;border:0;border-radius:8px}
.xm-emoji-grid button:hover,.xm-emoji-grid button:focus-visible{background:var(--card2);outline:2px solid var(--accent)}
.xm-emoji-empty{color:var(--muted);text-align:center;padding:18px 8px;margin:0;font-size:13px}
@media(max-width:760px){.xm-emoji-grid{grid-template-columns:repeat(7,1fr);max-height:200px}.xm-emoji-grid button{font-size:26px;padding:9px 0}}

/* --- Shared top navigation bar (topnav.js) --- */
.xm-topnav{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:20px;height:62px;padding:0 28px;background:var(--nav);border-bottom:1px solid var(--line)}
/* Task 14: the header is injected into #topnav-root by topnav.js, and
   #topnav-root is exactly as tall as the header — so the header's own
   position:sticky has zero room to stick and it scrolled away with the
   page (measured live: topnav top went to -600 after a 600px scroll).
   Stick the wrapper instead; the header keeps its own sticky rule
   (harmless) and its z-index. This is a shared-component fix, so it
   restores the sticky header on every page that renders it; on auth
   pages #topnav-root is empty (Task 6) and this is a no-op. The 76px
   sidebar offset (62px header + 14px gap) is only correct once the
   header actually sticks. */
#topnav-root{position:sticky;top:0;z-index:60}
.xm-topnav-brand{flex-shrink:0;display:flex;align-items:center}
.xm-topnav-brand .logo-img{height:38px}
.xm-topnav-menu{display:none}
.xm-topnav-search{height:42px;max-width:320px;min-width:180px;flex:1;display:flex;align-items:center;gap:10px;padding:0 14px;border:1px solid var(--line);border-radius:30px;background:var(--card2);color:var(--muted)}
.xm-topnav-search svg{width:18px;height:18px;flex-shrink:0}
.xm-topnav-search input{background:none;border:0;outline:0;color:var(--text);width:100%;min-width:0}
.xm-topnav-links{display:flex;align-items:center;gap:6px;white-space:nowrap;flex-shrink:1;min-width:0}
.xm-topnav-links a{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--muted);padding:10px 14px;border-radius:22px}
.xm-topnav-links a .xm-icon{width:18px;height:18px}
.xm-topnav-links a:hover{color:var(--text);background:var(--card2)}
.xm-topnav-links a.active{background:var(--accent);color:var(--accentText)}
.xm-topnav-links a.active .xm-icon{color:var(--accentText)}
.xm-topnav-links a.xm-topnav-create{background:var(--accent);color:var(--accentText)}
.xm-topnav-links a.xm-topnav-create .xm-icon{color:var(--accentText)}
.xm-topnav-links a.xm-topnav-create:hover{filter:brightness(1.05)}
.xm-topnav-actions{margin-left:auto;display:flex;align-items:center;gap:10px;flex-shrink:0}
.xm-topnav-iconbtn{position:relative;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--card2);display:inline-flex;align-items:center;justify-content:center;color:var(--text);flex-shrink:0;text-decoration:none}
.xm-topnav-iconbtn svg{width:19px;height:19px}
.xm-topnav-iconbtn:hover{border-color:var(--accent)}
.xm-topnav-search-btn{display:none}
.xm-topnav-badge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:var(--accent);color:#17200a;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center}
.xm-topnav-badge[hidden]{display:none}
.xm-topnav-wallet{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:22px;background:var(--card2);padding:9px 12px;font-weight:700;color:var(--text);white-space:nowrap}
.xm-topnav-wallet svg{width:18px;height:18px}
.xm-topnav-wallet .xm-chev{width:14px;height:14px;color:var(--muted)}
.xm-topnav-wallet .xm-chev svg{width:14px;height:14px}
.xm-topnav-avatarbtn{display:inline-flex;align-items:center;gap:4px;background:none;border:0;padding:0;flex-shrink:0}
.xm-topnav-avatarbtn .xm-chev{width:14px;height:14px;color:var(--muted)}
.xm-topnav-avatarbtn .xm-chev svg{width:14px;height:14px}
.xm-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(140deg,#9aa8b1,#34434c);border:2px solid var(--line);font-weight:800;color:#fff;flex-shrink:0;overflow:hidden;font-size:15px}
.xm-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.xm-topnav-dropwrap{position:relative;display:flex}
.xm-topnav-drop{position:absolute;top:calc(100% + 10px);right:0;width:320px;max-width:calc(100vw - 24px);background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:14px;z-index:80;text-align:left;display:none}
.xm-topnav-drop.open{display:block}
.xm-topnav-drop h3{margin:0 0 10px;font-size:15px}
.xm-topnav-drop .xm-drop-body p{margin:8px 0;line-height:1.5}
.xm-topnav-profile{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line);margin-bottom:6px}
.xm-topnav-profile .xm-avatar{width:42px;height:42px}
.xm-topnav-profile-text{display:grid;gap:2px;min-width:0}
.xm-topnav-profile-text b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xm-topnav-profile-text small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xm-topnav-drop a.xm-drop-link,.xm-topnav-drop button.xm-drop-link{display:flex;align-items:center;gap:10px;width:100%;padding:10px 8px;border-radius:10px;font-weight:600;color:var(--text);background:none;border:0;cursor:pointer;text-align:left;font-size:14px}
.xm-topnav-drop a.xm-drop-link:hover,.xm-topnav-drop button.xm-drop-link:hover{background:var(--card2)}
.xm-topnav-drop .xm-drop-link .xm-icon{width:18px;height:18px;color:var(--muted)}
.xm-topnav-drop .xm-drop-link .xm-icon svg{width:18px;height:18px}
.xm-drop-row{display:grid;gap:2px;padding:9px 2px;border-top:1px solid var(--line)}
.xm-drop-row:first-child{border-top:0}
.xm-drop-row b{font-size:13px;line-height:1.4}
.xm-drop-row small{line-height:1.4}
.xm-wallet-big{font-size:17px;font-weight:800}
.xm-drop-foot{display:flex;justify-content:space-between;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}
.xm-drop-foot a{color:#91c900;font-weight:700;font-size:13px}
.xm-topnav-auth{display:flex;align-items:center;gap:10px}
.xm-topnav-register{padding:10px 18px}
.xm-topnav-search-row{display:none}
@media(max-width:1400px){.xm-topnav-links a .xm-label{display:none}.xm-topnav-links a.xm-topnav-create .xm-label{display:inline}}
@media(max-width:1250px){.xm-topnav{gap:12px;padding:0 16px}.xm-topnav-search{max-width:240px;min-width:140px}.xm-topnav-links{gap:2px}.xm-topnav-links a{padding:10px 10px}}
@media(max-width:1100px){.hero{margin-top:0px}.hero-copy h1{font-size:22px}.hero-logo{width:240px}.hero-copy p{font-size:14px}.xm-topnav-links a .xm-label{display:none}.xm-topnav-links a{padding:10px 12px}.xm-topnav-links a.xm-topnav-create .xm-label{display:inline}}
@media(min-width:1251px) and (max-width:1430px){.hero-copy p{display:none}.hero-copy h1{font-size:22px}.hero-logo{max-width:70%}}
@media(max-width:760px){
  .xm-topnav{height:58px;gap:8px;padding:0 12px}
  .xm-topnav-menu{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--card2);color:var(--text);flex-shrink:0}
  .xm-topnav-menu svg{width:19px;height:19px}
  /* Task 74 (2026-11-25): mobile topnav logo as big as it can go — Boss:
     'Mobile me ye logo bara kr do'. Logo was 28px high (84px wide) at
     <=760px; now 38px high (114px wide, same height as desktop) in the
     58px bar. The width gain (+30px) is paid for by the 34px menu/search/
     bell buttons and the tighter actions gap below, so nothing overflows. */
  .xm-topnav-brand .logo-img{height:38px}
  .xm-topnav-iconbtn{width:34px;height:34px}
  /* Task 75 (2026-11-25): mobile notifications panel clipped off the LEFT
     edge (Boss's phone screenshot 20:22 PKT — 'Notifications' / 'No
     notifications yet.' both lost their 'N'). Root cause: .xm-topnav-drop
     is right:0 against its own .xm-topnav-dropwrap (position:relative),
     and on mobile the bell is NOT at the bar's right edge — the avatar
     sits after it — so a 320px panel right-aligned to the bell ran
     28px past the left edge at 360px (measured: drop left -28, right
     292 = bell's right edge; at 390px it only just fit, left 2px).
     Fix: on mobile the wrap goes position:static, so the panel's
     containing block becomes the sticky .xm-topnav bar itself and
     right:0 aligns it to the BAR's right edge (360px: left 40, right
     360; 390px: left 70). The profile dropdown moves with it (its
     right edge goes 354 -> 360, still fully visible). Desktop is
     untouched — the wrap stays relative there. The unread badge is
     safe: it is positioned against the bell button itself, not the
     wrap. Top stays calc(100% + 10px), now against the 58px bar, so
     the panel still opens directly under the topnav. */
  .xm-topnav-dropwrap{position:static}
  .xm-topnav-search{display:none}
  .xm-topnav-search-btn{display:inline-flex}
  .xm-topnav-links a:not(.xm-topnav-create){display:none}
  .xm-topnav-links a.xm-topnav-create{padding:9px 12px;font-size:13px}
  .xm-topnav-chatwrap,.xm-topnav-walletwrap{display:none}
  .xm-topnav-actions{gap:6px}
  .xm-topnav-search-row{display:none;padding:10px 14px;background:var(--nav);border-bottom:1px solid var(--line)}
  .xm-topnav-search-row.open{display:block}
  .xm-topnav-search-row input{width:100%;min-height:42px;border:1px solid var(--line);border-radius:22px;background:var(--card2);color:var(--text);padding:0 14px;outline:none}
}
@media(max-width:480px){.hero-copy{width:58%}.hero-logo{width:90px}.hero-copy h1{font-size:13px}.hero-copy .primary{padding:7px 10px;font-size:11px}}
@media(max-width:420px){
  .xm-topnav{gap:6px;padding:0 10px}
  .xm-topnav-theme{display:none}
  .xm-topnav-links a.xm-topnav-create .xm-label{display:none}
  .xm-topnav-links a.xm-topnav-create{padding:9px 10px;border-radius:50%}
  .xm-topnav-auth .login-link{padding:8px 10px}
  .xm-topnav-register{padding:9px 12px}
}

.xm-topnav-drop .xm-drop-link>svg{width:18px;height:18px;flex-shrink:0}
.xm-topnav-pending{width:180px;height:38px;background:var(--card2);border-radius:19px}.xm-side-skeleton{display:block;height:42px;border-radius:10px;background:var(--card2);opacity:.55;margin:3px 0}

/* --- Mobile fixes that must override later base rules (see above) --- */
@media(max-width:760px){
  /* The "loading" placeholder pill is 180px wide and spills past the
     right edge of a phone header; on mobile it is simply hidden — the
     auth buttons appear once /api/me resolves, without any overflow. */
  .xm-topnav-pending{display:none}
  /* Login / Register pages (mobile only): no search icon, no search row.
     Search stays available on every normal public page. */
  .xm-auth-page .xm-topnav-search-btn{display:none!important}
  .xm-auth-page .xm-topnav-search-row{display:none!important}
  /* Affiliate Login (mobile only, Task 9): topnav.js leaves
     #topnav-root empty on mobile, and this rule hides the bar on
     any resize path where it was built at desktop width. Scoped
     to the affiliate page only — desktop and every other page are
     untouched. */
  .xm-affiliate-page{display:none}
  /* Footer: tighter on mobile. The 88px bottom padding is the clearance
     for the 64px fixed bottom nav — it lives on the footer (end of the
     page) instead of on .layout, so it no longer opens a big blank gap
     between Top Categories and the footer. */
  .xm-footer{padding:16px 12px 110px}
  .footer-logo{height:28px;margin-bottom:8px}
  .xm-footer-links{gap:4px 8px;font-size:13px}
}

/* --- Task 12 (refined): icon-only action bar + creator card --- */
.post-caption a.caption-link{color:var(--accent);text-decoration:none}
.post-caption a.caption-link:hover{text-decoration:underline}
.post-actions .action-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:0;background:none;color:var(--muted);cursor:pointer;border-radius:50%;padding:0}
.post-actions .action-btn svg{width:22px;height:22px}
.post-actions .action-btn:hover{background:var(--card2);color:var(--text)}
.post-actions .action-btn[aria-pressed="true"]{color:var(--accent)}
.post-actions .action-btn[aria-pressed="true"] svg{fill:currentColor}
.post-actions .action-btn:disabled{opacity:.55;cursor:default}
.post-actions .action-btn[aria-expanded="true"]{color:var(--accent)}
/* --- Task 78 finalize: inline like/comment counts next to their icons --- */
/* The 40px icon buttons widen to fit the count (only when a count shows:
   the button carries .has-count exactly then). Scoped under .post-actions
   so the rule beats the base '.post-actions span{font-size:12px}'. */
.post-actions .action-btn.has-count{width:auto;min-width:40px;padding:0 8px}
.post-actions .like-count{margin:2px 4px 0;font-size:13px;font-weight:700;color:var(--text)}
.post-actions .comment-count{margin:2px 4px 0;font-size:13px;font-weight:700;color:var(--text)}
.creator-card{margin-top:10px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card2)}
.creator-cover{height:110px;background:linear-gradient(135deg,#3a4048,#171b20 60%,#2c3430);position:relative}
.creator-cover img{width:100%;height:100%;object-fit:cover;display:block}
.creator-row{display:flex;align-items:center;gap:10px;padding:10px 12px}
.creator-id{display:flex;align-items:center;gap:10px;border:0;background:none;padding:0;cursor:pointer;text-align:left;min-width:0;flex:1}
.creator-id .avatar{flex:none}
.creator-card .avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.creator-idbox{display:grid;gap:1px;min-width:0}
.creator-name{font-weight:700;color:var(--text);display:flex;align-items:center;gap:5px;min-width:0}
.creator-name .verified-badge{display:inline-flex;color:var(--accent);flex:none}
.creator-name .verified-badge svg{width:16px;height:16px}
.creator-user{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.creator-time{font-size:11px;color:var(--muted);display:block}
.post-menu-wrap{position:relative;flex:none}
.post-menu-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:0;background:none;color:var(--muted);cursor:pointer;border-radius:50%;padding:0}
.post-menu-btn svg{width:22px;height:22px}
.post-menu-btn:hover{background:var(--card2);color:var(--text)}
.post-menu{position:absolute;right:0;top:44px;min-width:140px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:4px;z-index:20}
.post-menu-item{display:block;width:100%;text-align:left;border:0;background:none;color:var(--text);padding:9px 12px;font-size:14px;cursor:pointer;border-radius:8px}
.post-menu-item:hover{background:var(--card2)}
.play-overlay{position:absolute;inset:0;margin:auto;width:56px;height:56px;border:0;border-radius:50%;background:rgba(20,110,200,.92);color:#fff;display:grid;place-items:center;cursor:pointer;z-index:2}
.play-overlay svg{width:26px;height:26px;margin-left:2px}
.post-media img{cursor:zoom-in}
.report-panel{margin:8px 12px 12px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--card2)}
@media(max-width:760px){.creator-cover{height:88px}}
/* Task 12 verification fix (pre-existing): the comment input's default
   min-width:auto stopped it shrinking inside narrow 2-column cards, so
   the Post button overflowed the card and the next card covered it
   (unclickable at 768px). min-width:0 lets the input shrink. */
.comment-form input{min-width:0}

/* --- Task 13: OnlyFans-style two-column home feed + discovery sidebar.
   Scoped to .home-layout (index.html only) — every other page keeps the
   existing .layout grid. The fixed/sticky sidebar behaviour is Task 14
   and is deliberately NOT done here. --- */
.layout.home-layout{max-width:1280px;grid-template-columns:250px minmax(0,1fr) 380px}
.home-layout .feed-grid{grid-template-columns:1fr}
/* The hero is narrower inside the feed column than it was full-width, so
   on desktop the home hero uses a smaller logo/heading and no tagline
   (the same treatment as the 1251–1430px rule) to fit its 3:1 banner. */
@media(min-width:761px){
  .home-layout .hero-copy{width:56%;left:20px}
  .home-layout .hero-logo{width:200px;max-width:85%}
  .home-layout .hero-copy h1{font-size:18px;margin-bottom:6px}
  .home-layout .hero-copy p{display:none}
  .home-layout .hero-copy .primary{padding:9px 14px;font-size:13px}
}
#discoverySidebar{display:grid;align-content:start;gap:12px}
.suggestions-head{display:flex;align-items:center;justify-content:space-between;margin-top:4px}
.suggestions-head h2{margin:0;font-size:13px;font-weight:800;letter-spacing:.06em;color:var(--muted)}
.suggestions-controls{display:flex;align-items:center;gap:4px}
.sugg-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;background:none;color:var(--muted);cursor:pointer;border-radius:50%;font-size:18px;line-height:1}
.sugg-icon-btn:hover{background:var(--card2);color:var(--text)}
.sugg-icon-btn svg{width:19px;height:19px}
.sugg-icon-btn .chev-left{transform:rotate(90deg)}
.sugg-icon-btn .chev-right{transform:rotate(-90deg)}
.sugg-carousel{display:grid;gap:10px}
.sugg-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface);cursor:pointer;min-width:0}
.sugg-card:hover{border-color:var(--accent)}
.sugg-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.sugg-cover{position:relative;height:140px;background:linear-gradient(135deg,#3a4048,#171b20 60%,#2c3430)}
.sugg-cover img{width:100%;height:100%;object-fit:cover;display:block}
.sugg-access{position:absolute;top:10px;left:10px;background:var(--accent);color:#18200a;border-radius:12px;padding:4px 10px;font-size:11px;font-weight:800}
.sugg-info{display:flex;align-items:center;gap:10px;padding:10px 12px}
.sugg-avatar{width:48px;height:48px;flex:none}
.sugg-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.sugg-idbox{display:grid;gap:1px;min-width:0}
.sugg-name{font-weight:700;color:var(--text);display:flex;align-items:center;gap:5px;min-width:0}
.sugg-name .verified-badge{display:inline-flex;color:var(--accent);flex:none}
.sugg-name .verified-badge svg{width:16px;height:16px}
.sugg-user{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sugg-dots{display:flex;justify-content:center;gap:6px;padding:2px 0}
.sugg-dot{width:8px;height:8px;border:0;border-radius:50%;background:var(--line);padding:0;cursor:pointer}
.sugg-dot.active{background:var(--accent)}
.discover-more{display:block;width:100%;text-align:center;text-decoration:none}
.discovery-footer{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 8px;font-size:12px;color:var(--muted)}
.discovery-footer a{color:var(--muted)}
.discovery-footer a:hover{color:var(--accent)}
@media(max-width:1250px) and (min-width:1001px){
  .layout.home-layout{max-width:1180px;grid-template-columns:220px minmax(0,1fr) 320px}
  .layout.home-layout .right-sidebar{display:grid}
}
@media(max-width:1000px) and (min-width:761px){
  .layout.home-layout{max-width:980px;grid-template-columns:190px minmax(0,1fr)}
  .layout.home-layout .right-sidebar{display:grid;grid-column:1/-1;max-width:560px;margin:0 auto;width:100%}
}
@media(max-width:760px){
  .layout.home-layout>.right-sidebar{display:block;margin-top:16px}
  .sugg-cover{height:150px}
}

/* --- Task 15: compact discovery sidebar (index.html only).
   Size reductions only — no redesign, no layout or functionality change.
   The rules below OVERRIDE the Task 13 values by coming later in the
   file (same selectors, same or higher specificity); the original
   Task 13 rules are left byte-identical so the Task 13/14 tests that
   pin their exact strings keep passing. Deliberately NOT touched:
   the SUGGESTIONS header and its 34px icon
   buttons, the 48px avatar, the 14px name / 12px username text, the
   verified badge, the Free/Premium badge, the carousel behaviour
   (arrows, dots, refresh, card click), the Discover More link to
   /categories.html, the colours, and the Task 14 sidebar
   rules below (max-height / independent scroll still apply).
   Task 18 removed the sidebar "Search posts" box (its HTML and its
   Task 13 rules are gone); the search-box rule is therefore no longer
   among the untouched items above.
   Spec mapping: there is no literal "Explore Categories" card list in
   the sidebar — "Explore Creators & Categories" here means the
   creator suggestion cards (.sugg-card); the Discovery banner was
   removed by Task 16 (its HTML and its Task 13/15 rules are gone);
   the "Top Categories" row lives in the main column, not the
   sidebar, and is out of scope. --- */
#discoverySidebar{gap:8px}
.suggestions-head{margin-top:0}
.sugg-carousel{gap:8px}
.sugg-cover{height:96px}
.sugg-info{padding:8px 12px}
#discoverySidebar .discover-more{padding:9px 16px}
@media(max-width:760px){
  .sugg-cover{height:110px}
}

/* --- Task 17: standardized creator profile (Task 32: full page).
   One template for every creator, rendered by buildCreatorProfileDOM
   in app.js on the dedicated /creator/<username> page (creator.html).
   The cover is full-bleed with a gradient fallback (same gradient as
   .creator-cover) when the creator has no cover image; the avatar
   overlaps the cover bottom; the right subscription column is sticky
   on desktop. This section sits BEFORE the Task 14 section, which
   test-home-scrolling.js slices from its marker to EOF. */
.prof{background:var(--surface);border-radius:18px;overflow:hidden}
.prof-cover{position:relative;height:220px;background:linear-gradient(135deg,#3a4048,#171b20 60%,#2c3430)}
.prof-cover img{width:100%;height:100%;object-fit:cover;display:block}
.prof-back{position:absolute;top:12px;left:12px;width:38px;height:38px;border-radius:50%;border:1px solid #ffffff55;background:#0009;color:#fff;font-size:20px;line-height:1;display:grid;place-items:center}
.prof-more-wrap{position:absolute;top:12px;right:12px}
.prof-more-btn{width:38px;height:38px;border-radius:50%;border:1px solid #ffffff55;background:#0009;color:#fff;display:grid;place-items:center}
.prof-more-btn svg{width:20px;height:20px}
.prof-more-menu{position:absolute;right:0;top:44px;min-width:170px;z-index:5}
.prof-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:0 20px 0 120px;position:relative}
.prof-avatar{width:88px;height:88px;border-width:3px;font-size:30px;flex:none;position:absolute;left:20px;top:-44px}
.prof-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
/* --- Task 45: creator profile header subscription buttons.
   Three glossy plan pills beside the avatar (ref:
   Glossy_Profile_Subscription_Header.png): 1 Month purple, 3 Months
   pink/magenta, 12 Months gold/orange — icon + label + price, right
   arrow, rounded, glow; a yellow SAVE badge overlaps the top of any
   multi-month button that saves vs the 1-month price. The gradients
   are the same in Light and Dark (the buttons carry their own
   colors); on mobile the buttons stack full-width. The old header
   Favorite/Share buttons are gone (they live in the cover's More menu
   now) and their rules are removed. */
.prof-plan-btns{display:flex;gap:14px;padding-bottom:0;flex-wrap:wrap;justify-content:flex-end}
.prof-plan-btn{position:relative;display:inline-flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:10px 20px;margin-top:12px;font-weight:800;font-size:14px;color:#fff;white-space:nowrap;cursor:pointer}
.prof-plan-btn:hover{filter:brightness(1.08)}
.prof-plan-btn:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
/* (Task 73) The 4 profile buttons (3 plan pills + LIVE CHAT) carry NO outer glow: the coloured 0 8px 20px drop shadow was removed from --m1/--m3/--m12 and .prof-livechat-btn. Only the inset 1px top highlight stays; gradients, sizes, positions, badges and behaviour are unchanged. */
.prof-plan-btn--m1{background:linear-gradient(180deg,#a855f7,#7b2ff7 55%,#6d28d9);box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.prof-plan-btn--m3{background:linear-gradient(180deg,#ff5db1,#ec4899 55%,#db2777);box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.prof-plan-btn--m12{background:linear-gradient(180deg,#fbbf24,#f59e0b 55%,#d97706);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.prof-plan-icon{display:inline-flex}
.prof-plan-icon svg{width:20px;height:20px;flex:none}
.prof-plan-label{letter-spacing:.1px}
.prof-plan-sep{opacity:.65;font-weight:400}
.prof-plan-price{font-weight:800}
.prof-plan-chev{display:inline-flex}
.prof-plan-chev svg{width:16px;height:16px;flex:none}
/* (Task 56) The label/price wrappers are display:contents on desktop,
   so the pill keeps its exact one-line row (icon, label, |, price,
   chevron); only the mobile block below turns them into a stack. */
.prof-plan-text{display:contents}
.prof-plan-line2{display:contents}
.prof-plan-save{position:absolute;top:-11px;left:50%;transform:translateX(-50%);background:#ffd60a;color:#111;font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px;box-shadow:0 2px 6px rgba(0,0,0,.3);white-space:nowrap}
.prof-more-menu .post-menu-item[aria-pressed="true"]{font-weight:800}
.prof-info{padding:14px 20px 0}
.prof-name{margin:0;font-size:22px;display:flex;align-items:center;gap:8px}
.prof-name .verified-badge{display:inline-flex}
.prof-name .verified-badge svg{width:20px;height:20px}
.prof-user{color:var(--muted);margin-top:4px}
.prof-bio{margin:10px 0 0;line-height:1.6}
.prof-cats{margin:10px 0 0}
.prof-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:12px 20px 0;align-items:start}
.prof-main{min-width:0}
.prof-posts-h{margin:0 0 12px;font-size:16px}
.prof-main .post-card{margin-bottom:0}
.prof-side{position:sticky;top:16px;display:grid;gap:12px;min-width:0}
.prof-sub{background:var(--card2);border:1px solid var(--line);border-radius:16px;padding:16px}
.prof-sub h3{margin:0 0 8px;font-size:16px}
.prof-price{font-size:22px;font-weight:800;margin-bottom:12px}
.prof-price-per{font-size:13px;font-weight:600;color:var(--muted)}
.prof-sub-btn{width:100%}
.prof-sub-note{margin:10px 0 0;font-size:12px;line-height:1.5}
.prof-footer{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;color:var(--muted);font-size:12px}
.prof-footer a{color:var(--muted)}
@media(max-width:1000px){
  /* (Task 52) The right-side panel is gone, so the profile body is a
     single column at every width — no empty 260px column. */
  .prof-layout{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px){
  .prof-cover{height:160px}
  .prof-avatar{width:72px;height:72px;font-size:24px;left:14px;top:-36px}
  .prof-head{padding:0;flex-wrap:wrap}
  .prof-info{padding:12px 14px 0}
  .prof-name{font-size:19px}
  .prof-layout{grid-template-columns:1fr;padding:12px 14px 0}
  .prof-side{position:static}
  .prof-plan-btns{flex:1 1 100%;flex-direction:column;align-items:stretch;gap:12px;margin-top:44px}
  .prof-plan-btn{justify-content:center;padding:12px 16px;font-size:14px}
}

/* --- Task 32: creator profile as a full page (/creator/<username>).
   creator.html carries #creatorPage; the shell matches the old
   modal's 1020px width so the profile layout (posts + 300px side
   panel) is unchanged. The not-found state is honest: a plain
   "Creator not found" message with a link home, never a fake
   profile. This section sits BEFORE the Task 14 section, which
   test-home-scrolling.js slices from its marker to EOF. */
.creator-page-shell{max-width:1020px;margin:24px auto 0;padding:0 20px 12px}
.creator-notfound{text-align:center;padding:48px 20px}
.creator-notfound h1{margin:0 0 8px;font-size:24px}
.creator-notfound .primary{display:inline-block;margin-top:16px;text-decoration:none}

/* --- Task 19: Creator Dashboard redesign (creator-studio.html only).
   Reference: XoticMate_Creator_Dashboard.png — wide cover + overlapping
   avatar, 4 stat cards, Publish + Recent Posts two-column content, and
   a dedicated Creator Studio sidebar (sidebar.js studio mode). All
   values are real DB data from GET /api/creator/dashboard; the
   reference image's creator name and counts are design reference only
   and appear nowhere here.
   This section sits BEFORE the Task 14 section, which
   test-home-scrolling.js slices from its marker to EOF. The old inline
   <style> block in creator-studio.html is gone — its rules live here,
   scoped under .studio so other pages are untouched. --- */
.studio{max-width:1080px;margin:0 auto;padding:12px 4px 40px}
.studio>*{margin-bottom:18px}
.studio>*:last-child{margin-bottom:0}
.studio .card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow)}
.studio .card h2{margin-top:0;margin-bottom:6px;font-size:20px}
.studio .card input,.studio .card textarea,.studio .card select{width:100%;padding:12px;margin:7px 0 14px;border:1px solid var(--line);border-radius:10px;background:var(--card2);color:var(--text)}
.studio .grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.studio .post{padding:12px;border-bottom:1px solid var(--line)}
.studio .cat-chips{display:flex;flex-wrap:wrap;gap:8px;margin:7px 0 14px}
.studio .cat-chip{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;cursor:pointer;font-size:14px}
.studio .cat-chip input{width:auto;margin:0;min-height:0}
.studio .cat-chip:has(input:checked){border-color:var(--accent)}
/* Studio sidebar title (sidebar.js studio mode): crown + Creator Studio. */
.xm-side-studio-title{display:flex;align-items:center;gap:13px;padding:12px 14px;font-size:17px;font-weight:800}
.xm-side-studio-title .xm-icon{width:22px;height:22px;color:var(--accent)}
.xm-side-studio-title .xm-icon svg{width:22px;height:22px}
/* Profile header: wide cover, overlapping avatar, identity + stats. */
.st-head{background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:var(--shadow)}
.st-cover{position:relative;height:260px;background:linear-gradient(135deg,#3a4048,#171b20 60%,#2c3430)}
.st-cover img{width:100%;height:100%;object-fit:cover;display:block}
.st-cover-edit{position:absolute;top:14px;right:14px;display:inline-flex;align-items:center;gap:8px;border:1px solid #ffffff55;background:#0009;color:#fff;border-radius:999px;padding:10px 16px;font-weight:700}
.st-cover-edit svg{width:18px;height:18px}
.st-cover-edit:hover{background:#000c}
.st-menu{position:absolute;z-index:5;min-width:180px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:4px}
.st-menu button{display:block;width:100%;text-align:left;border:0;background:none;color:var(--text);padding:10px 12px;font-size:14px;border-radius:8px;cursor:pointer}
.st-menu button:hover{background:var(--card2)}
#stCoverMenu{top:58px;right:14px}
#stAvatarMenu{top:calc(100% + 6px);left:0}
.st-head-row{display:flex;align-items:flex-end;gap:16px;padding:0 24px 20px;position:relative}
.st-avatar-wrap{position:relative;flex:none;margin-top:-60px}
.st-avatar{width:120px;height:120px;border:3px solid var(--surface);font-size:40px}
.st-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.st-avatar-cam{position:absolute;right:0;bottom:6px;width:38px;height:38px;border-radius:50%;border:2px solid var(--surface);background:var(--card2);color:var(--text);display:grid;place-items:center;cursor:pointer}
.st-avatar-cam svg{width:18px;height:18px}
.st-avatar-cam:hover{border-color:var(--accent)}
.st-id{flex:1;min-width:0}
#stName{margin:0;font-size:24px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#stName .verified-badge{display:inline-flex;color:var(--accent);flex:none}
#stName .verified-badge svg{width:20px;height:20px}
.st-user{color:var(--muted);margin-top:4px}
.st-stats-line{margin-top:8px;font-weight:600}
.st-bio{margin:10px 0 0;line-height:1.6}
.st-edit-profile{flex:none;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;background:var(--card2);color:var(--text);font-weight:700;padding:11px 18px;margin-bottom:8px;cursor:pointer;white-space:nowrap}
.st-edit-profile svg{width:18px;height:18px}
.st-edit-profile:hover{border-color:var(--accent)}
.st-head-msg{padding:0 24px 16px;margin:0}
/* Four stat cards. */
.st-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.st-stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;align-items:center;gap:14px;box-shadow:var(--shadow);min-width:0}
.st-stat-icon{width:48px;height:48px;flex:none;border-radius:12px;display:grid;place-items:center}
.st-stat-icon svg{width:24px;height:24px}
.st-ic-posts{background:#22c55e1f;color:#22c55e}
.st-ic-followers{background:#8b5cf61f;color:#8b5cf6}
.st-ic-likes{background:#ec48991f;color:#ec4899}
.st-ic-earnings{background:#f59e0b1f;color:#f59e0b}
.st-stat-text{display:grid;gap:2px;min-width:0}
.st-stat-text b{font-size:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-stat-text span{color:var(--muted);font-size:13px}
.st-earn-note{margin:-8px 2px 0;font-size:12px}
/* Two-column content: Publish a New Post + Your Recent Posts. */
.st-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.st-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.st-panel-head h2{margin:0;font-size:19px}
.st-panel-sub{margin:4px 0 0;font-size:13px}
#recentViewAll{color:var(--accent);font-weight:700;font-size:13px;white-space:nowrap;padding-top:4px}
.st-drop{position:relative;display:grid;justify-items:center;gap:6px;border:2px dashed var(--line);border-radius:14px;padding:28px 16px;text-align:center;cursor:pointer;background:var(--card2)}
.st-drop:hover,.st-drop-over{border-color:var(--accent)}
.st-drop-icon{color:var(--muted)}
.st-drop-icon svg{width:28px;height:28px}
.st-drop-title{font-weight:700}
.st-drop-sub{color:var(--muted);font-size:13px}
.studio .st-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0;padding:0;border:0}
.st-previews{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.st-preview{position:relative;width:84px;height:84px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card2)}
.st-preview img{width:100%;height:100%;object-fit:cover;display:block}
.st-preview-file{display:grid;place-items:center;width:100%;height:100%;font-size:22px;color:var(--muted)}
.st-preview-name{position:absolute;left:0;right:0;bottom:0;background:#000a;color:#fff;font-size:10px;padding:3px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-preview-rm{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:0;background:#000a;color:#fff;font-size:14px;line-height:1;display:grid;place-items:center;cursor:pointer}
.st-publish-row{display:flex;gap:10px;flex-wrap:wrap;margin:4px 0 10px}
.st-create-btn{flex:1;min-width:180px}
.st-draft-btn{background:var(--card2);color:var(--text);border:1px solid var(--line);box-shadow:none;flex:1;min-width:140px}
/* Recent posts list. */
.st-recent-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.st-recent-row:last-child{border-bottom:0}
.st-recent-thumb{width:64px;height:64px;flex:none;border-radius:10px;overflow:hidden;background:linear-gradient(135deg,#3a4048,#171b20 60%,#2c3430);display:grid;place-items:center}
.st-recent-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.st-recent-ph{color:#ffffff99;font-size:20px}
.st-recent-info{flex:1;min-width:0;display:grid;gap:6px}
.st-recent-title{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st-recent-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}
.st-badge-free{background:var(--accent);color:#18200a;border-radius:12px;padding:3px 9px;font-size:11px;font-weight:800}
.st-badge-paid{background:#171b20;color:#ffe15b;border-radius:12px;padding:3px 9px;font-size:11px;font-weight:800}
.st-recent-actions{display:flex;gap:8px;flex:none}
.st-recent-actions button{border:1px solid var(--line);background:var(--card2);border-radius:18px;padding:8px 14px;font-weight:700;cursor:pointer}
.st-recent-actions button.danger{border-color:#c0392b;color:#e74c3c}
.st-recent-actions button.danger.armed{background:#c0392b;color:#fff;border-color:#c0392b}
@media(max-width:1000px){
  .st-cols{grid-template-columns:1fr}
  /* Tablet: the identity block wraps below the avatar, so the avatar
     (align-items:flex-end + negative top margin) keeps its cover
     overlap when the row grows tall — without the wrap the tall row
     pushes the avatar below the cover entirely. The stat cards go
     2-up here too: 4-across is too tight once the main column is
     ~500px wide ('$15.00' clipped and 5px overflow at 768). */
  .st-head-row{flex-wrap:wrap}
  .st-id{flex:1 1 100%;order:2}
  .st-stats{grid-template-columns:1fr 1fr}
}
@media(max-width:650px){
  .studio .grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .studio{padding:8px 2px 40px}
  .st-cover{height:170px}
  .st-avatar{width:88px;height:88px;font-size:30px}
  .st-avatar-wrap{margin-top:-44px}
  .st-head-row{padding:0 16px 16px;gap:12px}
  .st-edit-profile{margin-bottom:0}
  #stName{font-size:20px}
  .st-stat{padding:14px}
  .st-stat-text b{font-size:19px}
  .st-create-btn,.st-draft-btn{min-height:46px}
  .st-recent-actions button{padding:8px 10px;font-size:13px}
}

/* --- Task 20: in-page image viewer / lightbox (index.html only).
   Post images open here instead of a new tab. The backdrop is darker
   than the profile modal's so the image stands out in both Light and
   Dark themes. The frame caps at the viewport; the image itself is
   capped by both max-width and max-height with object-fit: contain,
   so the complete original image is always visible at its own aspect
   ratio — portrait, landscape and square alike, never cropped, zoomed
   or stretched. z-index 60 sits above the profile modal (z-index 50)
   so images inside a profile open on top of it. The feed thumbnail
   keeps its own cover sizing (.post-media img, Task 12); only the
   expanded viewer is contain. --- */
.media-lightbox{background:rgba(0,0,0,.88);z-index:60;padding:12px}
.media-lightbox-frame{position:relative;max-width:min(1200px,96vw);max-height:92vh;display:grid;place-items:center}
.media-lightbox-frame img{max-width:100%;max-height:calc(92vh - 24px);width:auto;height:auto;object-fit:contain;display:block;border-radius:12px;background:#000}
.media-lightbox-close{position:absolute;top:-14px;right:-14px;width:44px;height:44px;border-radius:50%;border:0;background:#111c;color:#fff;font-size:26px;line-height:1;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.5);display:grid;place-items:center}
.media-lightbox-close:hover{background:#000}
@media(max-width:760px){
  .media-lightbox{padding:8px}
  .media-lightbox-frame{max-width:100vw}
  .media-lightbox-frame img{max-height:calc(92vh - 16px)}
  .media-lightbox-close{top:8px;right:8px}
}

/* --- Task 21: three-dot post menu fix.
   ROOT CAUSE: the menu is built inside .creator-card, which has
   overflow:hidden (rounded cover). The dropdown was position:absolute
   and dropped below the creator row — the card's last child — so it
   was clipped to nothing: the menu "opened" in the DOM but was
   invisible. The fix is position:fixed + JS positioning (see
   positionPostMenu in app.js): a fixed element escapes every
   ancestor's overflow, and the rect is measured on every open, so the
   menu sits below its button (or flips above it near the viewport
   bottom) and is clamped inside the viewport. z-index 60 sits above
   the topbar (20), the mobile bottom nav (30) and the profile modal
   backdrop (50), on par with the Task 20 lightbox (60) — the two are
   never open together (opening the lightbox closes the menu). The
   profile More menu shares the same .post-menu class, so it gets the
   same fix; its Task 17 absolute positioning is overridden here
   (right:auto matters: a fixed menu with both left and right set
   would stretch across the viewport). --- */
.post-menu{position:fixed;left:0;top:0;right:auto;z-index:60}
.prof-more-menu{position:fixed}
.post-menu-item.danger{color:#e74c3c}
.post-menu-item.danger:hover{background:#c0392b22}
.post-menu-item.danger.armed{background:#c0392b;color:#fff}

/* --- Task 22: video post layout (video posts only — image/text posts
   keep the Task 12/20/21 layout byte-identical).
   VIDEO SIZE (Boss refinement 2026-11-22, overrides "large full-width"):
   the post card stays full width; the VIDEO inside is capped at 680px
   and centered — at small desktop it fills the feed column (~600px
   there), at tablet/mobile it is 100% of the card width. The
   .video-frame wrapper is sized to the video, so the centered Play
   overlay sits on the video itself rather than on the full-width
   container. Aspect ratio is always preserved (height auto +
   object-fit:contain, max 560px tall) — never cropped, stretched or
   distorted; portrait and landscape both stay fully visible.
   Below the video, exactly ONE creator card shows (Task 53 removed
   the Task 22 two-card .rec-row: it showed a second, suggested
   creator under every video post); the Tip button is video-posts only. --- */
.video-post .post-gallery{grid-template-columns:1fr}
.video-post .post-media.video-media{height:auto;aspect-ratio:auto;background:#000;display:block}
.video-post .post-media.video-media .video-frame{position:relative;width:100%;max-width:680px;margin:0 auto}
.video-post .post-media.video-media .video-frame video{width:100%;height:auto;max-height:560px;object-fit:contain;background:#000;display:block}
.video-post .play-overlay{width:64px;height:64px}
.video-post .play-overlay svg{width:30px;height:30px}
.video-post .unlocked-media{height:auto}
.video-post .unlocked-media video{width:100%;max-width:680px;height:auto;max-height:560px;object-fit:contain;margin:0 auto}
/* (Task 53) .rec-row removed: no second creator card is rendered under any post any more. */

/* --- Task 24: custom video player (YouTube-style), video posts only.
   The native controls are off (see enhanceXmPlayer in app.js); this
   is the only player UI. The controls live on a dark gradient over
   the bottom of the video, so they read over bright AND dark videos
   in both Light and Dark themes — the player is always dark-on-video,
   like YouTube, regardless of the site theme. The lime accent
   (--accent) marks the played portion of the seek bar and the
   checked Settings option. The player keeps the Task 22 frame
   (max 680px, centered, original aspect ratio, never cropped).
   Auto-hide: .xm-idle (added by JS 3s after the last activity while
   playing) fades the controls out and hides the cursor; they never
   hide while paused, while the Settings menu is open, or while
   seeking. Fullscreen is requested on the .xm-player wrapper, so
   the controls stay visible in fullscreen. --- */
.xm-player{position:relative;width:100%;background:#000;border-radius:12px;overflow:hidden}
.xm-player video{width:100%;height:auto;max-height:560px;object-fit:contain;background:#000;display:block}
.video-post .unlocked-media .xm-player{max-width:680px;margin:0 auto}
/* --- Task 39a: fullscreen must REALLY fill the viewport.
   Root cause (Boss's "fullscreen did not enter"): the old rules lost
   the specificity fight. The Task 22 frame caps outrank plain
   .xm-player:fullscreen — .video-post .unlocked-media .xm-player
   (max-width:680px) caps the unlocked paid player, and
   .video-post .post-media.video-media .video-frame video
   (max-height:560px) caps the free-gallery video — so fullscreen
   showed a 680px-wide box / a 560px-tall strip instead of the
   viewport. These selectors outrank the frame caps and remove EVERY
   size restriction (100vw x 100vh, no max-width/max-height, no
   margin, no radius). The video keeps object-fit:contain on a black
   background — never cropped, stretched or distorted — and the
   controls + Settings menu live inside the player, which is the
   fullscreen (top-layer) element, so they render above everything.
   -webkit-full-screen variants cover older Safari. --- */
.xm-player:fullscreen,
.xm-player:-webkit-full-screen,
.video-post .unlocked-media .xm-player:fullscreen,
.video-post .unlocked-media .xm-player:-webkit-full-screen,
.video-post .post-media.video-media .video-frame .xm-player:fullscreen,
.video-post .post-media.video-media .video-frame .xm-player:-webkit-full-screen{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;border-radius:0;background:#000}
.xm-player:fullscreen video,
.xm-player:-webkit-full-screen video,
.video-post .unlocked-media .xm-player:fullscreen video,
.video-post .unlocked-media .xm-player:-webkit-full-screen video,
.video-post .post-media.video-media .video-frame .xm-player:fullscreen video,
.video-post .post-media.video-media .video-frame .xm-player:-webkit-full-screen video{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;background:#000}
.xm-player.xm-idle{cursor:none}
.xm-spinner{position:absolute;left:50%;top:50%;width:40px;height:40px;margin:-20px 0 0 -20px;border:3px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:xm-spin 1s linear infinite;z-index:3;pointer-events:none}
@keyframes xm-spin{to{transform:rotate(360deg)}}
.xm-controls{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:0 10px 8px;background:linear-gradient(180deg,transparent,rgba(0,0,0,.55) 45%,rgba(0,0,0,.78));opacity:1;transition:opacity .25s ease}
.xm-player.xm-idle .xm-controls{opacity:0;pointer-events:none}
.xm-seek{position:relative;height:18px;display:flex;align-items:center;cursor:pointer}
.xm-seek-track{position:relative;height:4px;width:100%;background:rgba(255,255,255,.35);border-radius:2px;transition:height .15s ease}
.xm-seek:hover .xm-seek-track,.xm-seek-input:focus-visible+.xm-seek-track{height:6px}
.xm-seek-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:var(--accent);border-radius:2px}
.xm-seek-handle{position:absolute;top:50%;left:0;width:12px;height:12px;border-radius:50%;background:#fff;transform:translate(-50%,-50%);box-shadow:0 1px 4px rgba(0,0,0,.5)}
.xm-seek-input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0;z-index:2}
.xm-seek-input:focus-visible+.xm-seek-track{box-shadow:0 0 0 2px #fff}
.xm-seek-tip{position:absolute;bottom:24px;transform:translateX(-50%);background:rgba(0,0,0,.88);border:1px solid rgba(255,255,255,.25);border-radius:8px;padding:4px;color:#fff;font-size:12px;font-weight:700;text-align:center;pointer-events:none;white-space:nowrap;z-index:4}
.xm-seek-canvas{display:none;width:160px;height:90px;border-radius:4px;background:#000}
.xm-seek-time{display:block;padding:3px 4px 1px}
.xm-controls-row{display:flex;align-items:center;gap:2px;margin-top:2px}
.xm-btn{background:none;border:0;color:#fff;width:36px;height:36px;display:grid;place-items:center;border-radius:8px;padding:0;flex:none}
.xm-btn:hover{background:rgba(255,255,255,.15)}
.xm-btn:focus-visible{outline:2px solid #fff;outline-offset:-2px}
.xm-btn svg{width:20px;height:20px}
.xm-vol{display:flex;align-items:center;flex:none}
.xm-vol-input{width:64px;accent-color:#fff;cursor:pointer;margin:0 2px}
.xm-time{color:#fff;font-size:12px;font-weight:600;white-space:nowrap;margin-left:4px;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.xm-spacer{flex:1}
.xm-settings-menu{position:absolute;right:10px;bottom:64px;z-index:4;background:rgba(20,20,20,.96);border:1px solid rgba(255,255,255,.2);border-radius:12px;padding:8px;min-width:200px;color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.5)}
.xm-set-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#bbb;padding:6px 8px 2px}
.xm-set-opt{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;color:#fff;text-align:left;padding:8px;border-radius:8px;font-size:13px}
.xm-set-opt:hover{background:rgba(255,255,255,.12)}
.xm-set-opt svg{width:16px;height:16px;flex:none;visibility:hidden;color:var(--accent)}
.xm-set-opt[aria-checked="true"] svg{visibility:visible}
.xm-set-opt[aria-checked="true"]{color:#fff;font-weight:700}
.xm-set-note{font-size:11px;color:#bbb;padding:2px 8px 6px;margin:0;line-height:1.4}
@media(max-width:760px){
  .xm-vol-input{width:48px}
  .xm-seek{height:22px}
  .xm-seek-tip{bottom:26px}
  .xm-settings-menu{min-width:180px;bottom:60px}
}

/* --- Task 14: homepage scrolling behaviour (index.html only).
   Desktop: the left and right columns stay fixed in place while the
   centre feed scrolls with the page. A side column whose content is
   taller than the viewport gets its own scroll container, so it can
   scroll independently without moving the feed.
   Sticky (not a fixed-height app shell) is deliberate: the shared
   footer (footer.js) is appended to <body> AFTER .layout, and
   The document is the scroller for the centre feed (the feed
   deep-link scrolls via scrollIntoView) — a body{overflow:hidden}
   shell would cut the footer off the desktop homepage and break that
   scrolling. The sidebars are what stay fixed. No position:fixed is
   used for either column on desktop.
   Mobile (<=760px) is untouched: normal page scroll, the left
   sidebar stays the slide-in drawer, discovery is a section below
   the feed. --- */
@media(min-width:761px){
  /* Left nav column: already sticky at top:76px (62px topnav + 14px
     gap, the pre-existing .layout .left-sidebar rule). Cap it to the
     viewport and let it scroll internally when its content is taller.
     No overscroll-behavior here: Playwright proved
     overscroll-behavior:contain turns a non-overflowing sidebar into
     a dead wheel zone (the page stops scrolling under the mouse). */
  .layout.home-layout .left-sidebar{max-height:calc(100vh - 90px);max-height:calc(100dvh - 90px);overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable}
}
@media(min-width:1001px){
  /* Right discovery column: sticky only where it is actually a side
     column. At 761-1000px the rail sits BELOW the feed (Task 13) and
     must scroll with the page like any other section. */
  .layout.home-layout .right-sidebar{position:sticky;top:76px;align-self:start;max-height:calc(100vh - 90px);max-height:calc(100dvh - 90px);overflow-y:auto;scrollbar-width:thin;scrollbar-gutter:stable}
}

/* --- Task 37/38 (Agent C): public profile tabs, More Info, subscription
   section + popup, and the My Subscriptions list. Colours come from the
   page CSS variables, so Light (default, lime #84B800) and Dark (lime
   #C6F542) both work; no hard-coded theme colours here. --- */
.prof-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin:0 0 4px}
.prof-tab{border:0;background:none;color:var(--muted);font-weight:700;padding:10px 14px;border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.prof-tab.active{color:var(--text);border-bottom-color:var(--accent)}
/* (Task 54) .prof-media-count removed: the count line under the profile tabs is gone. */
.prof-posts-body{display:grid;gap:12px}
.prof-moreinfo{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:12px}
.prof-moreinfo h3{margin:0 0 10px;font-size:16px}
.prof-more-list{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0}
.prof-more-list dt{color:var(--muted)}
.prof-more-list dd{margin:0;text-align:right;font-weight:700}
.xm-sub-plans{display:grid;gap:8px;margin:12px 0}
.xm-plan{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--card2)}
.xm-plan-price{font-weight:800;white-space:nowrap}
.prof-sub-count{margin:8px 0 0}
/* --- Task 71: OnlyFans-style subscription popup (reference: cover +
   overlapping avatar, name + badges + @username, SUBSCRIBE AND GET
   THESE BENEFITS with blue checks, big PLEASE ADD A PAYMENT CARD
   pill, CLOSE footer) + payment-method choice (Card / PayPal /
   Apple Pay). Task 72: ADD CARD form popup. No green online dot
   (never a fake presence signal). All colours come from the theme
   variables, so Light and Dark both work; the OnlyFans blue #00aff0
   is used for the benefit checks, the add-card button and CLOSE. --- */
.xm-sub-modal{width:min(560px,100%);padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 32px)}
.xm-sub-cover{height:170px;background:linear-gradient(120deg,#28343a,#69777b);flex:none}
.xm-sub-cover img{width:100%;height:100%;object-fit:cover;display:block}
.xm-sub-head{display:flex;gap:14px;align-items:center;padding:0 20px;margin-top:-38px;position:relative;z-index:1;flex:none}
.xm-sub-head .avatar{width:76px;height:76px;border:3px solid var(--surface);box-shadow:0 2px 10px #0003}
.xm-sub-head .avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
/* --- Task 73 (2026-11-25): subscription popup name below the cover.
   Bug (Boss's phone screenshot 20:10 PKT): .xm-sub-head pulls up -38px
   over the cover and .xm-sub-id had only 10px top padding, so the name
   started 28px ABOVE the cover's bottom edge and '@username' sat on the
   cover edge too — dark text unreadable on the photo. Fix: top padding
   44px (> 38px overlap) so name + @username + plan line all start in
   the white/surface area below the cover. The avatar keeps overlapping
   the cover (OnlyFans look) — only the text moves down. --- */
.xm-sub-id{padding:44px 0 0;min-width:0}
.xm-sub-name{font-size:19px;font-weight:800;display:flex;align-items:center;gap:6px}
.xm-sub-user{color:var(--muted);margin-top:2px}
.xm-sub-planline{color:var(--muted);font-weight:700;margin-top:2px}
.xm-sub-body{padding:16px 20px 0;display:grid;gap:14px;overflow-y:auto;min-height:0}
.xm-sub-ben-h{margin:0;color:#8a97a3;font-size:15px;font-weight:700;letter-spacing:.4px}
.xm-sub-benefits{margin:0;padding:0;list-style:none;display:grid;gap:12px}
.xm-sub-benefits li{display:flex;gap:12px;align-items:flex-start;line-height:1.45;font-size:15px}
.xm-sub-benefits li .xm-sub-check{flex:none;width:22px;height:22px;color:#00aff0;margin-top:1px}
.xm-sub-benefits li .xm-sub-check svg{width:22px;height:22px;display:block}
.xm-pay-label{margin:0;color:#8a97a3;font-size:15px;font-weight:700;letter-spacing:.4px}
.xm-pay-opts{display:grid;gap:8px}
.xm-pay-opt{display:flex;align-items:center;gap:12px;width:100%;border:1px solid var(--line);border-radius:12px;padding:13px 14px;background:var(--card2);font-weight:700;text-align:left}
.xm-pay-opt:hover{border-color:var(--accent)}
.xm-pay-opt .xm-pay-ic{flex:none;min-width:26px;display:flex;align-items:center}
.xm-pay-opt .xm-pay-ic svg{width:24px;height:24px}
.xm-pay-brand{font-weight:800;font-size:15px}
.xm-pay-paypal{color:#009cde;font-style:italic}
.xm-pay-opt .xm-pay-name{flex:1}
.xm-pay-opt .xm-pay-price{font-weight:800;white-space:nowrap}
.xm-pay-opt .xm-pay-chev{color:var(--muted);display:flex}
.xm-pay-opt .xm-pay-chev svg{width:18px;height:18px}
.xm-sub-addcard{width:100%;border:1px solid var(--line);background:var(--card);color:#00aff0;border-radius:999px;padding:15px 20px;font-weight:800;font-size:15px;letter-spacing:.6px}
.xm-sub-addcard:hover{border-color:#00aff0}
.xm-sub-foot{display:flex;justify-content:flex-end;border-top:1px solid var(--line);padding:12px 20px;flex:none}
.xm-sub-foot .secondary{border:0;background:none;color:#00aff0;border-radius:8px;padding:10px 12px;font-weight:800;letter-spacing:.4px}
.xm-pay-backdrop{z-index:90}
.xm-pay-modal{width:min(520px,100%);padding:0;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 32px)}
.xm-pay-head{padding:18px 20px 0;flex:none}
.xm-pay-head h2{margin:0;font-size:17px;letter-spacing:.4px}
.xm-pay-plan{margin:12px 20px 0;background:var(--card2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:2px}
.xm-pay-plan-name{font-weight:800}
.xm-pay-plan-price{color:var(--muted);font-weight:700}
.xm-pay-body{padding:16px 20px;overflow-y:auto;display:grid;gap:14px;align-content:start;min-height:0}
.xm-pay-sec{margin:0;color:#8a97a3;font-size:14px;font-weight:700;letter-spacing:.4px}
.xm-card-form{display:grid;gap:12px}
.xm-card-field{display:grid;gap:6px}
.xm-card-field>span{font-size:13px;font-weight:700;color:var(--muted)}
.xm-card-field input,.xm-card-field select{width:100%;background:var(--card2);border:1px solid var(--line);border-radius:10px;padding:13px 14px;color:var(--text)}
.xm-card-field input:focus,.xm-card-field select:focus{outline:2px solid var(--accent);outline-offset:0;border-color:var(--accent)}
.xm-card-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.xm-card-num{position:relative}
.xm-card-num input{padding-right:48px}
.xm-card-scan{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:0;background:none;color:#00aff0;padding:6px}
.xm-card-scan svg{width:24px;height:24px;display:block}
.xm-card-longer{border:0;background:none;color:#00aff0;font-weight:700;padding:0;text-align:left;justify-self:start}
.xm-check18{display:flex;gap:12px;align-items:flex-start;line-height:1.5;cursor:pointer}
.xm-check18 input{width:22px;height:22px;flex:none;accent-color:#00aff0;margin-top:2px}
.xm-brand-row{display:flex;gap:8px;flex-wrap:wrap}
.xm-brand{border:1px solid var(--line);border-radius:6px;background:#fff;color:#111;padding:4px 8px;font-size:12px;font-weight:800;display:inline-flex;align-items:center;gap:5px}
.xm-brand-visa{color:#1a1f71;font-style:italic;letter-spacing:.5px}
.xm-brand-mc{display:inline-flex}
.xm-brand-mc i{width:14px;height:14px;border-radius:50%;display:block}
.xm-brand-mc i:first-child{background:#eb001b}
.xm-brand-mc i:last-child{background:#f79e1b;margin-left:-6px;opacity:.9}
.xm-brand-dc{width:16px;height:16px;border:2px solid #0d4f8b;color:#0d4f8b;border-radius:50%;display:inline-grid;place-items:center;font-size:10px;font-style:italic}
.xm-brand-dc::before{content:'D'}
.xm-brand-discover{color:#f48120}
.xm-brand-jcb{display:inline-flex;gap:1px}
.xm-brand-jcb i{width:5px;height:14px;display:block}
.xm-brand-jcb i:nth-child(1){background:#0b4ea2}
.xm-brand-jcb i:nth-child(2){background:#cc1226}
.xm-brand-jcb i:nth-child(3){background:#0a8a4b}
.xm-pay-actions{display:flex;gap:4px;justify-content:flex-end;border-top:1px solid var(--line);padding:12px 20px;flex:none}
.xm-pay-actions button{border:0;background:none;color:#00aff0;font-weight:800;letter-spacing:.4px;padding:12px 14px}
.xm-pay-actions button:disabled{color:var(--muted)}
.xm-pay-actions .xm-pay-cancel{color:#00aff0}
.xm-plan-opt{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card2);font-weight:700;text-align:left}
.xm-plan-opt.selected{border-color:var(--accent);background:var(--accentGlowSoft);box-shadow:0 0 0 1px var(--accent)}
.xm-sub-actions{display:flex;gap:10px;justify-content:flex-end}
.xm-sub-actions .secondary{border:1px solid var(--line);background:var(--card2);border-radius:28px;padding:12px 20px;font-weight:800}
.xm-sub-msg{margin:0;color:var(--text);background:var(--card2);border:1px solid var(--line);border-radius:12px;padding:12px 14px;line-height:1.5}
.xm-sub-list{display:grid;gap:12px;margin-top:14px}
.xm-sub-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow);display:grid;gap:8px}
.xm-sub-card h2{margin:0;font-size:17px}
.xm-sub-card h2 a:hover{color:var(--accent)}
.xm-sub-meta{color:var(--muted);line-height:1.6;margin:0}
.xm-sub-status{display:inline-block;border-radius:14px;padding:3px 10px;font-size:11px;font-weight:800;justify-self:start}
.xm-sub-status.active{background:var(--accent);color:#17200a}
.xm-sub-status.pending{background:#e8c832;color:#231f04}
.xm-sub-status.expired,.xm-sub-status.cancelled{background:var(--card2);color:var(--muted)}
.xm-sub-cancel{border:1px solid var(--line);background:var(--card2);border-radius:20px;padding:8px 16px;font-weight:700;justify-self:start}
.xm-sub-cancel.danger{border-color:#c0392b;color:#c0392b}
@media(max-width:760px){.prof-tabs{overflow-x:auto}.xm-sub-modal{max-height:calc(100dvh - 16px)}.xm-sub-cover{height:120px}.xm-sub-head{padding:0 14px;margin-top:-32px}.xm-sub-id{padding-top:38px}.xm-sub-head .avatar{width:64px;height:64px}.xm-sub-body{padding:14px 14px 0}.xm-sub-foot{padding:10px 14px}.xm-sub-actions{flex-direction:column}.xm-sub-actions .primary,.xm-sub-actions .secondary{width:100%}.xm-pay-modal{max-height:calc(100dvh - 16px)}}

/* --- Task 42: Paid Live Chat.
   The profile LIVE CHAT button matches the Task 45 plan buttons
   (glossy pill, white text, margin-top 12px) in its own teal
   gradient so it reads as a separate action. The popup reuses the
   subscription modal layout (.xm-sub-*); the player modal reuses
   the existing player, with a LIVE CHAT badge in the .status
   position (top-left, see line 12). On mobile the button stacks
   full-width under the plan buttons, same as .prof-plan-btns. --- */
/* (Task 73) No outer glow on the LIVE CHAT button either (see note at .prof-plan-btn--m1). */
.prof-livechat-btn{position:relative;display:inline-flex;align-items:center;gap:8px;border:0;border-radius:999px;padding:13px 20px;margin-top:12px;font-weight:800;font-size:15px;color:#fff;white-space:nowrap;cursor:pointer;background:linear-gradient(180deg,#22d3ee,#0891b2 55%,#0e7490);box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.prof-livechat-btn:hover{filter:brightness(1.08)}
.prof-livechat-btn:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.prof-livechat-btn:disabled{opacity:.6;cursor:default}
.xm-lc-modal{width:min(560px,100%);padding:0;overflow:hidden}
.xm-lc-summary{margin:0;line-height:1.55}
.xm-lc-price{margin:0;font-weight:800;font-size:18px}
.xm-lc-player-modal{width:min(760px,100%);padding:0;overflow:hidden}
.xm-lc-player-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;font-weight:800;font-size:16px}
.xm-lc-player-close{border:0;background:var(--card2);color:var(--text);border-radius:50%;width:32px;height:32px;cursor:pointer;font-size:14px;line-height:1}
.xm-lc-stage{padding:0 16px 16px}
.xm-lc-player{height:auto}
.xm-lc-player video{max-height:520px;object-fit:contain;background:#000}
.xm-lc-player .xm-player{max-width:680px;margin:0 auto}
.xm-livechat-badge{z-index:5;background:#0891b2;color:#fff}
@media(max-width:760px){
  .prof-livechat-btn{flex:1 1 100%;justify-content:center;padding:12px 16px;font-size:14px}
  .xm-lc-player-modal{width:100%}
}

/* --- Task 50: mobile profile full-width fix (Boss's 2026-11-25 phone
   screenshot: xoticmate.com/SadSpice1 on a ~360px phone).
   Root causes, all measured in Playwright against the real public/
   files (Task 50 stub server, SadSpice1 seed):
   (1) The profile page paid the mobile .layout padding (10px) AND
   .creator-page-shell's own 20px side padding, so the profile card
   was only 300px wide in a 360px viewport (30px gutters each side)
   while feed cards are 340px wide — the page read as "width puri
   nahi aa rahi".
   (2) The guest topnav measured exactly 360px wide at a 360px
   viewport with the fallback font (menu 38 + logo 84 + search 38 +
   Log in 65 + Register 83 + gaps/padding 52) — zero slack, so the
   real Inter font pushed the Register button past the right edge,
   where html,body{overflow-x:hidden} clips it. Fix: give the
   <=420px topnav real slack (tighter padding/gaps, smaller logo and
   auth buttons, auth labels never wrap).
   (3) The custom player's controls row needs ~318px at full size
   but a profile-post player is only ~252px wide at 360px (292px
   after fix (1)), so the fullscreen button was clipped by
   .xm-player{overflow:hidden}. Fix: below 480px the buttons shrink
   to 32px, the row gap goes to 0, and the volume slider hides (the
   mute toggle still works, so volume control is not lost); the row
   then fits a 252px player with room to spare. PiP, Settings,
   fullscreen, seek and the time display are all kept.
   Boss's 15:21 PKT clarification (this section's final shape):
   the width must be FULL, not just overflow-free — at 360px and
   390px the profile content (cover, buttons, tabs, feed) takes the
   WHOLE viewport width edge-to-edge, with no side gap and nothing
   cut off. Merely matching the feed's 10px-inset width is NOT
   enough. Fix: on the profile page ONLY (creator.html carries the
   .creator-layout class on its .layout — .layout.no-right is shared
   by 13 pages, so a bare .no-right rule would bleed everywhere),
   the mobile .layout padding goes to 0, the shell keeps no side
   padding, the profile card loses its 18px radius (so the cover is
   corner-to-corner), the body padding loses its 14px sides (tabs
   and post cards span the full width), and profile post cards lose
   their radius too. Text keeps a 14px inset where it sits directly
   on the card (.prof-info, the media-count line, empty states) so
   words never touch the screen edge. Desktop is untouched: every
   rule here lives inside max-width media queries. --- */
@media(max-width:760px){
  .layout.creator-layout{padding:0 0 12px}
  .creator-page-shell{margin:0 auto;padding:0 0 12px}
  .prof{border-radius:0}
  .prof-layout{padding:12px 0 0}
  .prof-main .post-card{border-radius:0}
  .prof-posts-body>.muted{padding:0 14px}
}
@media(max-width:420px){
  /* Task 74: the <=420px topnav keeps the big 38px logo too (this block
     used to shrink it to 24px — the Task 50 overflow fix). The extra
     width is paid for here, not by the logo: tighter bar gap/padding
     and 1px less auth-button padding each side. Guest 360px MEASURED
     (after): menu 34 + logo 114 + search 34 + Log in 58.5 + Register
     77.4 + gaps/padding/free-gap ~42 = 360 exactly, Register right
     edge 354 (6px from the edge, fully visible), 10px free gap between
     logo and search absorbs font variance — Task 50's overflow does
     not come back. Desktop logo unchanged (38px). */
  .xm-topnav{gap:4px;padding:0 6px}
  .xm-topnav-brand .logo-img{height:38px}
  .xm-topnav-auth{white-space:nowrap}
  .xm-topnav-auth .login-link{padding:8px 7px}
  .xm-topnav-register{padding:8px 9px}
}
@media(max-width:480px){
  .xm-controls-row{gap:0}
  .xm-btn{width:32px;height:32px}
  .xm-vol-input{display:none}
  .xm-time{font-size:11px}
}

/* --- Task 53: home feed one profile per post (2026-11-25). The
   Task 22 .rec-row rules above were deleted with the row itself; no
   other style change was needed — the single .creator-card keeps the
   existing Task 12/17 rules. --- */

/* --- Task 55 + 56: subscription pills on mobile (Boss 2026-11-25,
   reference screenshot 'Is trha'). Mobile only (<=760px): the three
   plan pills sit side by side in ONE row (three equal columns, not
   stacked) and fit fully at 360/390px. Each pill matches the
   reference: icon on the LEFT, duration on top and price below (two
   lines, chevron right after the price), SAVE 17% / SAVE 25% badges
   straddling the top edge, rounded corners (20px). (Task 60) Maximum
   compact: 11px font, 7px 8px padding, 16px icon — ~40px tall, the
   floor where the two lines stay readable and the pill stays
   tappable. Desktop pills also shrank a little (base rules above:
   one-line row, padding 10px 20px, font 14px, ~39px tall, capsule
   radius). --- */
@media(max-width:760px){
  .prof-plan-btns{flex-direction:row;gap:8px;margin-top:12px}
  .prof-plan-btn{flex:1 1 0;min-width:0;justify-content:flex-start;text-align:left;white-space:normal;padding:7px 8px;font-size:11px;line-height:1.2;margin-top:8px;gap:6px;border-radius:20px}
  .prof-plan-icon svg{width:16px;height:16px}
  .prof-plan-text{display:flex;flex-direction:column;align-items:flex-start;min-width:0}
  .prof-plan-line2{display:flex;align-items:center;gap:3px}
  .prof-plan-sep{display:none}
  .prof-plan-chev svg{width:11px;height:11px}
}

/* --- Task 57: profile header layout (Boss 2026-11-25, second reference
   screenshot). Avatar LEFT, name + @username to its RIGHT in the same
   row, then the 3 subscription pills in one line, then the tabs. The
   head row (avatar + info) is pulled up over the cover by half the
   avatar height, so the avatar overlaps the cover. (Task 59) The name
   block is pushed down so the name sits fully BELOW the cover edge,
   beside the avatar's lower half — the row aligns to the top and the
   info carries a top padding equal to the pull-up plus a few px
   (48px desktop, 56px mobile), so the name's top lands ~4px under the
   cover edge whatever the name length. The avatar is in-flow now
   (no longer absolute). The pills and Live Chat sit below the head
   row as siblings of it. Desktop and mobile share the arrangement;
   mobile uses the bigger 104px avatar from the reference (~107px at
   360px). Desktop pills stay a right-aligned row below the header;
   on mobile they are the Task 56 full-width 3-column row. --- */
.prof-head{display:flex;align-items:flex-start;gap:12px;padding:0 20px;position:relative;margin-top:-44px}
.prof-avatar{position:static;left:auto;top:auto}
.prof-info{padding:48px 0 0;flex:1;min-width:0}
.prof-plan-btns{margin-top:12px}
@media(max-width:760px){
  .prof-head{padding:0 14px;margin-top:-52px}
  .prof-info{padding:56px 0 0;flex:1;min-width:0}
  .prof-avatar{width:104px;height:104px;font-size:32px}
  .prof-name{font-size:19px}
  .prof-plan-btns{margin-top:12px}
  .prof-livechat-btn{display:flex;width:100%;justify-content:center;padding:12px 16px;font-size:14px}
  /* (Task 65) The post/like cover chips are gone, so there is nothing
     to lift above the head row on mobile any more. */
}

/* --- Task 59: profile name sits too high (Boss 2026-11-25, phone
   screenshot of the live site after the Tasks 53–57 deploy: the name
   'Sad Spice1' sat ON the cover's bottom edge). Root cause: Task 57
   centred the name block on the avatar, and the avatar straddles the
   cover boundary 50/50, so the name's centre landed exactly on the
   cover edge. Fix (see the Task 57 block above): the head row aligns
   to the top and .prof-info carries a top padding of pull-up + ~4px,
   so the name + @username sit fully in the white area below the
   cover, beside the avatar's lower half. The avatar still overlaps
   the cover by half its height, exactly as in Boss's reference. The
   verified badge next to the name is BLUE (filled #1d9bf0 rosette,
   white tick) — that lives in app.js (XM_ACTION_ICONS.badgeCheck),
   shared by every verified badge on the site. --- */

/* --- Task 60: remove the empty gap + shrink the pills to the maximum
   (Boss 2026-11-25, phone screenshot with a red box: a large EMPTY
   white gap sat between @SadSpice1 and the pills row; then 'Maximum
   kam kr do' for the pill height). Root cause of the gap: the mobile
   pills row carried margin-top:36px (Task 55/56 + Task 57 blocks) on
   top of the head row, whose bottom is already the @username line —
   measured 36px of empty white at 360/390px (desktop was already
   12px). Fix: the mobile pills margin is 12px, matching desktop, so
   the gap is ~12px to the pills box and ~9px to the SAVE badges,
   which still clear the @username line (badge top = box top + 8px
   button margin − 11px overhang). The name is NOT moved (Task 59
   geometry untouched — name top still ~4px below the cover edge).
   Height (maximum compact, Boss's words): mobile pills are 11px font
   / 1.2 line-height / 7px 8px padding / 16px icon / 11px chevron —
   ~40px tall, the floor where '1 Month' + '$10' stay readable and
   the pill stays tappable (40px); any smaller breaks readability.
   Desktop pills also shrank a little (10px 20px padding, 14px font,
   ~39px) without changing the design — same gradients, badges,
   one-line row. The Live Chat button is untouched. --- */

/* --- Task 61: remove the empty gap between the pills and the tabs
   (Boss 2026-11-25, phone screenshot with a red box: a large EMPTY
   white gap sat between the subscription pills row and the Video /
   Photo tabs below it). Root cause: three stacked spacings between
   the pills row and the tabs row — .prof-plan-btns padding-bottom
   10px + .prof-layout padding-top 12px mobile / 16px desktop +
   .prof-tabs margin-top 4px = 26px mobile / 30px desktop of empty
   white (measured on the live screenshot: pills bottom to tabs top
   ~29 CSS px at 360px; the stub probe measured the same 26px once
   the Live Chat button's own height is taken out — the stub renders
   LIVE CHAT — $20 for SadSpice1, live does not, so the harness
   subtracts the button when it is present). Fix: the pills container
   padding-bottom is 0 and the tabs margin-top is 0, so the only
   spacing left is the layout's top padding — 12px at every width
   (desktop .prof-layout padding-top 16px -> 12px to match mobile).
   The pills stay 40px in one row, the name stays fully below the
   cover with the blue badge, and the tabs keep their bottom margin.
   (Task 64 moved the Live Chat button off this stretch entirely —
   it now lives in the tabs row — so the 12px is the whole gap and
   no button height has to be subtracted any more.) --- */

/* --- Tasks 62/63/64: profile post-card tightening + Tip label + Live
   Chat button in the tabs row (Boss 2026-11-25, phone screenshots
   with red boxes; all PROFILE-ONLY — the home feed is untouched).
   (Task 62) Three empty spaces on the profile post card, measured
   on the live screenshot (360px, 2x DPR) and confirmed in the stub
   probe: (1) tabs bottom -> caption top was 29px mobile / 31px
   desktop = .prof-tabs margin-bottom 10px + card padding-top
   10/12px + .caption margin-top 8px; now 4px + 4px + 0 = 8px.
   (2) video bottom -> action icons top was 8px = .post-gallery
   margin-bottom 8px (the only spacing there — the live screenshot
   reads wider only because the 40px buttons carry 9px of padding
   above their 22px icons); now 4px on the profile. (3) below the
   card -> footer was ~96px mobile / ~134px desktop = card
   margin-bottom 12px + .prof-layout padding-bottom 16/20px +
   .creator-page-shell padding-bottom 40px + shell margin-bottom 24px
   (desktop) + the SHARED .layout padding-bottom 12/14px + footer
   padding-top 16/24px; the card margin is now 0 (the .prof-posts-body
   grid gap of 12px already separates profile cards — the old 12px
   margin DOUBLED it to 24px between cards), the layout
   padding-bottom is 0 at every width, the shell padding-bottom is
   12px and its margin-bottom is 0, so the last card sits 40px
   (mobile) / 50px (desktop) above the footer logo — the floor set by
   the shared .layout + footer padding, which is page furniture and
   is NOT changed. The footer itself is shared, so its padding is
   NOT changed. Update (same day, Boss: '0 likes wala bi khatam kr
   do'): the '0 likes' line itself is also REMOVED from profile
   cards — see renderPost in app.js; the card now ends at the action
   row (card padding-bottom 6px on the profile) and the Like button
   still works (the count is hidden, not the like). (Task 63) The
   Tip button on profile cards carries a 'Tip' label next to its $
   icon (mediaOnly only — the home feed keeps the icon-only button).
   (Task 64) The Live Chat button moved from below the pills into
   the tabs row, right-aligned (margin-left:auto): it reuses the
   Task 42 button (same configured price, same popup flow, hidden
   entirely when Live Chat is not configured — SadSpice1 live has
   none, so her tabs row is unchanged there). The row's
   overflow-x:auto at <=760px is the fallback; the compact
   13px/8px-14px button fits beside Video (1) + Photo (0) at 360px.
   The two <=760px/.prof-livechat-btn full-width rules are outranked
   here by the .prof-tabs descendant selector. --- */
#creatorPage .prof-main .post-card{padding-top:4px;padding-bottom:6px}
#creatorPage .post-caption{margin-top:0}
#creatorPage .post-gallery{margin-bottom:4px}
#creatorPage .post-actions .tip-btn{width:auto;padding:0 12px;gap:6px}
#creatorPage .post-actions .tip-btn .tip-label{font-size:13px;font-weight:700}
.prof-tabs .prof-livechat-btn{flex:0 0 auto;width:auto;margin:0 0 0 auto;align-self:center;padding:8px 14px;font-size:13px;display:inline-flex}

/* --- Task 65: remove the '1 post' / '0 likes' chips from the cover
   (Boss 2026-11-25, phone screenshot with a red box around the two
   black chips at the cover's bottom-right). The chips were built by
   buildCreatorProfileDOM in app.js (.prof-cover-stats, from
   prof.post_count / prof.total_likes) — the element is no longer
   created at all, and its two CSS rules plus the mobile lift
   (.prof-cover-stats{bottom:60px}, which kept the chips above the
   head row) are removed with it. The counts are NOT lost: the post
   counts live on the Video/Photo tabs (Task 54), and the per-post
   like counts stay on the home feed (the profile cards never showed
   them — Task 62 update). The cover keeps its image, Back button
   and More menu; the avatar, name, pills and tabs are untouched. --- */

/* --- Task 68: Live Chat room (Boss 2026-11-25: after a verified Live
   Chat payment a room must open with a video player carrying a LIVE
   badge and the Task 24 controls). The room modal reuses the Task 42
   popup layout (.xm-lc-modal) and the existing player
   (enhanceXmPlayer) with a red LIVE badge in the .status position
   (top-left). The badge is rendered ONLY when a real live stream
   from GET /api/live-models is playing — never on the recorded video
   (that keeps the Task 42 'LIVE CHAT' badge) and never on the honest
   'Creator is not live yet' empty state. --- */
.xm-lc-room-modal{width:min(760px,100%);padding:0;overflow:hidden}
.xm-lc-room-stage{padding:0 16px 16px}
.xm-lc-room-player{position:relative}
.xm-lc-room-player video{max-height:520px;object-fit:contain;background:#000}
.xm-lc-room-player .xm-player{max-width:680px;margin:0 auto}
.xm-live-badge{position:absolute;top:10px;left:10px;z-index:5;display:inline-flex;align-items:center;gap:6px;background:#dc2626;color:#fff;border-radius:18px;padding:5px 10px;font-size:11px;font-weight:800;letter-spacing:.08em}
.xm-live-badge::before{content:'';width:8px;height:8px;border-radius:50%;background:#fff}
.xm-lc-notlive{padding:28px 16px 10px;text-align:center}
.xm-lc-notlive-title{font-size:18px;font-weight:800}
.xm-lc-notlive-text{opacity:.75;margin:8px 0 16px;line-height:1.5}
.xm-lc-room-recorded-btn{margin:0 auto}
.xm-lc-room-loading{padding:20px 0;text-align:center}
@media(max-width:760px){
  .xm-lc-room-modal{width:100%}
}

/* [Task 78] Home-feed post card, OnlyFans reference (Boss 2026-11-25):
   the creator chip overlays the media instead of a header below it —
   bottom-left circular avatar + white name/@username, '...' top-right.
   The overlay never intercepts media clicks (pointer-events:none except
   the who-chip and the menu button); the scrim keeps white text legible
   on light photos. On video posts the whole overlay is lifted 60px so
   it never covers the player control bar. */
.post-creator-overlay{position:absolute;inset:0;pointer-events:none;z-index:5}
.post-creator-overlay--video{bottom:60px}
.post-overlay-scrim{position:absolute;left:0;right:0;bottom:0;height:110px;background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.62));pointer-events:none}
.post-overlay-who{position:absolute;left:12px;bottom:12px;display:flex;align-items:center;gap:10px;pointer-events:auto;cursor:pointer;min-width:0;max-width:calc(100% - 24px)}
.post-overlay-who .avatar{width:48px;height:48px;border:2px solid rgba(255,255,255,.92);box-shadow:0 1px 8px rgba(0,0,0,.45)}
.post-overlay-idbox{display:grid;gap:1px;min-width:0}
.post-overlay-name{color:#fff;font-weight:800;font-size:16px;line-height:1.2;text-shadow:0 1px 6px rgba(0,0,0,.7);display:flex;align-items:center;gap:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-overlay-user{color:rgba(255,255,255,.93);font-size:13px;line-height:1.2;text-shadow:0 1px 6px rgba(0,0,0,.7);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.post-menu-overlay{position:absolute;top:10px;right:10px;pointer-events:auto}
.post-menu-overlay .post-menu-btn{color:#fff;background:rgba(0,0,0,.35)}
.post-menu-overlay .post-menu-btn:hover{background:rgba(0,0,0,.55);color:#fff}
@media(max-width:760px){.post-overlay-who .avatar{width:44px;height:44px}.post-overlay-name{font-size:15px}.post-overlay-who{left:10px;bottom:10px}}

/* --- Task 79: creator profile cover identity (Boss 2026-11-25,
   OnlyFans trippie reference). The name + blue verified badge and
   the stats row (photos · videos · total likes, real counts) sit ON
   the cover, top-left under the Back button, white over a top scrim;
   Back (top-left) and the '...' menu (top-right) were already on the
   cover. The below-cover head row is UNCHANGED for now (Boss HOLD
   2026-11-25 21:00 PKT) — the name appears twice until he confirms.
   The avatar keeps overlapping the cover's bottom-left (Task 57). --- */
.prof-cover-scrim{position:absolute;left:0;right:0;top:0;height:120px;background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,0));pointer-events:none}
.prof-cover-id{position:absolute;left:14px;top:58px;right:60px;pointer-events:none}
.prof-cover-name{margin:0;color:#fff;font-size:22px;font-weight:800;display:flex;align-items:center;gap:8px;text-shadow:0 1px 8px rgba(0,0,0,.65);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prof-cover-name .verified-badge{display:inline-flex;flex:none}
.prof-cover-name .verified-badge svg{width:20px;height:20px}
.prof-cover-stats{display:flex;align-items:center;gap:8px;margin-top:6px;color:#fff;font-size:14px;font-weight:700;text-shadow:0 1px 6px rgba(0,0,0,.65)}
.prof-cover-stat{display:inline-flex;align-items:center;gap:5px}
.prof-cover-stat-ic{display:inline-flex}
.prof-cover-stat-ic svg{width:16px;height:16px}
.prof-cover-stat-sep{opacity:.7}
@media(max-width:760px){
.prof-cover-scrim{height:110px}
.prof-cover-id{left:12px;top:50px;right:56px}
.prof-cover-name{font-size:19px}
.prof-cover-stats{font-size:13px;margin-top:4px}
}
