/* Individual memorial pages only. Native MVC forms and data remain in use. */
body.memoryz-memorial-page{min-width:0!important;width:100%;max-width:100%;}
body.memoryz-memorial-page #page,body.memoryz-memorial-page main{min-width:0;width:100%;max-width:100%;}
body.memoryz-memorial-page main *,body.memoryz-memorial-page main *::before,body.memoryz-memorial-page main *::after{box-sizing:border-box;}
body.memoryz-memorial-page main section>.container{width:calc(100% - 40px);max-width:1200px;min-width:0;margin-left:auto;margin-right:auto;}
body.memoryz-memorial-page #mvc-background :is(img,video){width:100%;height:100%;min-width:0;object-fit:cover;}
body.memoryz-memorial-page :is(#mvc-introduction,#mvc-obituary,#mvc-memories-long,#mvc-video){font-size:18px;line-height:1.75;color:#29272b;}
body.memoryz-memorial-page :is(#mvc-introduction,#mvc-obituary,#mvc-memories-long,#mvc-video) p{font-size:18px;line-height:1.75;color:#29272b;text-align:left;}
body.memoryz-memorial-page #mvc-introduction .introduction{font-size:18px;line-height:1.75;text-align:left;}
body.memoryz-memorial-page #mvc-introduction .details li{font-size:16px;line-height:1.65;color:#56525a;}
body.memoryz-memorial-page :is(#mvc-funeral,#mvc-lastwords){background:transparent!important;padding:60px 0!important;}
body.memoryz-memorial-page #mvc-funeral{margin-top:clamp(100px,20vh,220px);}
body.memoryz-memorial-page :is(#mvc-funeral,#mvc-lastwords) h2{font-family:var(--memoryz-memorial-script,Playball,cursive)!important;font-size:clamp(30px,3.5vw,46px)!important;font-style:normal!important;font-weight:400!important;line-height:1.45!important;color:#fff!important;text-shadow:0 2px 4px #000b,0 0 10px #0006;text-align:center;text-transform:none!important;letter-spacing:normal!important;max-width:900px;margin:0 auto!important;overflow-wrap:break-word;}
body.memoryz-memorial-page .memoryz-quote-author{display:block;margin-top:16px;font-family:inherit;font-size:.7em;line-height:1.5;}
body.memoryz-memorial-page #mvc-obituary .obituary{column-gap:40px;text-align:left;}
body.memoryz-memorial-page #mvc-memories{padding:40px 0;background:rgba(20,18,22,.55);}
body.memoryz-memorial-page #mvc-memories h2{color:#fff;margin:0 0 24px;}
body.memoryz-memorial-page #mvc-memories .memory{font-size:18px;line-height:1.65;color:#29272b;background:#fff;padding:22px;}
body.memoryz-memorial-page #mvc-memories .memory-message{display:block;font-size:18px;line-height:1.65;overflow-wrap:anywhere;}
body.memoryz-memorial-page #mvc-memories .memory-headline{display:block;font-size:17px;line-height:1.5;margin-bottom:10px;}
body.memoryz-memorial-page #mvc-memories .memory-date{display:block;font-size:15px;line-height:1.5;color:#625d65;margin-top:14px;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready>.container>.is--flex{display:block;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready .carousel-wrapper{width:100%;min-width:0;overflow:visible;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready #track{position:relative;left:0!important;transform:none!important;width:100%;display:grid;grid-template-columns:repeat(var(--memoryz-candle-columns,1),minmax(0,1fr));gap:18px;white-space:normal;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready .memory{display:block;width:100%;min-width:0!important;max-width:none!important;height:auto;margin:0!important;text-align:left;border-radius:10px;}
body.memoryz-memorial-page #mvc-memories .memory[hidden],body.memoryz-memorial-page .memoryz-candle-controls[hidden]{display:none!important;}
body.memoryz-memorial-page .memoryz-candle-controls{display:flex;align-items:center;justify-content:center;gap:14px;margin:16px 0;}
body.memoryz-memorial-page .memoryz-candle-nav{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border:1px solid #ffffff70;border-radius:5px;background:#ffffff10;color:#fff;font:inherit;font-size:28px;line-height:1;padding:0;cursor:pointer;}
body.memoryz-memorial-page .memoryz-candle-nav:disabled{opacity:.4;cursor:default;}
body.memoryz-memorial-page .memoryz-candle-nav:focus-visible{outline:3px solid #ff8c00;outline-offset:3px;}
body.memoryz-memorial-page .memoryz-candle-position{color:#fff;font-size:16px;font-variant-numeric:tabular-nums;}
body.memoryz-memorial-page main .modalbox>div{max-width:min(600px,calc(100vw - 32px));font-size:16px;}
body.memoryz-memorial-page main .modalbox :is(input,textarea,select){font-size:16px;}
@media(max-width:767px){
 body.memoryz-memorial-page #page-top.header-top{position:relative!important;top:auto!important;left:auto!important;width:100%!important;max-width:100%;background:#000!important;}
 body.memoryz-memorial-page #page-top :is(.navigation-bar,.header-wrapper,.navigation-wrapper){width:100%;max-width:100%;}
 body.memoryz-memorial-page main section>.container{width:calc(100% - 28px);padding-left:0;padding-right:0;}
 body.memoryz-memorial-page #mvc-introduction>.container{padding:20px;}
 body.memoryz-memorial-page #mvc-introduction .is--flex{flex-direction:column;gap:14px;}
 body.memoryz-memorial-page #mvc-introduction .is--flex>div{min-width:0;max-width:100%;margin:0!important;}
 body.memoryz-memorial-page #mvc-introduction .is--flex>div:last-child{max-width:100%;margin:0 0 16px!important;}
 body.memoryz-memorial-page #mvc-introduction h1{font-size:clamp(32px,9vw,44px);line-height:1.3;overflow-wrap:break-word;}
 body.memoryz-memorial-page :is(#mvc-gallery,#mvc-video,#mvc-obituary,#mvc-memories-long,#mvc-relatives){padding:32px 0;}
 body.memoryz-memorial-page :is(#mvc-funeral,#mvc-lastwords){padding:36px 0!important;}
 body.memoryz-memorial-page #mvc-funeral{margin-top:120px;}
 body.memoryz-memorial-page #mvc-obituary .obituary{column-count:1;}
 body.memoryz-memorial-page #mvc-video .is--flex{flex-direction:column;gap:16px;}
 body.memoryz-memorial-page #mvc-video .is--flex>div{width:100%;min-width:0;}
 body.memoryz-memorial-page #mvc-video :is(iframe,video){width:100%;min-width:0;max-width:100%;height:auto;aspect-ratio:16/9;}
 body.memoryz-memorial-page #mvc-memories{padding:30px 0;}
 body.memoryz-memorial-page #mvc-memories h2{font-size:24px;letter-spacing:.06em;}
 body.memoryz-memorial-page #mvc-memories .memory{padding:18px;}
 body.memoryz-memorial-page #mvc-memories-long li.memory{width:100%;min-width:0;max-width:100%;margin-bottom:28px;}
 body.memoryz-memorial-page #mvc-relatives .family{max-width:100%;}
}

body.memoryz-memorial-page #mvc-memories>br{display:none;}
body.memoryz-memorial-page :is(#mvc-memories,#mvc-memories-long)>.container>button{font-size:16px;min-height:44px;}

/* 1.6.5: keep header decoration inside the black header, leave the video clear. */
body.memoryz-memorial-page #page-top.header-top{position:relative!important;top:auto!important;left:auto!important;width:100%!important;background:#000!important;}
body.memoryz-memorial-page .header-wrapper>.header{background:#000!important;}
body.memoryz-memorial-page .header-wrapper>.header::before,
body.memoryz-memorial-page .header-wrapper>.header::after{content:none!important;display:none!important;}

/* The theme reserves the navigation height in an empty hero below page-top.
   Navigation is already in normal flow; remove the duplicate spacer. */
body.memoryz-memorial-page .header-wrapper{display:none!important;}
body.memoryz-memorial-page .header-wrapper>.header{padding:0!important;min-height:0!important;height:0!important;}

/* Portrait, name and dates share one central axis on every screen. */
body.memoryz-memorial-page #mvc-introduction>.container>.is--flex{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;}
body.memoryz-memorial-page #mvc-introduction>.container>.is--flex>div{width:100%;min-width:0;max-width:100%;margin:0!important;text-align:center;}
body.memoryz-memorial-page #mvc-introduction>.container>.is--flex>div:first-child{width:min(220px,100%);}
body.memoryz-memorial-page #mvc-introduction .avatar{position:relative;width:100%;height:auto;aspect-ratio:1;margin:0 auto;max-width:220px;border-radius:12px;overflow:hidden;}
body.memoryz-memorial-page #mvc-introduction .avatar img{display:block;position:relative;z-index:2;width:100%;height:100%;max-width:100%;object-fit:cover;}
body.memoryz-memorial-page #mvc-introduction h1{margin:0 0 8px;text-align:center;}
body.memoryz-memorial-page #mvc-introduction .details{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 20px;}
body.memoryz-memorial-page #mvc-introduction .details li{margin:0;}
body.memoryz-memorial-page #mvc-introduction .share{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;}
body.memoryz-memorial-page #mvc-introduction .share>li{margin:0;}
body.memoryz-memorial-page #mvc-introduction .introduction{margin-top:24px;}
@media(max-width:767px){
 body.memoryz-memorial-page #mvc-introduction>.container>.is--flex>div:first-child{width:min(200px,100%);}
 body.memoryz-memorial-page #mvc-introduction .avatar{max-width:200px;}
}

/* Handwritten public memories; metadata and submission forms keep their type. */
body.memoryz-memorial-page #mvc-memories-long .memories>.memory>h3,
body.memoryz-memorial-page #mvc-memories-long .memories>.memory>p{font-family:var(--memoryz-memorial-script,Playball,cursive)!important;font-style:normal!important;font-weight:400!important;letter-spacing:normal!important;text-transform:none!important;color:#29272b;}
body.memoryz-memorial-page #mvc-memories-long .memories>.memory>h3{font-size:30px;line-height:1.4;margin:0 0 8px;}
body.memoryz-memorial-page #mvc-memories-long .memories>.memory>p{font-size:24px;line-height:1.65;text-align:left;overflow-wrap:anywhere;}
body.memoryz-memorial-page #mvc-memories-long .memories>.memory>.author{font-size:16px;line-height:1.5;color:#625d65;}
@media(max-width:767px){
 body.memoryz-memorial-page #mvc-memories-long .memories>.memory>p{font-size:23px;}
 body.memoryz-memorial-page #mvc-memories-long .memories>.memory>h3{font-size:28px;}
}

/* Theme clearfix pseudo-elements must not occupy candle grid cells. */
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready #track::before,
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready #track::after{content:none!important;display:none!important;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready .carousel-wrapper{height:auto!important;min-height:0;}
body.memoryz-memorial-page #mvc-memories.memoryz-candles-ready #track{align-items:stretch;}

/* Consistent section titles; personal names and remembrance texts retain script. */
body.memoryz-memorial-page :is(#mvc-gallery,#mvc-video,#mvc-obituary,#mvc-memories-long,#mvc-memories,#mvc-relatives,#memoryz-place)>.container>h2{font-family:var(--font-family,system-ui,sans-serif)!important;font-size:32px!important;font-style:normal!important;font-weight:700!important;line-height:1.35!important;text-transform:uppercase!important;letter-spacing:.18em!important;text-align:center;overflow-wrap:anywhere;}
@media(max-width:767px){body.memoryz-memorial-page :is(#mvc-gallery,#mvc-video,#mvc-obituary,#mvc-memories-long,#mvc-memories,#mvc-relatives,#memoryz-place)>.container>h2{font-size:24px!important;letter-spacing:.1em!important;}}

body.memoryz-memorial-page #mvc-introduction .share a.memoryz-detail-qr{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;width:auto!important;min-width:108px;min-height:44px;padding:8px 10px;line-height:1.4;font:600 14px/1.4 var(--font-family,system-ui,sans-serif)}
body.memoryz-memorial-page .memoryz-detail-qr svg{width:23px;height:23px;flex:none}

body.memoryz-memorial-page #mvc-introduction .share a.memoryz-detail-social{display:inline-flex;align-items:center;justify-content:center}
body.memoryz-memorial-page .memoryz-detail-social svg{display:block;width:25px;height:25px;flex:none}

/* Soft full-width section colours, scoped to individual memorial pages. */
body.memoryz-memorial-page #mvc-introduction{background:linear-gradient(to top,#fdfcf9 300px,transparent 300px)!important;}
body.memoryz-memorial-page #mvc-introduction>.container{background:#fdfcf9!important;}
body.memoryz-memorial-page #memoryz-place{background:#f5fafd!important;}
body.memoryz-memorial-page #mvc-gallery{background:#fafae9!important;}
body.memoryz-memorial-page #mvc-video{background:#f5f3fa!important;}
body.memoryz-memorial-page #mvc-obituary{background:#fcf5ee!important;}
body.memoryz-memorial-page #mvc-relatives{background:#f1f7f2!important;}
body.memoryz-memorial-page :is(#memoryz-place,#mvc-gallery,#mvc-video,#mvc-obituary,#mvc-memories-long,#mvc-relatives)>.container{background:transparent;}
