@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;gap:8px;flex-wrap:wrap}.filter{display:inline-flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:10px 16px;font-weight:600;font-size:14px;color:var(--text);white-space:nowrap}.filter svg{width:18px;height:18px;flex-shrink:0}.filter:hover{border-color:var(--muted)}.filter.active{background:var(--accent);color:var(--accentText);border-color:var(--accent)}.filter.active svg{color:var(--accentText)}.filter:not(.active)[data-filter="paid"] svg{color:#8f7a00}html[data-theme="dark"] .filter:not(.active)[data-filter="paid"] svg{color:var(--accent)}.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}.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:50;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{align-items:flex-start;flex-direction:column}.filter-group{flex-wrap:nowrap;overflow-x:auto;width:100%;padding-bottom:4px}.filter{white-space:nowrap;padding:9px 12px;font-size:12px}.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}
  .layout>.left-sidebar{display:block;position:fixed;top:0;left:0;bottom:0;width:280px;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:38px;height:38px;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}
  .xm-topnav-brand .logo-img{height:28px}
  .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:8px}
  .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)}
.like-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-cover-stats{position:absolute;right:12px;bottom:12px;display:flex;gap:8px}
.prof-cover-stats span{background:#000a;color:#fff;font-size:12px;font-weight:700;padding:6px 10px;border-radius:999px}
.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}
.prof-actions{display:flex;gap:10px;padding-bottom:10px}
.prof-fav-btn,.prof-share-btn{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:10px 16px;white-space:nowrap}
.prof-fav-btn svg,.prof-share-btn svg{width:18px;height:18px;flex:none}
.prof-fav-btn[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accentText)}
.prof-fav-btn[aria-pressed="true"] svg{fill:currentColor}
.prof-fav-count{font-size:12px;opacity:.8}
.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) 300px;gap:16px;padding:16px 20px 20px;align-items:start}
.prof-main{min-width:0}
.prof-posts-h{margin:0 0 12px;font-size:16px}
.prof-main .post-card{margin-bottom:12px}
.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){
  .prof-layout{grid-template-columns:minmax(0,1fr) 260px}
}
@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 14px 0 98px}
  .prof-info{padding:12px 14px 0}
  .prof-name{font-size:19px}
  .prof-layout{grid-template-columns:1fr;padding:12px 14px 16px}
  .prof-side{position:static}
  .prof-actions{flex-wrap:wrap;justify-content:flex-end}
  .prof-fav-btn,.prof-share-btn{padding:9px 12px;font-size:13px}
}

/* --- 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;padding:0 20px 40px}
.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, two creator recommendation cards sit side by side
   (.rec-row); 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}
.rec-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 4px}
.rec-row .creator-card{margin-top:0;min-width:0}
.rec-row .creator-cover{height:72px}
.rec-row .creator-row{padding:8px 10px;gap:8px}
.rec-row .creator-card .avatar{width:40px;height:40px}
@media(max-width:760px){.rec-row{grid-template-columns:1fr}}

/* --- 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:4px 0 10px}
.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)}
.prof-media-count{margin:0 0 12px}
.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}
.xm-sub-modal{width:min(560px,100%);padding:0;overflow:hidden}
.xm-sub-cover{height:150px;background:linear-gradient(120deg,#28343a,#69777b)}
.xm-sub-cover img{width:100%;height:100%;object-fit:cover;display:block}
.xm-sub-head{display:flex;gap:12px;align-items:center;padding:16px 20px 0}
.xm-sub-head .avatar{width:56px;height:56px}
.xm-sub-name{font-size:18px;font-weight:800;display:flex;align-items:center;gap:6px}
.xm-sub-user{color:var(--muted)}
.xm-sub-body{padding:14px 20px 20px;display:grid;gap:14px}
.xm-sub-benefits{margin:0;padding-left:18px;line-height:1.7}
.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-cover{height:110px}.xm-sub-head{padding:12px 14px 0}.xm-sub-body{padding:12px 14px 16px}.xm-sub-actions{flex-direction:column}.xm-sub-actions .primary,.xm-sub-actions .secondary{width:100%}}
