/* Popovers need an opaque base: workspace --surf is deliberately translucent. */
body:not(.mj-home) #pop {
 background:radial-gradient(ellipse at 12% 0,#fff9,transparent 65%),#fff5f4!important;
 border-radius:20px;isolation:isolate;overflow:hidden;
 box-shadow:inset 0 1px 1px #ffffff65,0 16px 48px #10082040;
 backdrop-filter:blur(28px) saturate(150%);-webkit-backdrop-filter:blur(28px) saturate(150%);
}
.mj-dark body:not(.mj-home) #pop {
 background:radial-gradient(ellipse at 10% 15%,#8a407645,transparent 68%),linear-gradient(145deg,#282039,#12101e)!important;
}
[data-mj-cyber] body:not(.mj-home) #pop {
 background:radial-gradient(ellipse at 0 35%,#be38864d,transparent 65%),radial-gradient(ellipse at 100% 0,#4e46963d,transparent 70%),#151222!important;
 border-color:#baa9d17d;
}
/* Approved MOJENA mark across routes and themes. */
.hd .logo .mj-brand-mark,.mj-footer .mj-brand-mark {
 background:url(cyber-mark-approved.png) center/contain no-repeat!important;
 filter:contrast(1.6);mix-blend-mode:screen;flex-shrink:0;
}
.hd .logo .mj-brand-mark img,.mj-footer .mj-brand-mark img{visibility:hidden}
/* Shared Cyber glass. Hero navigation and the editor timeline keep their geometry. */
:root[data-mj-cyber]{
 --cyber-glass:radial-gradient(ellipse at 35% -55%,#e8ddff4a,transparent 65%),linear-gradient(150deg,#292333bd,#0d0c17e8 58%,#20182fce);
 --cyber-rim:#baa9d17d;
 --cyber-shadow:inset 0 1px 2px #f4e8ff70,inset 0 -1px 2px #c6a7ef30,0 8px 25px #02010750;
 --surf:#151222dc;--studio-control:#171322bb;--studio-active:#67508050;
 --studio-rim:#baa9d166;--studio-shadow:var(--cyber-shadow);
 --xp-panel:var(--cyber-glass);--xp-field:#181322bd;--xp-button:var(--cyber-glass);--xp-shadow:var(--cyber-shadow);
}
[data-mj-cyber] body:not(.mj-home){background:linear-gradient(#09081166,#09081188),url(cyber-liquid-background.jpg) center/cover fixed!important}
[data-mj-cyber] body:not(.mj-home) #main{background:transparent!important}
[data-mj-cyber] .mj-page{background:transparent!important}
[data-mj-cyber] :is(.mj-page .glass,.xp-news-card,.mjc .g,.mjc-new,.panel,.card,.profile-card){
 background:var(--cyber-glass)!important;border:1px solid var(--cyber-rim)!important;
 box-shadow:var(--cyber-shadow)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
[data-mj-cyber] :is(.b,.ib,.mj-primary,.mj-outline,.mj-button,.xp-news-card button,.xp-news-head button,.xp-news-filters button,.mjc .seg button[aria-pressed=true]){
 background:var(--cyber-glass)!important;border:1px solid var(--cyber-rim)!important;
 box-shadow:var(--cyber-shadow)!important;color:#f7f0ff;
}
[data-mj-cyber] :is(.b,.ib,.mj-primary,.mj-outline,.xp-news-card button):hover{border-color:#ddbbf5!important;filter:brightness(1.12)}
[data-mj-cyber] button:focus-visible,[data-mj-cyber] a:focus-visible{outline:2px solid #e1a3fb;outline-offset:3px}
[data-mj-cyber] .mj-benefit-icon{
 width:48px;height:48px;flex:none;display:grid;place-items:center;border-radius:14px;
 background:radial-gradient(ellipse at 20% 0,#54dfff28,transparent 70%),var(--cyber-glass);
 border:1px solid var(--cyber-rim);box-shadow:var(--cyber-shadow);color:#ecadff;
}
[data-mj-cyber] .mj-benefit-icon svg{width:25px;height:25px;filter:drop-shadow(0 0 5px #dd77ff88);stroke-width:1.6}
[data-mj-cyber] .cyber-rail a{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#ccc0eb16,#1a122b08);border:1px solid #b09bc82b;box-shadow:inset 0 1px 0 #e3d7ff20}
[data-mj-cyber] .cyber-rail a svg{width:23px;height:23px;stroke-width:1.6;filter:drop-shadow(0 0 4px #d79cff55)}
[data-mj-cyber] .cyber-rail a[aria-current]{background:linear-gradient(135deg,#ed52ba28,#24153888);border-color:#ee7ccd77}
/* A single coordinate system keeps the image, video and frame aligned on resize. */
.mj-page:has(.mj-frame-hero){max-width:none}
.mj-home .mj-frame-hero{
 display:grid!important;grid-template-columns:minmax(300px,30%) minmax(0,1fr);align-items:center;
 gap:20px;min-height:min(920px,100svh);padding:130px clamp(22px,3vw,70px) 36px!important;
}
.mj-home .mj-frame-hero .mj-hero-content{width:100%;max-width:480px}
.mj-home .mj-frame-hero h1{font-size:clamp(36px,3.3vw,66px)}
.mj-home .mj-frame-hero .mj-create{max-width:none}
.mj-frame-stage{position:relative;width:100%;aspect-ratio:3/2;isolation:isolate;min-width:0}
.mj-home .mj-frame-stage :is(.mj-hero-art,.mj-hero-slot){
 position:absolute!important;inset:0!important;top:0!important;left:0!important;
 width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
 aspect-ratio:3/2;transform:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
.mj-home .mj-frame-stage .mj-hero-art{background-size:100% 100%!important;background-position:center!important;mask-image:none!important;-webkit-mask-image:none!important;z-index:0}
.mj-frame-stage .mj-hero-art:after{display:none}
.mj-home .mj-frame-stage .mj-hero-slot{z-index:1;pointer-events:none}
.mj-frame-stage .mj-frame-contents{
 position:absolute;left:41.25%;top:16.25%;width:53.75%;height:58.75%;overflow:hidden;
 clip-path:polygon(0 17.82%,100% 0,100% 100%,0 94.15%);background:#100c14;
}
.mj-frame-stage .mj-frame-contents :is(img,video){width:100%;height:100%;object-fit:cover}
.mj-home .mj-frame-stage .mj-hero-view{position:absolute!important;inset:auto 5% 3% auto!important;z-index:3;max-width:90%}
.mj-mobile-play{display:none;position:absolute;left:55%;top:48%;z-index:4;pointer-events:auto;padding:10px 14px;border-radius:20px;background:#161020dd;color:#fff;border:1px solid #dac3ed}
.needs-play .mj-mobile-play{display:block}
.mj-about{max-width:900px;margin:40px auto;padding:24px;color:var(--mj-ink);line-height:1.65}
.mj-about h2{font-size:24px}.mj-about p{color:var(--mj-muted)}
@media(max-width:1100px){
 .mj-home .mj-frame-hero{display:flex!important;flex-direction:column;align-items:stretch;padding-top:150px!important;gap:0}
 .mj-home .mj-frame-hero .mj-hero-content{display:contents;max-width:none}
 .mj-frame-hero .mj-eyebrow{order:0}.mj-frame-hero h1{order:1}.mj-frame-hero .mj-hero-sub{order:2}
 .mj-frame-stage{order:3}.mj-frame-hero .mj-modes{order:4;margin-top:18px;width:100%}
 .mj-frame-hero .mj-create{order:5;width:100%;max-width:760px!important;align-self:center}
 .mj-home .mj-frame-hero h1{max-width:none;font-size:clamp(36px,5vw,56px)}
}
@media(max-width:767.999px){
 .mj-home .mj-frame-hero{padding:150px 18px 28px!important;min-height:0}
 .mj-home .mj-frame-stage .mj-hero-view{font-size:12px;padding:8px 12px}
 [data-mj-cyber] body:not(.mj-home){background-attachment:scroll!important;min-height:100svh}
}

.cyber-avatar .cyber-video-source{position:absolute;width:1px;height:1px;opacity:.001;pointer-events:none;left:50%;top:50%;}

body:not(.mj-home) .hd .logo .mj-brand-mark{width:52px;height:44px}
body:not(.mj-home) .hd .logo{gap:6px;letter-spacing:.08em}
:root[data-mj-cyber] #mj-splash canvas{visibility:hidden}
:root[data-mj-cyber] #mj-splash{background:#090811 url(mojena-mark-clear.svg) center/min(48vw,260px) auto no-repeat!important}
@media(max-width:767.999px){body:not(.mj-home) .hd .logo .mj-brand-mark{width:38px;height:36px}}

.mj-hero-full{position:absolute;left:5%;bottom:3%;z-index:3;padding:10px 14px;color:var(--mj-ink);font-size:13px;cursor:pointer}
#dlg.mj-preview-fullscreen{width:calc(100vw - 24px)!important;max-width:none!important;height:calc(100dvh - 24px)!important;max-height:none!important;padding:0;}
#dlg.mj-preview-fullscreen .dh{height:60px;box-sizing:border-box}
#dlg.mj-preview-fullscreen .mj-full-preview{height:calc(100% - 60px);padding:0;background:#08070d;display:grid;place-items:center}
.mj-full-preview :is(video,img){width:100%;height:100%;max-height:100%;object-fit:contain}
@media(max-width:767.999px){.mj-hero-full{font-size:11px;padding:8px 10px}}
[data-mj-cyber] :is(.mjp-glass,.mjp-card,.mjp-feature,.mjp-model,.pricing-panel,.pricing-level,.gal,.profile-panel){background:var(--cyber-glass)!important;border-color:var(--cyber-rim)!important;box-shadow:var(--cyber-shadow)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
[data-mj-cyber] :is(.btn,.mjp-button,.mjp-presets button,.xp-news-filter){background:var(--cyber-glass)!important;border:1px solid var(--cyber-rim)!important;box-shadow:var(--cyber-shadow)!important;color:#f7f0ff!important}
[data-mj-cyber] .mj-plans{background:transparent!important}

.cyber-video-retry{position:absolute;left:50%;top:55%;transform:translateX(-50%);z-index:5;pointer-events:auto;border:1px solid #d2b7ed;border-radius:24px;padding:12px 20px;background:#15101de8;color:#fff;cursor:pointer}
.cyber-video-retry[hidden]{display:none}

/* Preserve the approved mark, with alpha derived from its magenta ink. */
.hd .logo .mj-brand-mark,.mj-footer .mj-brand-mark,
[data-mj-cyber] .mj-home .hd .logo .mj-brand-mark{
 background-image:url(mojena-mark-clear.svg)!important;
 filter:drop-shadow(0 0 3px #ea2bdc40)!important;mix-blend-mode:normal!important;
}
/* The framed scene fills the first viewport. Form and title sit above the scenery. */
@media(min-width:1100.001px){
 .mj-home .mj-frame-hero{
  display:block!important;isolation:isolate;width:100%;min-height:900px;height:max(900px,100svh);
  padding:160px clamp(28px,3vw,96px) 45px!important;
  background:var(--mj-bg) var(--mj-hero) center/cover no-repeat;
 }
 .mj-home .mj-frame-hero .mj-hero-content{position:relative;z-index:3;width:30%;max-width:560px;min-width:340px}
 .mj-home .mj-frame-hero h1{font-size:clamp(36px,3vw,68px)}
 .mj-home .mj-frame-stage{
  position:absolute;z-index:0;left:50%;top:50%;width:min(100%,240svh);min-width:150svh;
  aspect-ratio:3/2;height:auto;transform:translate(-50%,-45%);
 }
 .mj-home .mj-frame-hero::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(90deg,var(--mj-bg) 0%,color-mix(in srgb,var(--mj-bg) 85%,transparent) 24%,transparent 45%),linear-gradient(0deg,var(--mj-bg),transparent 12%);
 }
 .mj-home .mj-frame-stage .mj-hero-art{background-size:100% 100%!important}
 .mj-home .mj-frame-stage .mj-hero-view,.mj-home .mj-frame-stage .mj-hero-full{display:none}
 .mj-home .mj-frame-hero>.mj-frame-actions{position:absolute;bottom:28px;right:3%;z-index:4;display:flex;gap:12px}
}
.mj-frame-actions{display:none}
@media(min-width:2000px){
 .mj-home .mj-frame-hero{padding-top:max(160px,14svh)!important}
 .mj-home .mj-frame-hero .mj-hero-content{width:29%;max-width:650px}
 .mj-home .mj-frame-hero .mj-create{font-size:14px;padding:22px!important;gap:14px}
 .mj-home .mj-frame-hero :is(label,select,textarea){font-size:14px}
}

.mj-frame-actions button{padding:12px 20px;cursor:pointer;color:var(--mj-ink)}
/* Theme-specific glass marks, restored for every route. */
:root:not([data-mj-cyber]) .hd .logo .mj-brand-mark,
:root:not([data-mj-cyber]) .mj-footer .mj-brand-mark{background:none!important;filter:none!important;mix-blend-mode:normal!important}
:root:not([data-mj-cyber]) .hd .logo .mj-brand-mark img,
:root:not([data-mj-cyber]) .mj-footer .mj-brand-mark img{visibility:visible!important}
:root:not([data-mj-cyber]) .mj-brand-mark .mj-mark-light{display:block}
:root:not([data-mj-cyber]) .mj-brand-mark .mj-mark-dark{display:none}
:root.mj-dark:not([data-mj-cyber]) .mj-brand-mark .mj-mark-light{display:none}
:root.mj-dark:not([data-mj-cyber]) .mj-brand-mark .mj-mark-dark{display:block}
/* One rounded, perspective-correct surface for photo, poster and video. */
.mj-frame-stage .mj-frame-contents{
 clip-path:none!important;transform-origin:0 0;border-radius:clamp(5px,1vw,17px);
 overflow:hidden;backface-visibility:hidden;isolation:isolate;
 background:#100c14;box-shadow:inset 0 0 0 1px #ffffff26;
}
.mj-frame-stage .mj-frame-contents :is(img,video){position:absolute;inset:0;display:block;object-fit:cover;border-radius:inherit}
.mj-frame-stage .mj-hero-art{mask-image:linear-gradient(90deg,transparent,#000 12%,#000 97%,transparent)!important;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 97%,transparent)!important}
.mj-frame-mobile-start{display:none}
@media(max-width:1100px) and (min-width:768px){
 .mj-frame-stage{width:calc(100% + 44px);margin-inline:-22px;mask-image:linear-gradient(180deg,transparent,#000 10%,#000 88%,transparent)}
}
@media(max-width:767.999px){
 .mj-home .mj-frame-hero .mj-modes,.mj-home .mj-frame-hero .mj-create{display:none!important}
 .mj-home .mj-frame-hero{overflow:hidden;padding-bottom:28px!important}
 .mj-home .mj-frame-hero .mj-hero-sub{margin-bottom:0}
 .mj-home .mj-frame-stage{
  width:calc(100% + 36px);margin:0 -18px;aspect-ratio:auto;
  height:clamp(300px,90vw,460px);overflow:hidden;
  mask-image:linear-gradient(180deg,transparent,#000 13%,#000 84%,transparent);
  -webkit-mask-image:linear-gradient(180deg,transparent,#000 13%,#000 84%,transparent);
 }
 .mj-home .mj-frame-stage :is(.mj-hero-art,.mj-hero-slot){
  left:-17%!important;top:0!important;right:auto!important;bottom:auto!important;
  width:135%!important;height:auto!important;aspect-ratio:3/2;
 }
 .mj-home .mj-frame-stage .mj-hero-art{mask-image:none!important;-webkit-mask-image:none!important}
 .mj-home .mj-frame-stage :is(.mj-hero-view,.mj-hero-full){display:none!important}
 .mj-home .mj-frame-hero>.mj-frame-actions{order:4;display:flex;justify-content:flex-end;margin-top:-6px;position:relative;z-index:3}
 .mj-frame-actions [data-mj-hero-full]{display:none}
 .mj-frame-actions button{padding:10px 16px;font-size:12px}
 .mj-home .mj-frame-mobile-start{order:5;display:flex;align-items:center;justify-content:center;align-self:center;margin-top:20px;padding:13px 24px;width:auto;min-width:190px;text-decoration:none}
}
/* Readable account text when Cyber glass is used, including Telegram settings. */
:is([data-mj-cyber],.mj-dark) .profile-page{--text:#f5f1e9;--t2:#cbc6d3;color:#f5f1e9!important}
:is([data-mj-cyber],.mj-dark) .profile-page :is(h1,h2,h3,h4,legend,label,strong){color:#f5f1e9!important}
:is([data-mj-cyber],.mj-dark) .profile-page :is(p,small,.profile-small,.profile-subtitle){color:#cbc6d3!important}
:is([data-mj-cyber],.mj-dark) .profile-page :is(.btn,.mjt-acts button,.mjt-acts a){color:#fff6e9!important}
:is([data-mj-cyber],.mj-dark) .profile-page :is(input,textarea,select){color:#f5f1e9;caret-color:#fff6e9}
