/* Mama2x2 Photo — global neon redesign + responsive unifier. UI only: no API/db/business logic changes. */
:root{
  --m2-bg:#050610;--m2-bg2:#090b18;--m2-panel:rgba(14,17,34,.80);--m2-panel2:rgba(20,24,48,.90);
  --m2-ink:#f8fbff;--m2-soft:#c9d4ff;--m2-muted:#8d98bf;--m2-line:rgba(151,178,255,.18);
  --m2-cyan:#55f7ff;--m2-pink:#ff4fd8;--m2-violet:#8b5cff;--m2-gold:#ffe08a;--m2-green:#6dffb1;
  --m2-glow-cyan:0 0 22px rgba(85,247,255,.36),0 0 70px rgba(85,247,255,.13);
  --m2-glow-pink:0 0 24px rgba(255,79,216,.36),0 0 80px rgba(255,79,216,.14);
  --m2-shadow:0 26px 90px rgba(0,0,0,.52);--m2-radius:28px;
}
*{box-sizing:border-box;scrollbar-color:rgba(85,247,255,.45) rgba(255,255,255,.04);scrollbar-width:thin}html{background:var(--m2-bg)!important}body{background:radial-gradient(1000px 580px at 8% -8%,rgba(255,79,216,.22),transparent 56%),radial-gradient(900px 620px at 92% 3%,rgba(85,247,255,.18),transparent 58%),radial-gradient(760px 480px at 52% 105%,rgba(139,92,255,.20),transparent 62%),linear-gradient(180deg,#050610 0%,#070918 42%,#03040b 100%)!important;color:var(--m2-ink)!important;min-height:100vh!important;overflow-x:hidden!important}body:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);background-size:44px 44px;mask-image:linear-gradient(180deg,rgba(0,0,0,.55),transparent 72%);z-index:-1}body:after{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 50% 0%,rgba(255,255,255,.07),transparent 38%);z-index:-1}a{color:var(--m2-cyan)!important}.wrap{max-width:1220px!important;width:100%!important}.header,.soc-head{background:rgba(5,7,18,.72)!important;backdrop-filter:blur(22px) saturate(1.4)!important;border-bottom:1px solid rgba(85,247,255,.16)!important;box-shadow:0 16px 70px rgba(0,0,0,.38),0 0 36px rgba(85,247,255,.08)!important}.headerInner{gap:14px!important}.brand,.soc-head .brand{color:var(--m2-ink)!important;text-decoration:none!important}.brandName,.brand,.soc-head .brand{font-weight:1000!important;letter-spacing:-.035em!important;text-shadow:0 0 28px rgba(85,247,255,.22)!important}.brandSub{color:var(--m2-muted)!important}.logo{background:linear-gradient(135deg,rgba(85,247,255,.18),rgba(255,79,216,.16))!important;border:1px solid rgba(85,247,255,.22)!important;box-shadow:var(--m2-glow-cyan)!important}.nav,.soc-head nav{gap:9px!important}.headerBtn,.headerPill,.navLink,.soc-head nav a,.btn,.actions a,.actions button,button{border:1px solid rgba(151,178,255,.20)!important;border-radius:999px!important;background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.045))!important;color:var(--m2-ink)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 12px 35px rgba(0,0,0,.22)!important;text-decoration:none!important;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease!important}.headerBtn:hover,.soc-head nav a:hover,.btn:hover,.actions a:hover,.actions button:hover,button:hover{transform:translateY(-2px)!important;border-color:rgba(85,247,255,.50)!important;box-shadow:var(--m2-glow-cyan),0 14px 42px rgba(0,0,0,.28)!important}.headerPill{color:var(--m2-soft)!important}.headerBtn[href="feed"],#btnTopFeed,.soc-head nav a[href="/photo/feed"],.btn.primary,.navCreate,.actions .remix,.actions .primary,.promoYandex .promoBtn,#btnCreateGen,#btnEmailLogin{background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet) 48%,var(--m2-pink))!important;color:#06101a!important;border:none!important;font-weight:1000!important;box-shadow:0 0 24px rgba(85,247,255,.28),0 0 46px rgba(255,79,216,.17),0 16px 42px rgba(0,0,0,.32)!important}.m2-social-link{right:18px!important;bottom:92px!important;background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink))!important;color:#06101a!important;border:0!important;border-radius:999px!important;padding:13px 17px!important;font-weight:1000!important;box-shadow:0 0 24px rgba(85,247,255,.30),0 0 56px rgba(255,79,216,.18)!important}.m2-journey{margin:4px 0 18px!important;padding:24px!important;border:1px solid rgba(85,247,255,.18)!important;border-radius:32px!important;background:linear-gradient(135deg,rgba(14,17,34,.82),rgba(10,12,26,.70))!important;box-shadow:var(--m2-shadow),0 0 80px rgba(85,247,255,.10)!important;display:grid!important;grid-template-columns:1.15fr repeat(4,1fr)!important;gap:14px!important;position:relative!important;overflow:hidden!important}.m2-journey:before{content:"";position:absolute;inset:-2px;background:radial-gradient(circle at 20% 0,rgba(85,247,255,.18),transparent 34%),radial-gradient(circle at 78% 5%,rgba(255,79,216,.18),transparent 30%);pointer-events:none}.m2-journey>*{position:relative}.m2-journey__intro h1{margin:0!important;font-size:clamp(38px,6vw,76px)!important;line-height:.90!important;letter-spacing:-.075em!important;background:linear-gradient(135deg,#fff,var(--m2-cyan) 42%,#ffd6fb 76%);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:0 0 45px rgba(85,247,255,.18)}.m2-journey__intro p{margin:12px 0 0!important;color:var(--m2-soft)!important;line-height:1.48!important}.m2-step{padding:16px!important;border:1px solid rgba(151,178,255,.17)!important;border-radius:24px!important;background:linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.035))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 16px 50px rgba(0,0,0,.24)!important}.m2-step b{display:block!important;font-size:12px!important;color:var(--m2-cyan)!important;text-transform:uppercase!important;letter-spacing:.16em!important;text-shadow:0 0 16px rgba(85,247,255,.55)!important}.m2-step span{display:block!important;margin-top:8px!important;font-weight:1000!important}.m2-step small{display:block!important;margin-top:7px!important;color:var(--m2-muted)!important;line-height:1.36!important}.promoYandex{display:none!important}
/* Unify old generator pages */
.mainGrid,#homeSection,#createSection,#historySection,#profileSection,.left,.right{max-width:100%!important}.sectionTitle,.hero,.panel,#templates.templates>div,.post-card,.full-media,.full-info,.comment-form,.comment,.stats div,.prompt,.modal,.authCard,.templateCard,.historyCard,.resultCard,.empty,.toast,.lightbox,.drawer,.modalBody,.modalHead{background:linear-gradient(180deg,rgba(17,21,43,.84),rgba(10,12,26,.78))!important;border:1px solid var(--m2-line)!important;border-radius:var(--m2-radius)!important;box-shadow:var(--m2-shadow),0 0 42px rgba(85,247,255,.055)!important;color:var(--m2-ink)!important}.sectionTitle{padding:18px 20px!important;margin-bottom:14px!important}.sectionTitle h2,.hero h1,.full-info h1,.card h2,.modalTitle{color:var(--m2-ink)!important;font-size:clamp(28px,4.4vw,54px)!important;letter-spacing:-.065em!important;text-shadow:0 0 32px rgba(255,79,216,.16)!important}.post-body h2{font-size:clamp(25px,2.6vw,36px)!important;line-height:1.02!important;letter-spacing:-.055em!important;margin:10px 0 8px!important}.post-body h2 a{color:var(--m2-ink)!important;text-decoration:none!important;text-shadow:0 0 26px rgba(255,79,216,.16)!important}.post-body h2 a:hover{color:#fff!important;text-decoration:none!important}.sectionTitle p,.hero p,.post-body p,.meta,.mutedSmall,.comment p,.profile-hero p,.modalSub,.brandSub{color:var(--m2-muted)!important}.modeTabs,.catTabs{gap:9px!important}.modeBtn,.catTabs button,.pill,input,textarea,select,.input{border:1px solid rgba(151,178,255,.18)!important;border-radius:18px!important;background:rgba(255,255,255,.075)!important;color:var(--m2-ink)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.09)!important}input,textarea,select,.input{width:100%;min-height:44px}.modeBtn.active,.catTabs button.active,.navItem.active,[aria-selected="true"]{background:linear-gradient(135deg,rgba(85,247,255,.20),rgba(255,79,216,.14))!important;border-color:rgba(85,247,255,.42)!important;color:#fff!important;box-shadow:var(--m2-glow-cyan)!important}input::placeholder,textarea::placeholder{color:rgba(201,212,255,.46)!important}select option{background:#0b0e1d;color:#fff!important}#templates.templates{gap:16px!important;padding-left:0!important;padding-right:0!important}#templates.templates>div{overflow:hidden!important;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important}#templates.templates>div:hover,.post-card:hover{transform:translateY(-4px)!important;border-color:rgba(85,247,255,.46)!important;box-shadow:var(--m2-shadow),var(--m2-glow-cyan)!important}.post-card .media img,.post-card .media video,#templates.templates img,#templates.templates video{transition:transform .4s ease,filter .4s ease!important}.post-card:hover .media img,.post-card:hover .media video,#templates.templates>div:hover img,#templates.templates>div:hover video{transform:scale(1.035)!important;filter:saturate(1.12) contrast(1.05)!important}.bottomNav{background:rgba(5,7,18,.82)!important;border-top:1px solid rgba(85,247,255,.18)!important;box-shadow:0 -18px 70px rgba(0,0,0,.40)!important;backdrop-filter:blur(22px)!important}.navItem{color:var(--m2-muted)!important}.navCreate{color:#06101a!important;box-shadow:0 0 25px rgba(85,247,255,.32),0 0 55px rgba(255,79,216,.18)!important}.footer{background:transparent!important}.prompt{background:linear-gradient(135deg,rgba(85,247,255,.08),rgba(255,79,216,.06))!important}.remix-grid a{background:rgba(17,21,43,.78)!important;border-color:var(--m2-line)!important;color:#fff!important}.authSocialBtn{border-radius:999px!important}.authSocialY{background:linear-gradient(135deg,#ffe08a,#ffb347)!important;color:#130b03!important}.authSocialVk{background:linear-gradient(135deg,#55f7ff,#487bff)!important;color:#03101a!important}.tech-note,[data-debug],.debug,.log,.raw,.trace{display:none!important}
/* Tablet */
@media(max-width:1100px){.wrap{padding-left:16px!important;padding-right:16px!important}.m2-journey{grid-template-columns:1fr 1fr!important}.m2-journey__intro{grid-column:1/-1!important}.feed{grid-template-columns:repeat(2,minmax(0,1fr))!important}.post-full{grid-template-columns:1fr!important}.headerInner{align-items:flex-start!important}.nav{overflow:auto;max-width:100%;padding-bottom:5px;-webkit-overflow-scrolling:touch}.headerBtn,.headerPill{white-space:nowrap!important}}
/* Phones */
@media(max-width:700px){body{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}.wrap{padding:12px!important}.header{position:sticky!important;top:0}.headerInner,.soc-head{flex-direction:column!important;align-items:flex-start!important}.brand{gap:10px!important}.logo{width:40px!important;height:40px!important;border-radius:14px!important}.brandName{font-size:18px!important}.brandSub{font-size:11px!important;line-height:1.25!important}.nav,.soc-head nav{width:100%!important;overflow-x:auto!important;display:flex!important;flex-wrap:nowrap!important;padding-bottom:7px!important;-webkit-overflow-scrolling:touch}.headerBtn,.headerPill,.soc-head nav a{white-space:nowrap!important;font-size:13px!important;padding:9px 11px!important}.m2-journey{grid-template-columns:1fr!important;padding:16px!important;border-radius:24px!important;margin-top:8px!important}.m2-journey__intro h1{font-size:40px!important}.m2-journey__intro p{font-size:14px!important}.m2-step{padding:13px!important}.sectionTitle{padding:15px!important;border-radius:22px!important}.sectionTitle h2,.hero h1{font-size:32px!important}.modeTabs,.catTabs{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:8px!important;-webkit-overflow-scrolling:touch}.modeBtn,.catTabs button{white-space:nowrap!important;flex:0 0 auto!important;font-size:13px!important;padding:10px 12px!important}#templates.templates,.feed,.compact{grid-template-columns:1fr!important;gap:14px!important;padding:0 0 24px!important}.panel,#templates.templates>div,.post-card,.hero,.full-media,.full-info{border-radius:22px!important}.post-body{padding:14px!important}.post-body h2{font-size:25px!important}.actions{gap:7px!important}.actions a,.actions button,.actions span{font-size:13px!important;padding:9px 11px!important}.full-info{padding:16px!important}.comment-form{padding:14px!important}.bottomNav{height:auto!important;min-height:78px!important;padding:9px 8px calc(9px + env(safe-area-inset-bottom))!important;gap:5px!important}.navItem{padding:7px 4px!important;border-radius:14px!important}.navText{font-size:10px!important}.navIcon{font-size:17px!important}.m2-social-link{left:12px!important;right:12px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;text-align:center!important;font-size:14px!important}.promoYandex{display:none!important}input,textarea,select,.input{font-size:16px!important}.modal{left:10px!important;right:10px!important;width:auto!important;max-width:calc(100vw - 20px)!important}.modalBody{max-height:70vh!important;overflow:auto!important}.remix-grid{grid-template-columns:1fr 1fr!important}}
/* Small phones */
@media(max-width:390px){.wrap{padding:10px!important}.brandSub{display:none!important}.m2-journey__intro h1{font-size:35px!important}.headerBtn,.headerPill,.soc-head nav a{font-size:12px!important;padding:8px 10px!important}.sectionTitle h2,.hero h1{font-size:29px!important}.post-body h2{font-size:23px!important}.actions a,.actions button,.actions span{width:100%;justify-content:center;text-align:center}.remix-grid{grid-template-columns:1fr!important}}
@media(min-width:701px){.m2-social-link{display:none!important}}

/* iPhone / small mobile clarity fix — keep product logic untouched */
@media (max-width: 700px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body{background:linear-gradient(180deg,#050610,#070918 55%,#03040b)!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  body:before{background-size:34px 34px!important;opacity:.45!important}
  .wrap{width:100%!important;max-width:100%!important;padding:10px 12px!important;margin:0!important}
  .header{position:sticky!important;top:0!important;z-index:1000!important}
  .headerInner{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding-top:8px!important;padding-bottom:8px!important}
  .brand{width:100%!important;min-width:0!important;align-items:center!important}
  .logo{width:36px!important;height:36px!important;min-width:36px!important;font-size:18px!important}
  .brandName{font-size:17px!important;line-height:1.05!important;white-space:nowrap!important}
  .brandSub{font-size:10px!important;line-height:1.15!important;max-width:calc(100vw - 72px)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .nav{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;gap:7px!important;overflow:visible!important;padding:0!important}
  .headerPill{grid-column:1/-1!important;text-align:center!important;justify-content:center!important;font-size:12px!important;padding:7px 10px!important;min-height:34px!important}
  .headerBtn{width:100%!important;text-align:center!important;justify-content:center!important;font-size:12px!important;padding:9px 8px!important;min-height:38px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #btnTopInstall,#btnTopChat{display:none!important}
  #btnTopBuy{font-size:12px!important;padding:9px 8px!important;min-height:38px!important}
  .m2-journey{display:block!important;padding:14px!important;margin:10px 0 12px!important;border-radius:20px!important;box-shadow:0 18px 55px rgba(0,0,0,.42)!important}
  .m2-journey__intro h1{font-size:30px!important;line-height:.98!important;letter-spacing:-.055em!important;color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important;text-shadow:0 0 26px rgba(85,247,255,.22)!important}
  .m2-journey__intro p{font-size:13px!important;line-height:1.38!important;margin-top:8px!important;color:var(--m2-soft)!important}
  .m2-step{display:none!important}
  .sectionTitle{padding:13px!important;margin:10px 0!important;border-radius:18px!important}
  .sectionTitle h2{font-size:26px!important;line-height:1!important;margin:0 0 5px!important}
  .sectionTitle p{font-size:13px!important;line-height:1.35!important;margin:0!important}
  .modeTabs,.catTabs{display:flex!important;width:100%!important;overflow-x:auto!important;gap:7px!important;padding:2px 0 9px!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important}
  .modeTabs::-webkit-scrollbar,.catTabs::-webkit-scrollbar,.nav::-webkit-scrollbar{display:none!important}
  .modeBtn,.catTabs button{flex:0 0 auto!important;font-size:12px!important;line-height:1!important;padding:10px 12px!important;min-height:38px!important;scroll-snap-align:start!important}
  #templates.templates{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;padding:0 0 20px!important;margin:0!important}
  #templates.templates>div,.post-card,.panel,.hero,.full-media,.full-info,.comment-form,.comment{border-radius:18px!important;box-shadow:0 16px 48px rgba(0,0,0,.42),0 0 24px rgba(85,247,255,.05)!important}
  #templates.templates img,#templates.templates video,.post-card .media img,.post-card .media video{max-height:none!important;width:100%!important}
  .feed{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  .hero{display:block!important;padding:16px!important;margin-bottom:12px!important}
  .hero h1{font-size:31px!important;line-height:1!important;margin:8px 0!important}
  .hero p{font-size:13px!important;line-height:1.4!important}
  .post-body{padding:13px!important}
  .post-body h2{font-size:22px!important;line-height:1.05!important;margin:8px 0!important}
  .actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  .actions a,.actions button,.actions span{width:100%!important;text-align:center!important;justify-content:center!important;font-size:12px!important;padding:9px 8px!important;min-height:38px!important}
  .actions .remix{grid-column:1/-1!important}
  input,textarea,select,.input{font-size:16px!important;border-radius:14px!important;min-height:44px!important;padding:11px 12px!important}
  textarea{min-height:110px!important}
  .bottomNav{height:auto!important;min-height:72px!important;padding:8px 6px calc(8px + env(safe-area-inset-bottom))!important;gap:4px!important;z-index:999!important}
  .navItem{min-width:0!important;padding:6px 3px!important;border-radius:13px!important}
  .navText{font-size:9px!important;line-height:1.1!important}.navIcon{font-size:16px!important}
  .navCreate{transform:translateY(-6px)!important}
  .m2-social-link{display:block!important;left:12px!important;right:12px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;text-align:center!important;padding:12px!important;font-size:13px!important;z-index:998!important}
  .modal,.modalBackdrop{max-width:100vw!important}.modal{left:8px!important;right:8px!important;width:auto!important;border-radius:18px!important}.modalHead,.modalBody{padding:13px!important}.modalBody{max-height:68vh!important;overflow:auto!important}
  .authTabs{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}.authSocial{grid-template-columns:1fr!important}
  .qr,.promoYandex{display:none!important}
}
@media (max-width: 390px){
  .nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.headerPill{grid-column:1/-1!important}.m2-journey__intro h1{font-size:27px!important}.sectionTitle h2,.hero h1{font-size:26px!important}.actions{grid-template-columns:1fr!important}.brandSub{display:none!important}
}

/* Restore legacy account/profile/admin UI visibility after neon/mobile layer */
#btnTopProfile{display:inline-flex!important;align-items:center!important;justify-content:center!important}
body.profileOnly{padding:12px!important;min-height:100vh!important}
body.profileOnly #profileModal{
  display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;transform:none!important;
  width:min(980px,calc(100vw - 18px))!important;max-width:min(980px,calc(100vw - 18px))!important;min-height:auto!important;max-height:none!important;margin:10px auto calc(20px + env(safe-area-inset-bottom))!important;overflow:visible!important;
}
body.profileOnly #modalBackdrop{display:none!important}
body.profileOnly #profileModal.hidden{display:block!important}
body.profileOnly #profileBlock:not(.hidden),
#profileBlock:not(.hidden){display:block!important;visibility:visible!important;opacity:1!important}
#profileBlock.hidden{display:none!important}
#loginBlock.hidden{display:none!important}
#profileBlock .row{display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important}
#profileBlock .btn,#profileBlock .supportBtn,#adminBtn,#btnCreateIdea,#btnVideoEdit,#btnOpenPlans,#btnPushEnable,#btnProfileChatOpen{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;text-align:center;text-decoration:none!important
}
#adminBtn:not(.hidden){display:inline-flex!important;visibility:visible!important;opacity:1!important;background:linear-gradient(135deg,var(--m2-gold),var(--m2-pink))!important;color:#160713!important;border:none!important;font-weight:1000!important;box-shadow:0 0 24px rgba(255,224,138,.28),0 0 44px rgba(255,79,216,.20)!important}
#btnCreateIdea:not(.hidden){display:inline-flex!important;visibility:visible!important;opacity:1!important}
.profileTop{display:flex!important;align-items:center!important;gap:12px!important}.avatar{width:58px!important;height:58px!important;border-radius:20px!important;object-fit:cover!important;border:1px solid rgba(85,247,255,.28)!important;box-shadow:0 0 22px rgba(85,247,255,.18)!important}.profileName{color:var(--m2-ink)!important;font-weight:1000!important}.profileNick{color:var(--m2-muted)!important}
@media(max-width:700px){
  body.profileOnly{padding:8px!important;padding-bottom:calc(18px + env(safe-area-inset-bottom))!important}
  body.profileOnly #profileModal{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;margin:6px auto calc(14px + env(safe-area-inset-bottom))!important;border-radius:18px!important}
  body.profileOnly #profileModal .modalHead, body.profileOnly #profileModal .modalBody{padding:12px!important}
  #profileBlock .row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  #profileBlock .btn,#profileBlock .supportBtn,#adminBtn,#btnCreateIdea,#btnVideoEdit,#btnOpenPlans,#btnPushEnable,#btnProfileChatOpen{width:100%!important;min-height:44px!important;font-size:14px!important}
  .creditsGrid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important}.creditCard{min-width:0!important}
}

/* Full iPhone/profile/popup correction — UI only, no production logic touched */
#btnTopProfile{display:inline-flex!important;align-items:center!important;justify-content:center!important}
body.profileOnly{background:linear-gradient(180deg,#050610,#070918 60%,#03040b)!important;overflow-x:hidden!important}
body.profileOnly header,body.profileOnly main{display:none!important}
body.profileOnly #profileModal{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;transform:none!important;width:min(980px,calc(100vw - 18px))!important;max-width:min(980px,calc(100vw - 18px))!important;max-height:none!important;margin:10px auto calc(18px + env(safe-area-inset-bottom))!important;overflow:visible!important;border-radius:24px!important}
body.profileOnly #profileModal.hidden{display:block!important}
body.profileOnly #modalBackdrop{display:none!important}
#profileBlock:not(.hidden),body.profileOnly #profileBlock:not(.hidden){display:block!important;visibility:visible!important;opacity:1!important}
#profileBlock.hidden,#loginBlock.hidden{display:none!important}
#profileBlock .row{display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important}.profileTop{display:flex!important;align-items:center!important;gap:12px!important}.avatar{width:58px!important;height:58px!important;border-radius:20px!important;object-fit:cover!important;border:1px solid rgba(85,247,255,.28)!important;box-shadow:0 0 22px rgba(85,247,255,.18)!important}.profileName{color:var(--m2-ink)!important;font-weight:1000!important}.profileNick{color:var(--m2-muted)!important}
#adminBtn:not(.hidden){display:inline-flex!important;visibility:visible!important;opacity:1!important;background:linear-gradient(135deg,var(--m2-gold),var(--m2-pink))!important;color:#160713!important;border:none!important;font-weight:1000!important;box-shadow:0 0 24px rgba(255,224,138,.28),0 0 44px rgba(255,79,216,.20)!important}
#profileBlock .btn,#profileBlock .supportBtn,#adminBtn,#btnCreateIdea,#btnVideoEdit,#btnOpenPlans,#btnPushEnable,#btnProfileChatOpen{align-items:center;justify-content:center;min-height:42px;text-align:center;text-decoration:none!important}
#btnCreateIdea:not(.hidden){display:inline-flex!important;visibility:visible!important;opacity:1!important}
/* External/first-visit popups: constrain on iPhone */
#onesignal-slidedown-container,.onesignal-slidedown-container,.slidedown-container,.onesignal-popover-container,.onesignal-bell-container,.onesignal-customlink-container,
[class*="onesignal"],[id*="onesignal"],.webpush-popover,.installPrompt,.installBanner,.promoPopup,.notificationPopup{
  max-width:calc(100vw - 20px)!important;box-sizing:border-box!important;z-index:2147483000!important
}
#onesignal-slidedown-container,.onesignal-slidedown-container,.slidedown-container,.onesignal-popover-container,.webpush-popover,.installPrompt,.installBanner,.promoPopup,.notificationPopup{
  left:10px!important;right:10px!important;width:auto!important;margin:0 auto!important;border-radius:18px!important;overflow:hidden!important
}
#onesignal-slidedown-container iframe,.onesignal-slidedown-container iframe,[class*="onesignal"] iframe,[id*="onesignal"] iframe{max-width:100%!important;width:100%!important}
.toast,.toastWrap,.notice,.alert,.banner,.popup,.modal{max-width:calc(100vw - 20px)!important;box-sizing:border-box!important}
@media(max-width:700px){
  body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;-webkit-text-size-adjust:100%!important}
  .wrap,main,.mainGrid,#homeSection,#createSection,#historySection,#profileSection{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
  body.profileOnly{padding:8px!important;padding-bottom:calc(14px + env(safe-area-inset-bottom))!important}
  body.profileOnly #profileModal{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;margin:6px auto calc(14px + env(safe-area-inset-bottom))!important;border-radius:18px!important;overflow:hidden!important}
  body.profileOnly #profileModal .modalHead,body.profileOnly #profileModal .modalBody{padding:12px!important;border-radius:16px!important}
  body.profileOnly #profileModal .modalBody{max-height:none!important;overflow:visible!important}
  #profileBlock .row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  #profileBlock .btn,#profileBlock .supportBtn,#adminBtn,#btnCreateIdea,#btnVideoEdit,#btnOpenPlans,#btnPushEnable,#btnProfileChatOpen{display:flex;width:100%!important;min-height:44px!important;font-size:14px!important;margin-left:0!important;margin-right:0!important}
  .creditsGrid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important}.creditCard{min-width:0!important;width:100%!important}
  .modalBackdrop{position:fixed!important;inset:0!important}.modal{left:8px!important;right:8px!important;top:calc(8px + env(safe-area-inset-top))!important;width:auto!important;max-width:calc(100vw - 16px)!important;max-height:calc(100vh - 22px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;overflow:auto!important;border-radius:18px!important;transform:none!important}
  .modalHead,.modalBody{padding:12px!important}.modalBody{max-height:none!important;overflow:visible!important}
  #onesignal-slidedown-container,.onesignal-slidedown-container,.slidedown-container,.onesignal-popover-container,.webpush-popover,.installPrompt,.installBanner,.promoPopup,.notificationPopup{position:fixed!important;left:10px!important;right:10px!important;top:calc(10px + env(safe-area-inset-top))!important;bottom:auto!important;width:auto!important;max-width:calc(100vw - 20px)!important;min-width:0!important;transform:none!important;border-radius:18px!important;box-shadow:0 18px 65px rgba(0,0,0,.55),0 0 28px rgba(85,247,255,.16)!important}
  [class*="onesignal"] button,[id*="onesignal"] button,.installPrompt button,.installBanner button,.promoPopup button,.notificationPopup button{min-height:40px!important;font-size:14px!important;border-radius:12px!important;white-space:normal!important}
  [class*="onesignal"] *,[id*="onesignal"] *{max-width:100%!important;box-sizing:border-box!important}
  .header .nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}.headerPill{grid-column:1/-1!important}#btnTopInstall,#btnTopChat{display:none!important}
}
@media(max-width:390px){body.profileOnly #profileModal{width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important}.creditsGrid{grid-template-columns:1fr!important}.profileTop{align-items:flex-start!important}.modalTitle{font-size:24px!important}}

/* Template selection / preview modal neon fix — covers old white iPhone screen */
#genBackdrop,#lightbox,#historyBackdrop,#buyBackdrop,#pickerBackdrop{background:rgba(2,3,10,.76)!important;backdrop-filter:blur(14px)!important}
#genModal,#lightboxModal,#historyModal,#pickerModal,#buyModal{
  background:linear-gradient(180deg,rgba(13,16,34,.96),rgba(6,8,20,.98))!important;
  color:var(--m2-ink)!important;border:1px solid rgba(85,247,255,.22)!important;border-radius:26px!important;
  box-shadow:0 30px 120px rgba(0,0,0,.72),0 0 70px rgba(85,247,255,.14),0 0 90px rgba(255,79,216,.08)!important;overflow:hidden!important
}
#genModal .modalHead,#lightboxModal .modalHead,#historyModal .modalHead,#pickerModal .modalHead,#buyModal .modalHead{
  background:rgba(5,7,18,.88)!important;border-bottom:1px solid rgba(85,247,255,.18)!important;backdrop-filter:blur(18px)!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;color:var(--m2-ink)!important
}
#genModal .modalHead .row,#lightboxModal .modalHead .row,#historyModal .modalHead .row,#pickerModal .modalHead .row,#buyModal .modalHead .row{display:flex!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
#genModal .modalTitle,#lightboxModal .modalTitle,#historyModal .modalTitle,#pickerModal .modalTitle,#buyModal .modalTitle{
  color:#fff!important;font-weight:1000!important;letter-spacing:-.04em!important;text-shadow:0 0 28px rgba(85,247,255,.22)!important
}
#genModal .modalSub,#lightboxModal .modalSub,#historyModal .modalSub,#pickerModal .modalSub,#buyModal .modalSub{color:var(--m2-muted)!important}
#genModal .modalBody,#lightboxModal .modalBody,#historyModal .modalBody,#pickerModal .modalBody,#buyModal .modalBody{
  background:linear-gradient(180deg,rgba(8,10,24,.96),rgba(4,5,13,.98))!important;color:var(--m2-ink)!important
}
#genModal .tplPreview,#lightboxBody,.tplPreview,.templatePreview,.imageTemplatePreview,.videoTemplatePreview{
  background:rgba(255,255,255,.045)!important;border:1px solid rgba(85,247,255,.16)!important;border-radius:24px!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 18px 60px rgba(0,0,0,.36)!important;overflow:hidden!important
}
#genModal .tplPreview img,#genModal .tplPreview video,#lightboxBody img,#lightboxBody video,.tplPreview img,.tplPreview video{
  display:block!important;max-width:100%!important;height:auto!important;border-radius:22px!important;border:1px solid rgba(151,178,255,.16)!important;background:#050610!important;box-shadow:0 0 38px rgba(85,247,255,.08)!important
}
#genModal .btn,#lightboxModal .btn,#historyModal .btn,#pickerModal .btn,#buyModal .btn,#lightboxDownload,#lightboxClose,#genClose,#genOpenProfile{
  border:1px solid rgba(151,178,255,.22)!important;background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.04))!important;color:#fff!important;border-radius:999px!important;box-shadow:0 10px 30px rgba(0,0,0,.28)!important;text-decoration:none!important
}
#genModal .btn.primary,#lightboxDownload,#genUsePrompt,#btnUsePrompt{
  background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink))!important;color:#06101a!important;border:none!important;font-weight:1000!important;box-shadow:0 0 24px rgba(85,247,255,.28),0 0 46px rgba(255,79,216,.17)!important
}
body.genOnly{background:linear-gradient(180deg,#050610,#070918 55%,#03040b)!important}
body.genOnly header,body.genOnly main{display:none!important}
body.genOnly #genModal{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;transform:none!important;width:min(980px,calc(100vw - 18px))!important;max-width:min(980px,calc(100vw - 18px))!important;margin:10px auto calc(18px + env(safe-area-inset-bottom))!important;max-height:none!important;overflow:visible!important}
body.genOnly #genBackdrop{display:none!important}
@media(max-width:700px){
  #genModal,#lightboxModal,#historyModal,#pickerModal,#buyModal{position:fixed!important;left:8px!important;right:8px!important;top:calc(8px + env(safe-area-inset-top))!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:calc(100vw - 16px)!important;max-height:none!important;border-radius:20px!important;overflow:hidden!important;transform:none!important}
  body.genOnly #genModal{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;margin:6px auto calc(12px + env(safe-area-inset-bottom))!important;border-radius:20px!important}
  #genModal .modalHead,#lightboxModal .modalHead,#historyModal .modalHead,#pickerModal .modalHead,#buyModal .modalHead{padding:10px!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  #genModal .modalHead .row,#lightboxModal .modalHead .row,#historyModal .modalHead .row,#pickerModal .modalHead .row,#buyModal .modalHead .row{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:7px!important}
  #genModal .modalHead .row .btn,#lightboxModal .modalHead .row .btn,#historyModal .modalHead .row .btn,#pickerModal .modalHead .row .btn,#buyModal .modalHead .row .btn{width:100%!important;min-height:42px!important;font-size:13px!important;padding:9px 8px!important;text-align:center!important;justify-content:center!important;white-space:normal!important}
  #genModal .modalTitle,#lightboxModal .modalTitle,#historyModal .modalTitle,#pickerModal .modalTitle,#buyModal .modalTitle{font-size:24px!important;line-height:1.05!important}
  #genModal .modalSub,#lightboxModal .modalSub{font-size:12px!important;line-height:1.25!important}
  #genModal .modalBody,#lightboxModal .modalBody,#historyModal .modalBody,#pickerModal .modalBody,#buyModal .modalBody{height:auto!important;max-height:calc(100vh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px!important}
  body.genOnly #genModal .modalBody{max-height:none!important;overflow:visible!important}
  #genModal .tplPreview,#lightboxBody,.tplPreview{border-radius:20px!important;padding:0!important;margin:0!important;background:rgba(255,255,255,.04)!important}
  #genModal .tplPreview img,#genModal .tplPreview video,#lightboxBody img,#lightboxBody video,.tplPreview img,.tplPreview video{width:100%!important;max-width:100%!important;max-height:none!important;border-radius:18px!important;object-fit:contain!important}
}
@media(max-width:390px){#genModal .modalHead .row,#lightboxModal .modalHead .row{grid-template-columns:1fr!important}#genModal .modalTitle,#lightboxModal .modalTitle{font-size:21px!important}}

/* Header compact + readable history cards */
#btnTopEditor{display:none!important}
.headerInner{padding-top:8px!important;padding-bottom:8px!important}.logo{width:38px!important;height:38px!important;border-radius:14px!important}.brandName{font-size:18px!important}.brandSub{font-size:11px!important;line-height:1.15!important}.headerBtn,.headerPill{min-height:34px!important;padding:7px 10px!important;font-size:12px!important;line-height:1!important}.headerPill{max-width:170px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.nav{gap:6px!important}.m2-journey{padding:16px!important;margin:8px 0 12px!important}.m2-journey__intro h1{font-size:clamp(30px,4.4vw,54px)!important}.m2-journey__intro p{font-size:13px!important}.m2-step{padding:11px!important}.m2-step small{font-size:12px!important}
/* history/gallery generated items */
.glist,.gallery,.historyList,#historyList,#galleryList,#gensList{color:var(--m2-ink)!important}.gcard,.gitem,.galleryItem,.historyItem,#historyList>div,#galleryList>div,#gensList>div{background:linear-gradient(180deg,rgba(17,21,43,.86),rgba(7,9,22,.92))!important;border:1px solid rgba(85,247,255,.18)!important;border-radius:22px!important;box-shadow:0 20px 70px rgba(0,0,0,.48),0 0 34px rgba(85,247,255,.07)!important;color:var(--m2-ink)!important;overflow:hidden!important}.gprompt,.gmeta,.gstatus,.historyPrompt,.historyMeta,.galleryMeta,.galleryPrompt{background:linear-gradient(135deg,rgba(85,247,255,.08),rgba(255,79,216,.055))!important;color:var(--m2-soft)!important;border-top:1px solid rgba(151,178,255,.16)!important;padding:11px 12px!important;line-height:1.42!important;font-size:12px!important;text-shadow:none!important}.gprompt *,.gmeta *,.historyPrompt *,.historyMeta *{color:inherit!important}.gimg,.gvid,.historyItem img,.historyItem video,.galleryItem img,.galleryItem video{background:#050610!important;border:1px solid rgba(85,247,255,.16)!important;border-radius:18px!important;box-shadow:0 0 28px rgba(85,247,255,.08)!important}.gcard a,.gitem a,.historyItem a{color:var(--m2-cyan)!important}.gcard .btn,.gitem .btn,.historyItem .btn{background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.04))!important;color:#fff!important;border:1px solid rgba(151,178,255,.22)!important}
@media(max-width:700px){.headerInner{padding-top:6px!important;padding-bottom:6px!important}.logo{width:32px!important;height:32px!important;min-width:32px!important}.brandName{font-size:16px!important}.brandSub{display:none!important}.nav{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}.headerPill{grid-column:1/-1!important;min-height:28px!important;padding:5px 8px!important;font-size:11px!important;max-width:none!important}.headerBtn,#btnTopBuy{min-height:32px!important;padding:7px 5px!important;font-size:11px!important;border-radius:12px!important}.m2-journey{padding:10px!important;margin:6px 0 8px!important;border-radius:16px!important}.m2-journey__intro h1{font-size:24px!important;line-height:1!important}.m2-journey__intro p{font-size:12px!important;line-height:1.25!important;margin-top:5px!important}.sectionTitle{padding:10px!important;margin:7px 0!important}.sectionTitle h2{font-size:22px!important}.sectionTitle p{font-size:12px!important}.modeTabs,.catTabs{padding-bottom:5px!important}.modeBtn,.catTabs button{min-height:32px!important;padding:8px 9px!important;font-size:11px!important}#templates.templates{gap:9px!important}.bottomNav{min-height:64px!important;padding-top:6px!important}.navIcon{font-size:14px!important}.navText{font-size:9px!important}.gprompt,.gmeta,.gstatus,.historyPrompt,.historyMeta,.galleryMeta,.galleryPrompt{font-size:11px!important;padding:9px 10px!important}.gcard,.gitem,.galleryItem,.historyItem,#historyList>div,#galleryList>div,#gensList>div{border-radius:18px!important}}

/* Welcome + pre-generation info popup hard fix for iPhone */
#welcomeBackdrop,#imgInfoBackdrop{background:rgba(1,3,12,.78)!important;backdrop-filter:blur(14px)!important;z-index:9996!important}
#welcomeModal,#imgInfoModal{
  background:linear-gradient(180deg,rgba(13,16,34,.98),rgba(5,7,18,.99))!important;color:var(--m2-ink)!important;
  border:1px solid rgba(85,247,255,.24)!important;border-radius:24px!important;box-shadow:0 28px 110px rgba(0,0,0,.72),0 0 58px rgba(85,247,255,.14),0 0 80px rgba(255,79,216,.08)!important;
  box-sizing:border-box!important;overflow:hidden!important
}
#welcomeModal .modalHead,#imgInfoModal .modalHead{background:rgba(5,7,18,.92)!important;border-bottom:1px solid rgba(85,247,255,.18)!important;color:#fff!important;text-align:left!important}
#welcomeModal .modalTitle,#imgInfoModal .modalTitle{color:#fff!important;text-align:left!important;font-weight:1000!important;letter-spacing:-.04em!important;text-shadow:0 0 28px rgba(85,247,255,.22)!important}
#welcomeModal .modalSub,#imgInfoModal .modalSub,#welcomeModal .mutedSmall,#imgInfoModal p{color:var(--m2-soft)!important;text-align:left!important;line-height:1.42!important}
#welcomeModal .modalBody,#imgInfoModal .modalBody{background:linear-gradient(180deg,rgba(8,10,24,.96),rgba(4,5,13,.98))!important;color:var(--m2-ink)!important;text-align:left!important}
#welcomeModal .panel,#imgInfoModal .panel{background:linear-gradient(180deg,rgba(17,21,43,.88),rgba(10,12,26,.86))!important;border:1px solid rgba(85,247,255,.18)!important;color:#fff!important}
#welcomeModal .pill,#imgInfoModal .pill{background:rgba(255,255,255,.08)!important;border:1px solid rgba(85,247,255,.20)!important;color:#fff!important;white-space:normal!important}
#welcomeModal #welcomeOk,#imgInfoOk{background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink))!important;color:#06101a!important;border:none!important;font-weight:1000!important;width:100%!important;min-height:44px!important}
#welcomeClose,#imgInfoClose,#imgInfoCancel{background:rgba(255,255,255,.08)!important;color:#fff!important;border:1px solid rgba(151,178,255,.22)!important}
body:has(#welcomeModal:not(.hidden)) .m2-social-link,body:has(#welcomeModal:not(.hidden)) .bottomNav,
body:has(#imgInfoModal[style*="display: block"]) .m2-social-link,body:has(#imgInfoModal[style*="display: block"]) .bottomNav{display:none!important}
@media(max-width:700px){
  #welcomeModal{position:fixed!important;left:12px!important;right:12px!important;top:calc(10px + env(safe-area-inset-top))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;transform:none!important;width:auto!important;max-width:calc(100vw - 24px)!important;max-height:none!important;margin:0!important;border-radius:20px!important;z-index:9997!important}
  #imgInfoModal{position:fixed!important;left:12px!important;right:12px!important;top:calc(10px + env(safe-area-inset-top))!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;transform:none!important;width:auto!important;max-width:calc(100vw - 24px)!important;max-height:none!important;margin:0!important;border-radius:20px!important;z-index:9999!important}
  #welcomeModal .modalHead,#imgInfoModal .modalHead{position:sticky!important;top:0!important;padding:12px!important;display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;align-items:center!important}
  #welcomeModal .modalTitle,#imgInfoModal .modalTitle{font-size:23px!important;line-height:1.05!important;text-align:left!important}
  #welcomeModal .modalSub,#imgInfoModal .modalSub{font-size:12px!important;line-height:1.25!important}
  #welcomeModal .modalBody,#imgInfoModal .modalBody{height:calc(100% - 76px)!important;max-height:none!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important;padding:14px!important;padding-bottom:22px!important}
  #welcomeModal .row,#imgInfoModal .row{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  #welcomeModal .pill,#imgInfoModal .pill{display:block!important;width:100%!important;padding:10px 12px!important;font-size:13px!important}
  #welcomeModal .panel,#imgInfoModal .panel{padding:12px!important;border-radius:18px!important;margin-top:10px!important}
  #welcomeModal p,#imgInfoModal p{font-size:14px!important;line-height:1.42!important;margin:0 0 10px!important}
  #welcomeClose,#imgInfoClose{width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;border-radius:14px!important}
}

/* Final profile overflow + generate page polish */
body.profileOnly,#profileModal,#profileModal *{max-width:100%!important;box-sizing:border-box!important}
body.profileOnly{overflow-x:hidden!important;width:100%!important}
body.profileOnly #profileModal{overflow-x:hidden!important}
#profileBlock,#profileBlock .panel,#profileBlock .row,#profileBlock .creditsGrid,#purchasesList{max-width:100%!important;min-width:0!important;overflow-x:hidden!important}
#profileBlock .row{width:100%!important;margin-left:0!important;margin-right:0!important}
#profileBlock .supportBtn{max-width:100%!important;min-width:0!important;overflow:hidden!important;word-break:break-word!important;white-space:normal!important}
#purchasesList, #purchasesList *{word-break:break-word!important;overflow-wrap:anywhere!important;white-space:normal!important;color:var(--m2-soft)!important}
#purchasesList table{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
.creditCard{min-width:0!important;overflow:hidden!important}.creditNum{font-size:clamp(22px,8vw,38px)!important;line-height:1!important}.creditLabel,.creditSub{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
/* /photo/generate standalone page */
body:has(#genTitle) .header{background:rgba(5,7,18,.78)!important}
body:has(#genTitle) .panelHead h3,#genTitle{color:#fff!important;text-shadow:0 0 28px rgba(85,247,255,.22)!important;font-size:clamp(28px,5vw,44px)!important;line-height:1!important;letter-spacing:-.055em!important}
body:has(#genTitle) .mutedSmall{color:var(--m2-muted)!important}
body:has(#genTitle) .bottomNav{background:rgba(5,7,18,.88)!important}
body:has(#genTitle) input[type=file]{padding:12px!important;color:var(--m2-soft)!important}
body:has(#genTitle) input[type=file]::file-selector-button{border:0;border-radius:999px;background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet));color:#06101a;font-weight:900;padding:8px 12px;margin-right:10px}
@media(max-width:700px){
  body.profileOnly #profileModal{width:calc(100vw - 10px)!important;max-width:calc(100vw - 10px)!important;margin-left:5px!important;margin-right:5px!important}
  body.profileOnly #profileModal .modalBody,body.profileOnly #profileModal .modalHead{width:100%!important;overflow-x:hidden!important}
  .creditsGrid{grid-template-columns:1fr 1fr!important}.creditCard{padding:10px!important}.creditNum{font-size:28px!important}
  #profileBlock .btn,#profileBlock .supportBtn,#adminBtn,#btnCreateIdea,#btnVideoEdit,#btnOpenPlans,#btnPushEnable,#btnProfileChatOpen{max-width:100%!important;width:100%!important}
  body:has(#genTitle) main.wrap{padding:10px 12px 92px!important;max-width:100%!important}
  body:has(#genTitle) .springCard{margin-top:8px!important;padding:16px!important;border-radius:22px!important}
  body:has(#genTitle) .panelHead{display:block!important}body:has(#genTitle) #genTitle{font-size:28px!important;margin-bottom:6px!important}
  body:has(#genTitle) .row{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important;gap:8px!important}
  body:has(#genTitle) #btnCreateGen{width:100%!important;grid-column:1/-1!important;min-height:48px!important}
}

/* Kill broken OneSignal first-visit slidedown on iPhone/all pages */
#onesignal-slidedown-container,#onesignal-slidedown-dialog,#normal-slidedown,.onesignal-slidedown-container,.onesignal-slidedown-dialog,.onesignal-reset.slide-down,.slidedown-footer,#onesignal-slidedown-allow-button,#onesignal-slidedown-cancel-button{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;max-width:0!important;max-height:0!important;overflow:hidden!important;position:absolute!important;left:-99999px!important;top:-99999px!important}

/* Social feed deeper integration: publish from generation history */
.publish-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;margin-top:16px!important}.publish-card{background:linear-gradient(180deg,rgba(17,21,43,.86),rgba(7,9,22,.94))!important;border:1px solid rgba(85,247,255,.18)!important;border-radius:24px!important;overflow:hidden!important;box-shadow:0 22px 70px rgba(0,0,0,.45),0 0 38px rgba(85,247,255,.07)!important}.publish-media img,.publish-media video{display:block!important;width:100%!important;aspect-ratio:1/1!important;object-fit:cover!important;background:#050610!important}.publish-body{padding:14px!important;display:grid!important;gap:10px!important}.publish-body label{display:grid!important;gap:6px!important;color:var(--m2-soft)!important;font-size:12px!important}.publish-body input,.publish-body textarea{width:100%!important;border:1px solid rgba(151,178,255,.20)!important;background:rgba(255,255,255,.075)!important;color:#fff!important;border-radius:16px!important;padding:11px 12px!important;font:inherit!important}.publish-body textarea{min-height:74px!important;resize:vertical!important}.publish-body details{background:rgba(255,255,255,.055)!important;border:1px solid rgba(85,247,255,.14)!important;border-radius:16px!important;padding:10px!important;color:var(--m2-muted)!important}.publish-body summary{cursor:pointer;color:#fff!important;font-weight:900!important}.publish-body .check{display:flex!important;grid-template-columns:none!important;align-items:center!important;gap:8px!important}.publish-body .check input{width:auto!important}.publish-panel h2{color:#fff!important}.publish-card .pub-msg .btn{margin-top:8px!important}
@media(max-width:900px){.publish-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@media(max-width:700px){.publish-grid{grid-template-columns:1fr!important;gap:12px!important}.publish-hero .actions,.hero .actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}.publish-card{border-radius:20px!important}.publish-body{padding:12px!important}.soc-head nav{grid-template-columns:repeat(3,minmax(0,1fr))!important}.soc-head nav a{font-size:12px!important;padding:8px 6px!important}}

/* PROFILE RESCUE FINAL — mobile-first clean account screen */
body.profileOnly{margin:0!important;padding:0!important;width:100%!important;max-width:100%!important;overflow-x:hidden!important;background:#050610!important;color:#f8fbff!important}
body.profileOnly .m2-social-link{display:none!important;visibility:hidden!important;pointer-events:none!important}
body.profileOnly #profileModal{position:relative!important;display:block!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%!important;max-width:760px!important;margin:0 auto!important;min-height:100vh!important;max-height:none!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:linear-gradient(180deg,rgba(10,13,30,.98),rgba(4,6,16,.99))!important;box-shadow:none!important;color:#f8fbff!important}
body.profileOnly #profileModal .modalHead{position:sticky!important;top:0!important;z-index:5!important;background:rgba(5,7,18,.94)!important;border-bottom:1px solid rgba(85,247,255,.18)!important;padding:14px 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important}
body.profileOnly #profileModal .modalTitle{font-size:24px!important;line-height:1.05!important;color:#fff!important;font-weight:1000!important;letter-spacing:-.04em!important}
body.profileOnly #profileModal .modalSub{display:none!important}
body.profileOnly #profileModal .modalBody{width:100%!important;max-width:100%!important;overflow-x:hidden!important;overflow-y:visible!important;padding:14px 14px calc(96px + env(safe-area-inset-bottom))!important;background:transparent!important;color:#f8fbff!important}
body.profileOnly #profileBlock{width:100%!important;max-width:100%!important;overflow:hidden!important;background:linear-gradient(180deg,rgba(17,21,43,.88),rgba(7,9,22,.94))!important;border:1px solid rgba(85,247,255,.18)!important;border-radius:26px!important;padding:16px!important;box-shadow:0 22px 80px rgba(0,0,0,.50),0 0 46px rgba(85,247,255,.08)!important}
body.profileOnly #profileBlock .profileTop{display:grid!important;grid-template-columns:64px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;margin-bottom:16px!important}
body.profileOnly #profileBlock .avatar{width:64px!important;height:64px!important;border-radius:22px!important;background:linear-gradient(135deg,#effcff,#fff4fb)!important;box-shadow:0 0 28px rgba(85,247,255,.18)!important;object-fit:cover!important}
body.profileOnly #profileBlock .profileName{font-size:22px!important;line-height:1.08!important;color:#fff!important;font-weight:1000!important;letter-spacing:-.04em!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.profileOnly #profileBlock .profileNick{display:block!important;color:var(--m2-muted)!important;font-size:12px!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.profileOnly #profileBlock .panelHead{margin:16px 0 8px!important;display:block!important}
body.profileOnly #profileBlock .panelHead h3{font-size:26px!important;line-height:1!important;margin:0 0 4px!important;color:#fff!important;font-weight:1000!important;letter-spacing:-.045em!important}
body.profileOnly #profileBlock .panelHead p{font-size:12px!important;color:var(--m2-muted)!important;margin:0!important}
body.profileOnly #profileBlock>.row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;width:100%!important;max-width:100%!important;margin:8px 0 0!important;align-items:stretch!important;overflow:hidden!important}
body.profileOnly #creditsGrid{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;flex:none!important}
body.profileOnly .creditCard{min-width:0!important;width:100%!important;border-radius:20px!important;padding:12px!important;background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.06))!important;border:1px solid rgba(151,178,255,.20)!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 14px 36px rgba(0,0,0,.28)!important}
body.profileOnly .creditTop{gap:6px!important;color:var(--m2-muted)!important;font-size:12px!important;min-width:0!important}.creditLabel{white-space:nowrap!important}.creditNum{font-size:34px!important;line-height:.95!important;color:#fff!important;font-weight:1000!important;letter-spacing:-.055em!important}.creditSub{font-size:11px!important;color:var(--m2-muted)!important;white-space:nowrap!important}
body.profileOnly #btnOpenPlans{grid-column:1/-1!important;min-height:56px!important;font-size:17px!important;border-radius:999px!important;color:#06101a!important;font-weight:1000!important}
body.profileOnly #btnPushEnable,body.profileOnly #btnCreateIdea,body.profileOnly #adminBtn,body.profileOnly #btnSupportOpen,body.profileOnly #btnPartner,body.profileOnly #btnVideoEdit,body.profileOnly #btnProfileChatOpen{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:50px!important;margin:0!important;border-radius:22px!important;padding:10px 12px!important;font-size:14px!important;line-height:1.12!important;letter-spacing:0!important;text-align:center!important;white-space:normal!important;overflow:hidden!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;text-decoration:none!important;box-sizing:border-box!important}
body.profileOnly #btnCreateIdea.hidden,body.profileOnly #adminBtn.hidden{display:none!important}
body.profileOnly #btnSupportOpen strong,body.profileOnly #btnPartner strong{font-size:13px!important;letter-spacing:.08em!important;line-height:1.15!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.profileOnly #btnPartner{opacity:.55!important;filter:saturate(.75)!important}
body.profileOnly #chatAccessTimer{display:block!important;width:100%!important;max-width:100%!important;padding:12px!important;border-radius:16px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(151,178,255,.14)!important;color:var(--m2-muted)!important;overflow-wrap:anywhere!important}
body.profileOnly #purchasesList{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;max-height:300px!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important;padding:12px!important;border-radius:18px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(85,247,255,.14)!important;color:var(--m2-soft)!important;font-size:12px!important;line-height:1.35!important;box-sizing:border-box!important;white-space:normal!important;overflow-wrap:anywhere!important}
body.profileOnly #purchasesList table{display:table!important;width:max-content!important;min-width:620px!important;max-width:none!important;border-collapse:collapse!important;white-space:nowrap!important;color:var(--m2-soft)!important}
body.profileOnly #purchasesList th,body.profileOnly #purchasesList td{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;padding:8px 10px!important;border-bottom:1px solid rgba(151,178,255,.12)!important;color:var(--m2-soft)!important}
body.profileOnly .bottomNav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:20!important;background:rgba(5,7,18,.96)!important;border-top:1px solid rgba(85,247,255,.14)!important;backdrop-filter:blur(16px)!important}
@media(max-width:700px){
  body.profileOnly #profileModal{width:100vw!important;max-width:100vw!important;margin:0!important;border-radius:0!important}
  body.profileOnly #profileModal .modalHead{padding:10px 12px!important}
  body.profileOnly #profileModal .modalHead .row{display:flex!important;gap:8px!important;justify-content:flex-end!important}
  body.profileOnly #profileModal .modalHead .btn{min-height:36px!important;padding:8px 10px!important;font-size:12px!important;border-radius:14px!important}
  body.profileOnly #profileModal .modalBody{padding:10px 10px calc(92px + env(safe-area-inset-bottom))!important}
  body.profileOnly #profileBlock{border-radius:22px!important;padding:14px!important}
  body.profileOnly #profileBlock .profileTop{grid-template-columns:56px minmax(0,1fr)!important;gap:10px!important}
  body.profileOnly #profileBlock .avatar{width:56px!important;height:56px!important;border-radius:18px!important}
  body.profileOnly #profileBlock .profileName{font-size:18px!important}
  body.profileOnly #profileBlock .panelHead h3{font-size:24px!important}
  body.profileOnly #profileBlock>.row{grid-template-columns:1fr 1fr!important;gap:9px!important}
  body.profileOnly .creditNum{font-size:30px!important}
  body.profileOnly #btnPushEnable,body.profileOnly #btnCreateIdea,body.profileOnly #adminBtn,body.profileOnly #btnSupportOpen,body.profileOnly #btnPartner,body.profileOnly #btnVideoEdit,body.profileOnly #btnProfileChatOpen{min-height:48px!important;font-size:13px!important;border-radius:20px!important;padding:9px 10px!important}
}
@media(max-width:390px){body.profileOnly .creditNum{font-size:26px!important}body.profileOnly #profileBlock>.row{gap:8px!important}body.profileOnly #btnPushEnable,body.profileOnly #btnCreateIdea,body.profileOnly #adminBtn,body.profileOnly #btnSupportOpen,body.profileOnly #btnPartner,body.profileOnly #btnVideoEdit,body.profileOnly #btnProfileChatOpen{font-size:12px!important}}

/* PROFILE HISTORY TEXT/TABLE SAFETY — prevent vertical-letter columns */
body.profileOnly #purchasesList{word-break:normal!important;overflow-wrap:break-word!important;white-space:normal!important;contain:layout paint!important}
body.profileOnly #purchasesList .purchaseRow,body.profileOnly #purchasesList .purchaseItem,body.profileOnly #purchasesList li,body.profileOnly #purchasesList div{max-width:100%!important;min-width:0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important}
body.profileOnly #purchasesList code,body.profileOnly #purchasesList pre{display:block!important;max-width:100%!important;overflow:auto!important;white-space:pre!important;word-break:normal!important;color:var(--m2-soft)!important;background:rgba(0,0,0,.18)!important;border-radius:12px!important;padding:8px!important}
@media(max-width:700px){body.profileOnly #purchasesList{max-height:220px!important;font-size:11px!important}body.profileOnly #purchasesList table{min-width:560px!important}}

/* PROFILE BOTTOM NAV + FAST ACCOUNT SCREEN */
body.profileOnly .bottomNav, body.historyOnly .bottomNav{display:grid!important;visibility:visible!important;opacity:1!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:2147483000!important;min-height:calc(68px + env(safe-area-inset-bottom))!important;padding:7px 10px calc(8px + env(safe-area-inset-bottom))!important;background:rgba(5,7,18,.97)!important;border-top:1px solid rgba(85,247,255,.18)!important;backdrop-filter:blur(18px)!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;box-shadow:0 -18px 60px rgba(0,0,0,.46),0 0 34px rgba(85,247,255,.08)!important}
body.profileOnly .bottomNav .navItem, body.historyOnly .bottomNav .navItem{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;min-width:0!important;min-height:48px!important;border-radius:17px!important;color:var(--m2-muted)!important;text-decoration:none!important;font-size:10px!important}
body.profileOnly .bottomNav .navItem.active, body.historyOnly .bottomNav .navItem.active{background:linear-gradient(135deg,rgba(85,247,255,.20),rgba(255,79,216,.16))!important;color:#fff!important;border:1px solid rgba(85,247,255,.22)!important;box-shadow:0 0 24px rgba(85,247,255,.12)!important}
body.profileOnly .bottomNav .navIcon, body.historyOnly .bottomNav .navIcon{font-size:17px!important;line-height:1!important}body.profileOnly .bottomNav .navText, body.historyOnly .bottomNav .navText{font-size:10px!important;line-height:1!important;font-weight:800!important}
body.profileOnly #profileModal .modalBody, body.historyOnly #historyModal .modalBody{padding-bottom:calc(116px + env(safe-area-inset-bottom))!important}

/* PURCHASES + TEMPLATE CARD FINAL FIX */
body.profileOnly #profileBlock>.row{grid-template-columns:1fr 1fr!important;align-items:start!important}
body.profileOnly #profileBlock .panelHead:has(+ #purchasesList){grid-column:1/-1!important;width:100%!important;margin-top:18px!important;padding:14px!important;border-radius:20px!important;background:linear-gradient(135deg,rgba(85,247,255,.10),rgba(255,79,216,.07))!important;border:1px solid rgba(85,247,255,.16)!important}
body.profileOnly #profileBlock .panelHead:has(+ #purchasesList) h3{font-size:28px!important;margin:0 0 6px!important;line-height:1!important;color:#fff!important}
body.profileOnly #profileBlock .panelHead:has(+ #purchasesList) p{font-size:14px!important;color:var(--m2-muted)!important;line-height:1.25!important}
body.profileOnly #purchasesList{grid-column:1/-1!important;width:100%!important;max-width:100%!important;min-height:76px!important;max-height:260px!important;margin:0!important;padding:12px!important;border-radius:20px!important;background:linear-gradient(180deg,rgba(13,16,34,.96),rgba(5,7,18,.98))!important;border:1px solid rgba(85,247,255,.20)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 12px 44px rgba(0,0,0,.36)!important;overflow:auto!important;-webkit-overflow-scrolling:touch!important;color:#eef6ff!important;font-size:13px!important;line-height:1.35!important;white-space:normal!important;word-break:normal!important;overflow-wrap:break-word!important}
body.profileOnly #purchasesList table{display:table!important;width:100%!important;min-width:520px!important;max-width:none!important;border-collapse:separate!important;border-spacing:0!important;background:transparent!important;color:#eef6ff!important}
body.profileOnly #purchasesList thead,body.profileOnly #purchasesList tbody,body.profileOnly #purchasesList tr{background:transparent!important;color:#eef6ff!important}
body.profileOnly #purchasesList th,body.profileOnly #purchasesList td{padding:10px 12px!important;border-bottom:1px solid rgba(151,178,255,.14)!important;color:#eef6ff!important;background:rgba(255,255,255,.035)!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important;text-align:left!important;min-width:92px!important}
body.profileOnly #purchasesList th{color:#fff!important;font-weight:1000!important;background:rgba(85,247,255,.10)!important}
body.profileOnly #purchasesList tr:last-child td{border-bottom:0!important}
body.profileOnly #purchasesList:empty:before{content:'Пока нет покупок.';color:var(--m2-muted)!important}
body.profileOnly #btnProfileChatOpen{min-height:56px!important}
@media(max-width:700px){
  body.profileOnly #profileBlock .panelHead:has(+ #purchasesList){padding:12px!important;margin-top:14px!important}
  body.profileOnly #profileBlock .panelHead:has(+ #purchasesList) h3{font-size:24px!important}
  body.profileOnly #profileBlock .panelHead:has(+ #purchasesList) p{font-size:12px!important}
  body.profileOnly #purchasesList{max-height:210px!important;padding:10px!important;font-size:12px!important}
  body.profileOnly #purchasesList table{min-width:500px!important}
  body.profileOnly #purchasesList th,body.profileOnly #purchasesList td{padding:8px 9px!important;min-width:82px!important;font-size:12px!important}
}
/* home template cards: fit one card better on iPhone */
@media(max-width:700px){
  #templates.templates{padding-left:10px!important;padding-right:10px!important;gap:10px!important}
  #templates.templates>div,.templateCard,.tcard{border-radius:20px!important;overflow:hidden!important}
  #templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(54vh,430px)!important;max-height:430px!important;min-height:280px!important;width:100%!important;object-fit:contain!important;background:#050610!important}
  #templates.templates .tbody,#templates.templates .templateBody,.templateCard .templateBody{padding:10px 12px!important}
  #templates.templates .ttitle,#templates.templates h3,#templates.templates h2{font-size:16px!important;line-height:1.08!important;margin:0 0 4px!important}
  #templates.templates .tsub,#templates.templates p{font-size:12px!important;line-height:1.22!important;margin:0!important}
  .m2-social-link{left:16px!important;right:16px!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;width:auto!important;padding:11px 14px!important;min-height:46px!important;font-size:15px!important;border-radius:22px!important;text-align:center!important;display:flex!important;justify-content:center!important;align-items:center!important}
}
@media(max-width:390px){#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(50vh,390px)!important;max-height:390px!important;min-height:240px!important}.m2-social-link{font-size:14px!important;min-height:42px!important;padding:9px 12px!important}}

/* PROFILE PURCHASES MOBILE STACK — no side-by-side chat/history */
@media(max-width:700px){
  body.profileOnly #profileBlock>.row{grid-template-columns:1fr!important;gap:10px!important}
  body.profileOnly #creditsGrid{grid-template-columns:1fr 1fr!important}
  body.profileOnly #btnOpenPlans,body.profileOnly #btnPushEnable,body.profileOnly #btnCreateIdea,body.profileOnly #adminBtn,body.profileOnly #btnSupportOpen,body.profileOnly #btnPartner,body.profileOnly #btnVideoEdit,body.profileOnly #chatAccessTimer,body.profileOnly #btnProfileChatOpen,body.profileOnly #purchasesList,body.profileOnly #profileBlock .panelHead{grid-column:1/-1!important;width:100%!important}
}

/* FINAL USER SCREEN FIXES: no floating feed, neon cards, readable purchases, social bottom nav */
.m2-social-link{display:none!important;visibility:hidden!important;pointer-events:none!important}
/* Template cards: smaller, no white/black gutters, animated thin neon border */
#templates.templates>div,.templateCard,.tcard{position:relative!important;background:linear-gradient(180deg,rgba(15,18,38,.94),rgba(7,9,22,.98))!important;border:1px solid transparent!important;background-clip:padding-box!important;box-shadow:0 18px 54px rgba(0,0,0,.48),0 0 36px rgba(85,247,255,.08)!important;overflow:hidden!important}
#templates.templates>div:before,.templateCard:before,.tcard:before{content:""!important;position:absolute!important;inset:0!important;padding:1.2px!important;border-radius:inherit!important;background:linear-gradient(120deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink),var(--m2-gold),var(--m2-cyan))!important;background-size:280% 280%!important;animation:m2BorderFlow 5s linear infinite!important;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0)!important;-webkit-mask-composite:xor!important;mask-composite:exclude!important;pointer-events:none!important;z-index:2!important}
@keyframes m2BorderFlow{0%{background-position:0% 50%}100%{background-position:280% 50%}}
#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{background:radial-gradient(circle at 50% 38%,rgba(85,247,255,.10),rgba(255,79,216,.045) 42%,rgba(5,6,16,.96) 74%)!important;border:0!important;box-shadow:none!important}
#templates.templates .tbody,#templates.templates .templateBody,.templateCard .templateBody{background:linear-gradient(180deg,rgba(15,18,38,.86),rgba(7,9,22,.96))!important;color:#f8fbff!important}
@media(max-width:700px){#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(48vh,380px)!important;max-height:380px!important;min-height:230px!important;object-fit:contain!important;padding:0!important}#templates.templates>div,.templateCard,.tcard{border-radius:22px!important}#templates.templates .tbody,#templates.templates .templateBody,.templateCard .templateBody{padding:9px 11px!important}.sectionTitle{margin-bottom:6px!important}.modeTabs,.catTabs{margin-bottom:6px!important}}
@media(max-width:390px){#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(46vh,350px)!important;max-height:350px!important;min-height:210px!important}}
/* Purchases: remove glow washout, force readable text */
body.profileOnly #purchasesList{background:#070b1a!important;background-image:linear-gradient(180deg,rgba(10,14,30,.98),rgba(5,8,18,.99))!important;border:1px solid rgba(85,247,255,.24)!important;color:#f6fbff!important;text-shadow:none!important;box-shadow:0 10px 34px rgba(0,0,0,.42)!important;filter:none!important;opacity:1!important}
body.profileOnly #purchasesList,body.profileOnly #purchasesList *{color:#f6fbff!important;text-shadow:none!important;filter:none!important;opacity:1!important}
body.profileOnly #purchasesList .muted,body.profileOnly #purchasesList .mutedSmall,body.profileOnly #purchasesList small{color:#b9c8ee!important}
body.profileOnly #purchasesList table{background:#070b1a!important;color:#f6fbff!important}
body.profileOnly #purchasesList th{background:#111936!important;color:#ffffff!important;border-bottom:1px solid rgba(85,247,255,.24)!important}
body.profileOnly #purchasesList td{background:#0b1024!important;color:#eef6ff!important;border-bottom:1px solid rgba(151,178,255,.16)!important}
body.profileOnly #purchasesList tr:nth-child(even) td{background:#0e1430!important}
/* Social pages bottom nav */
body:has(.socialBottomNav){padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
.socialBottomNav{display:grid!important;visibility:visible!important;opacity:1!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:2147483000!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;min-height:calc(68px + env(safe-area-inset-bottom))!important;padding:7px 10px calc(8px + env(safe-area-inset-bottom))!important;background:rgba(5,7,18,.97)!important;border-top:1px solid rgba(85,247,255,.18)!important;backdrop-filter:blur(18px)!important;box-shadow:0 -18px 60px rgba(0,0,0,.46),0 0 34px rgba(85,247,255,.08)!important}
.socialBottomNav .navItem{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;min-width:0!important;min-height:48px!important;border-radius:17px!important;color:var(--m2-muted)!important;text-decoration:none!important}.socialBottomNav .navItem.active{background:linear-gradient(135deg,rgba(85,247,255,.20),rgba(255,79,216,.16))!important;color:#fff!important;border:1px solid rgba(85,247,255,.22)!important}.socialBottomNav .navIcon{font-size:17px!important}.socialBottomNav .navText{font-size:10px!important;font-weight:800!important}
/* Feed page: no duplicate hero action stack */
.feed .hero .actions{display:none!important}

/* Social pages: top header brand only, navigation lives at bottom */
.soc-head-min{justify-content:center!important;padding:14px 18px!important}.soc-head-min .brand{font-size:18px!important;font-weight:1000!important;letter-spacing:-.035em!important}.soc-head-min nav{display:none!important}
@media(max-width:700px){.soc-head-min{padding:11px 12px!important}.soc-head-min .brand{font-size:16px!important}}

/* Social bottom nav has 4 working actions */
.socialBottomNav{grid-template-columns:repeat(4,minmax(0,1fr))!important}.socialBottomNav .navText{font-size:9px!important}.socialBottomNav .navIcon{font-size:16px!important}

/* FINAL TEMPLATE CLICK VIEWER FIX — old mobile white preview bar */
#lightboxModal,#lightboxModal *{box-sizing:border-box!important}
#lightboxModal{background:linear-gradient(180deg,rgba(8,11,26,.98),rgba(3,5,13,.99))!important;color:#f8fbff!important;border:0!important}
#lightboxModal .modalHead{background:rgba(5,7,18,.97)!important;border-bottom:1px solid rgba(85,247,255,.20)!important;box-shadow:0 14px 38px rgba(0,0,0,.34)!important;color:#fff!important}
#lightboxModal .modalHead:before{content:''!important;position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:1px!important;background:linear-gradient(90deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink),var(--m2-gold))!important;opacity:.9!important}
#lightboxModal .modalHead .modalTitle,#lightboxModal .modalHead div,#lightboxModal .modalHead span{color:#fff!important;text-shadow:none!important}
#lightboxModal .modalHead .row,#lightboxModal .modalHead nav,#lightboxModal .modalHead .actions{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
#lightboxModal .modalHead button,#lightboxModal .modalHead a,#lightboxModal [role='button']{background:rgba(255,255,255,.075)!important;color:#fff!important;border:1px solid rgba(151,178,255,.24)!important;border-radius:15px!important;box-shadow:0 10px 28px rgba(0,0,0,.30)!important;font-weight:900!important;text-decoration:none!important;white-space:normal!important;text-align:center!important}
#lightboxModal #lightboxDownload,#lightboxModal .primary{background:linear-gradient(135deg,var(--m2-cyan),var(--m2-violet),var(--m2-pink))!important;color:#06101a!important;border:0!important}
#lightboxBody,#lightboxModal .modalBody{background:linear-gradient(180deg,rgba(8,11,26,.96),rgba(3,5,13,.99))!important;border:0!important;color:#f8fbff!important}
#lightboxBody img,#lightboxBody video{background:radial-gradient(circle at 50% 38%,rgba(85,247,255,.10),rgba(255,79,216,.045) 42%,rgba(5,6,16,.96) 74%)!important;border:1px solid rgba(85,247,255,.18)!important;border-radius:22px!important;box-shadow:0 16px 46px rgba(0,0,0,.42),0 0 36px rgba(85,247,255,.08)!important}
@media(max-width:700px){
  #lightboxModal{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:0!important;width:100vw!important;max-width:100vw!important;max-height:none!important;margin:0!important;border-radius:0!important;transform:none!important;overflow:hidden!important}
  #lightboxModal .modalHead{position:sticky!important;top:0!important;z-index:20!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;padding:calc(10px + env(safe-area-inset-top)) 10px 10px!important;overflow-x:auto!important;white-space:nowrap!important}
  #lightboxModal .modalTitle{font-size:15px!important;min-width:max-content!important;margin:0!important;line-height:1!important}
  #lightboxModal .modalSub{display:none!important}
  #lightboxModal .modalHead .row{min-width:max-content!important;display:flex!important;grid-template-columns:none!important;width:auto!important;gap:8px!important}
  #lightboxModal .modalHead button,#lightboxModal .modalHead a{flex:0 0 auto!important;min-height:40px!important;max-width:150px!important;padding:9px 12px!important;font-size:13px!important;line-height:1.08!important}
  #lightboxModal .modalBody{height:calc(100vh - 66px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;max-height:none!important;overflow:auto!important;padding:12px!important}
  #lightboxBody{display:flex!important;align-items:flex-start!important;justify-content:center!important;width:100%!important;padding:0!important}
  #lightboxBody img,#lightboxBody video{width:100%!important;max-width:100%!important;height:auto!important;object-fit:contain!important}
}

/* HOME TEMPLATE CARD RGB FINAL — no white title plate */
#templates.templates>div,.tcard,.templateCard{background:linear-gradient(180deg,rgba(12,15,34,.96),rgba(5,7,18,.99))!important;border:0!important;border-radius:24px!important;isolation:isolate!important;box-shadow:0 18px 58px rgba(0,0,0,.52),0 0 34px rgba(85,247,255,.10),0 0 54px rgba(255,79,216,.06)!important}
#templates.templates>div:before,.tcard:before,.templateCard:before{padding:1.5px!important;background:linear-gradient(90deg,#55f7ff,#2cff88,#ffe08a,#ff4fd8,#8b5cff,#55f7ff)!important;background-size:360% 360%!important;animation:m2RGBPulse 2.6s linear infinite!important;opacity:1!important;filter:drop-shadow(0 0 8px rgba(85,247,255,.50)) drop-shadow(0 0 10px rgba(255,79,216,.35))!important}
#templates.templates>div:after,.tcard:after,.templateCard:after{content:""!important;position:absolute!important;inset:1px!important;border-radius:23px!important;pointer-events:none!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.045),inset 0 0 34px rgba(85,247,255,.05)!important;z-index:1!important}
@keyframes m2RGBPulse{0%{background-position:0% 50%;filter:drop-shadow(0 0 7px rgba(85,247,255,.45))}50%{background-position:180% 50%;filter:drop-shadow(0 0 10px rgba(255,79,216,.52))}100%{background-position:360% 50%;filter:drop-shadow(0 0 7px rgba(85,247,255,.45))}}
#templates.templates .tbody,#templates.templates .templateBody,.tcard .tbody,.templateCard .templateBody,#templates.templates>div>div:last-child{background:linear-gradient(180deg,rgba(10,13,30,.90),rgba(6,8,20,.98))!important;border-top:1px solid rgba(85,247,255,.12)!important;color:#f8fbff!important;box-shadow:none!important}
#templates.templates .ttitle,#templates.templates h2,#templates.templates h3,.tcard .ttitle,.templateCard h3{color:#f8fbff!important;text-shadow:0 0 18px rgba(85,247,255,.12)!important}
#templates.templates .tsub,#templates.templates p,.tcard .tsub,.templateCard p{color:#aebbe3!important;background:transparent!important}
@media(max-width:700px){#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(44vh,340px)!important;max-height:340px!important;min-height:200px!important;background:radial-gradient(circle at 50% 40%,rgba(85,247,255,.08),rgba(255,79,216,.04) 40%,rgba(5,6,16,.96) 72%)!important}#templates.templates>div,.tcard,.templateCard{border-radius:22px!important}}
@media(max-width:390px){#templates.templates .timg,#templates.templates img.timg,#templates.templates video.timg,#templates.templates>div>img,#templates.templates>div>video,.templateCard img,.templateCard video{height:min(42vh,315px)!important;max-height:315px!important;min-height:190px!important}}
