/* La Carte Eternelle — global sheets/forms visual system. Loaded LAST on purpose. */
html body .lce-modalback,
html body .caps-seal-confirmback{
  background:rgba(0,0,0,.56)!important;
  -webkit-backdrop-filter:blur(18px)!important;
  backdrop-filter:blur(18px)!important;
}

html body .lce-modal,
html body .caps-seal-confirm{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:34px!important;
  box-shadow:0 30px 90px rgba(0,0,0,.20)!important;
  overflow:auto!important;
}

html body .lce-modal,
html body .lce-modal *,
html body .caps-seal-confirm,
html body .caps-seal-confirm *,
html body #drawer,
html body #drawer *{
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

html body .lce-modal h1,
html body .lce-modal h2,
html body .lce-modal h3,
html body .caps-seal-confirm h1,
html body .caps-seal-confirm h2,
html body .caps-seal-confirm h3{
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  color:#050505!important;
  font-style:normal!important;
  font-weight:700!important;
  letter-spacing:-.045em!important;
}
html body .lce-modal h2{
  font-size:36px!important;
  line-height:1.04!important;
}

html body .lce-form label,
html body .lce-realform label,
html body .caps-media-head b,
html body .caps-media-head small,
html body .caps-media-existing,
html body .caps-seal-confirm p{
  color:#3a3a3c!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

html body .lce-form input,
html body .lce-form textarea,
html body .lce-form select,
html body .lce-realform input,
html body .lce-realform textarea,
html body .lce-realform select,
html body .lce-toolbar input,
html body .lce-toolbar select,
html body .field,
html body input.field,
html body textarea.field,
html body select.field{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:18px!important;
  box-shadow:none!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body .lce-form textarea,
html body .lce-realform textarea,
html body textarea.field{
  border-radius:20px!important;
}
html body .lce-form input::placeholder,
html body .lce-form textarea::placeholder,
html body .lce-realform input::placeholder,
html body .lce-realform textarea::placeholder{
  color:#8e8e93!important;
  opacity:1!important;
}
html body .lce-form input:focus,
html body .lce-form textarea:focus,
html body .lce-form select:focus,
html body .lce-realform input:focus,
html body .lce-realform textarea:focus,
html body .lce-realform select:focus,
html body .field:focus{
  outline:none!important;
  border-color:#050505!important;
  box-shadow:0 0 0 3px rgba(0,0,0,.08)!important;
}

html body .lce-modal button,
html body .caps-seal-confirm button,
html body #drawer button{
  border-radius:999px!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body .lce-modal .primary,
html body .caps-seal-confirm .primary,
html body .caps-seal-danger{
  background:#050505!important;
  color:#fff!important;
  border:1px solid #050505!important;
}
html body .lce-close,
html body .lce-modal .soft,
html body .caps-seal-confirm .soft,
html body #drawer .soft,
html body .drawerhead button{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
}

html body .caps-media-box,
html body .caps-media-row,
html body .caps-media-existing,
html body .caps-seal-note,
html body .caps-seal-warning,
html body .lce-entry,
html body .lce-empty,
html body .lce-chat,
html body .lce-chatmsg{
  background:#f5f5f7!important;
  color:#050505!important;
  border-color:#d1d1d6!important;
}
html body .caps-media-box{border-radius:24px!important;}
html body .caps-media-row,
html body .caps-media-existing,
html body .caps-seal-note,
html body .caps-seal-warning,
html body .lce-entry,
html body .lce-empty,
html body .lce-chat,
html body .lce-chatmsg{border-radius:18px!important;}

html body #drawer{
  background:#fff!important;
  color:#050505!important;
  border-left:1px solid #d1d1d6!important;
  border-radius:34px 0 0 34px!important;
}
html body .drawerhead{
  background:rgba(255,255,255,.94)!important;
  color:#050505!important;
  border-color:#d1d1d6!important;
}
html body #drawerbg{background:rgba(0,0,0,.56)!important;}

html body .lce-toast{
  background:#050505!important;
  color:#fff!important;
  border-radius:999px!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}

html body input[type="date"]{color-scheme:light!important;}

/* Souvenirs gallery cards with photos/media — same typography and black/white visual language as the site. */
html body #mem [data-memory],
html body #mem .card[data-memory]{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:28px!important;
  overflow:hidden!important;
  box-shadow:0 10px 30px rgba(0,0,0,.045)!important;
}
html body #mem [data-memory],
html body #mem [data-memory] *:not(svg):not(path):not(g){
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body #mem [data-memory] .cardbody{
  background:#fff!important;
  color:#050505!important;
  padding:18px 20px 20px!important;
}
html body #mem [data-memory] h1,
html body #mem [data-memory] h2,
html body #mem [data-memory] h3,
html body #mem [data-memory] h4{
  color:#050505!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-weight:700!important;
  letter-spacing:-.035em!important;
}
html body #mem [data-memory] .kicker{
  color:#6e6e73!important;
  font-weight:650!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
html body #mem [data-memory] .mut,
html body #mem [data-memory] small,
html body #mem [data-memory] p{color:#6e6e73!important;}
html body #mem [data-memory] .chip{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:999px!important;
  box-shadow:none!important;
}
html body #mem [data-memory] .cover,
html body #mem [data-memory] [data-media-preview],
html body #mem [data-memory] .mem-gallery-media-v3,
html body #mem [data-memory] .mem-gallery-media-v2{
  background:#f5f5f7!important;
  border:0!important;
  box-shadow:none!important;
}
html body #mem [data-memory] [data-media-preview],
html body #mem [data-memory] .mem-gallery-media-v3,
html body #mem [data-memory] .mem-gallery-media-v2{
  margin:0!important;
  border-radius:0!important;
}
html body #mem [data-memory] .lce-inline-actions{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  margin-top:14px!important;
}
html body #mem [data-memory] .lce-inline-actions .lce-mini,
html body #mem [data-memory] .lce-inline-actions button{
  min-height:40px!important;
  padding:9px 14px!important;
  border:1px solid #d1d1d6!important;
  border-radius:999px!important;
  background:#fff!important;
  background-image:none!important;
  color:#050505!important;
  box-shadow:none!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.15!important;
}
html body #mem [data-memory] .lce-inline-actions .lce-mini:hover,
html body #mem [data-memory] .lce-inline-actions button:hover{
  background:#f5f5f7!important;
  color:#050505!important;
  border-color:#b8b8bd!important;
  transform:none!important;
}
html body #mem [data-memory] .lce-inline-actions .lce-danger,
html body #mem [data-memory] .lce-inline-actions [data-del-memory],
html body #mem [data-memory] .lce-inline-actions [data-delete-memory-media]{
  color:#050505!important;
  background:#fff!important;
  border-color:#d1d1d6!important;
}

/* Heritage — same typography, black/white palette and rounded visual system as the rest of the site. */
html body #legacy,
html body #legacy *:not(svg):not(path):not(g){
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body #legacy{
  color:#050505!important;
}
html body #legacy .hero h1,
html body #legacy .hero h2,
html body #legacy .hero h3,
html body #legacy .panel h1,
html body #legacy .panel h2,
html body #legacy .panel h3,
html body #legacy .depth-box h1,
html body #legacy .depth-box h2,
html body #legacy .depth-box h3,
html body #legacy .depth-guide h1,
html body #legacy .depth-guide h2,
html body #legacy .depth-guide h3{
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  color:#050505!important;
  font-style:normal!important;
  font-weight:700!important;
  letter-spacing:-.04em!important;
}
html body #legacy .hero p,
html body #legacy .mut,
html body #legacy small,
html body #legacy .depth-muted,
html body #legacy .panel p,
html body #legacy .depth-box p{
  color:#6e6e73!important;
}
html body #legacy .kicker{
  color:#050505!important;
  font-weight:700!important;
  letter-spacing:.09em!important;
}
html body #legacy .panel,
html body #legacy .depth-box,
html body #legacy .depth-guide-main,
html body #legacy .depth-tip,
html body #legacy .depth-prompt,
html body #legacy .lce-entry,
html body #legacy .field{
  background:#fff!important;
  background-image:none!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:28px!important;
  box-shadow:0 10px 30px rgba(0,0,0,.045)!important;
}
html body #legacy .depth-guide{
  gap:14px!important;
}
html body #legacy .depth-n{
  background:#050505!important;
  color:#fff!important;
  border:1px solid #050505!important;
  border-radius:999px!important;
}
html body #legacy .chip,
html body #legacy .lce-mini,
html body #legacy .soft,
html body #legacy button:not(.primary){
  background:#fff!important;
  background-image:none!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:999px!important;
  box-shadow:none!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body #legacy .primary,
html body #legacy button.primary{
  background:#050505!important;
  background-image:none!important;
  color:#fff!important;
  border:1px solid #050505!important;
  border-radius:999px!important;
  box-shadow:none!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body #legacy button:hover{
  transform:none!important;
}
html body #legacy .lce-mini:hover,
html body #legacy .soft:hover,
html body #legacy button:not(.primary):hover{
  background:#f5f5f7!important;
  color:#050505!important;
  border-color:#b8b8bd!important;
}
html body #legacy input,
html body #legacy textarea,
html body #legacy select{
  background:#fff!important;
  color:#050505!important;
  border:1px solid #d1d1d6!important;
  border-radius:18px!important;
  box-shadow:none!important;
  font-family:"Inter",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
html body #legacy textarea{border-radius:20px!important;}
html body #legacy input:focus,
html body #legacy textarea:focus,
html body #legacy select:focus{
  outline:none!important;
  border-color:#050505!important;
  box-shadow:0 0 0 3px rgba(0,0,0,.08)!important;
}
html body #legacy .depth-progress{
  background:#e5e5ea!important;
  border-radius:999px!important;
  overflow:hidden!important;
}
html body #legacy .depth-progress i{
  background:#050505!important;
  border-radius:999px!important;
}

@media(max-width:700px){
  html body .lce-modal,
  html body .caps-seal-confirm{border-radius:26px!important;}
  html body #mem [data-memory],html body #mem .card[data-memory]{border-radius:24px!important;}
  html body #mem [data-memory] .cardbody{padding:16px!important;}
  html body #mem [data-memory] .lce-inline-actions .lce-mini,
  html body #mem [data-memory] .lce-inline-actions button{min-height:38px!important;padding:8px 12px!important;font-size:12px!important;}
  html body #legacy .panel,
  html body #legacy .depth-box,
  html body #legacy .depth-guide-main,
  html body #legacy .depth-tip,
  html body #legacy .depth-prompt,
  html body #legacy .lce-entry,
  html body #legacy .field{border-radius:24px!important;}
}


/* LCE_GLOBAL_OVERLAY_FORM_VIEWPORT_GUARD_V1 */
/* Global safety net for every dialog, popup, viewer and form on every section. */
html body :is(
  [class*="modalback"],
  [class*="modal-back"],
  [class*="viewer-back"],
  [class*="confirmback"],
  [class*="sheet-back"],
  .people-complete-back,
  .sp1-modalback,
  .ai-v4-back,
  .ai-v6-back
){
  box-sizing:border-box!important;
  width:100vw!important;
  max-width:100vw!important;
  min-width:0!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
}

html body :is(
  .lce-modal,
  .moi-modal,
  .people-complete-modal,
  .sp1-modal,
  .ai-v4-modal,
  .ai-v6-modal,
  .lce-rel-modal,
  .caps-seal-confirm,
  .univers-viewer-v2,
  .project-viewer-v1,
  .heritage-modal-v2,
  [role="dialog"][aria-modal="true"]
){
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:calc(100vw - 24px)!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
}

html body :is(
  .lce-modal,
  .moi-modal,
  .people-complete-modal,
  .sp1-modal,
  .ai-v4-modal,
  .ai-v6-modal,
  .lce-rel-modal,
  .caps-seal-confirm,
  .univers-viewer-v2,
  .project-viewer-v1,
  .heritage-modal-v2,
  [role="dialog"][aria-modal="true"]
) form,
html body :is(
  .lce-modal,
  .moi-modal,
  .people-complete-modal,
  .sp1-modal,
  .ai-v4-modal,
  .ai-v6-modal,
  .lce-rel-modal,
  .caps-seal-confirm,
  .univers-viewer-v2,
  .project-viewer-v1,
  .heritage-modal-v2,
  [role="dialog"][aria-modal="true"]
) form > *,
html body form{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}

html body form input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html body form textarea,
html body form select{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
}

html body :is(
  .lce-modal,
  .moi-modal,
  .people-complete-modal,
  .sp1-modal,
  .ai-v4-modal,
  .ai-v6-modal,
  .lce-rel-modal,
  .caps-seal-confirm,
  .univers-viewer-v2,
  .project-viewer-v1,
  .heritage-modal-v2,
  [role="dialog"][aria-modal="true"]
) :is(img,video,audio,canvas,iframe){
  max-width:100%!important;
  box-sizing:border-box!important;
}

@media(max-width:700px){
  html body :is(
    [class*="modalback"],
    [class*="modal-back"],
    [class*="viewer-back"],
    [class*="confirmback"],
    [class*="sheet-back"],
    .people-complete-back,
    .sp1-modalback,
    .ai-v4-back,
    .ai-v6-back
  ){
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    padding:8px!important;
    padding-top:max(8px,env(safe-area-inset-top))!important;
    padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
  }

  html body :is(
    .lce-modal,
    .moi-modal,
    .people-complete-modal,
    .sp1-modal,
    .ai-v4-modal,
    .ai-v6-modal,
    .lce-rel-modal,
    .caps-seal-confirm,
    .univers-viewer-v2,
    .project-viewer-v1,
    .heritage-modal-v2,
    [role="dialog"][aria-modal="true"]
  ){
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    min-width:0!important;
    max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    margin:0 auto!important;
    padding-left:16px!important;
    padding-right:16px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  html body :is(
    .lce-modal,
    .moi-modal,
    .people-complete-modal,
    .sp1-modal,
    .ai-v4-modal,
    .ai-v6-modal,
    .lce-rel-modal,
    .caps-seal-confirm,
    .univers-viewer-v2,
    .project-viewer-v1,
    .heritage-modal-v2,
    [role="dialog"][aria-modal="true"]
  ) form{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:minmax(0,1fr)!important;
  }

  html body :is(
    .lce-modal,
    .moi-modal,
    .people-complete-modal,
    .sp1-modal,
    .ai-v4-modal,
    .ai-v6-modal,
    .lce-rel-modal,
    .caps-seal-confirm,
    .univers-viewer-v2,
    .project-viewer-v1,
    .heritage-modal-v2,
    [role="dialog"][aria-modal="true"]
  ) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    font-size:16px!important;
  }

  html body :is(
    .lce-modal,
    .moi-modal,
    .people-complete-modal,
    .sp1-modal,
    .ai-v4-modal,
    .ai-v6-modal,
    .lce-rel-modal,
    .caps-seal-confirm,
    .univers-viewer-v2,
    .project-viewer-v1,
    .heritage-modal-v2,
    [role="dialog"][aria-modal="true"]
  ) :is([class*="actions"],[class*="media-head"],[class*="modalhead"],[class*="viewer-head"]){
    min-width:0!important;
    max-width:100%!important;
    flex-wrap:wrap!important;
  }

  html body :is(
    .lce-modal,
    .moi-modal,
    .people-complete-modal,
    .sp1-modal,
    .ai-v4-modal,
    .ai-v6-modal,
    .lce-rel-modal,
    .caps-seal-confirm,
    .univers-viewer-v2,
    .project-viewer-v1,
    .heritage-modal-v2,
    [role="dialog"][aria-modal="true"]
  ) *{
    min-width:0;
  }
}

/* LCE_MOBILE_CENTERED_FORMS_V2 */
@media(max-width:820px){
  html body :is([class*="modalback"],[class*="modal-back"],[class*="viewer-back"],[class*="confirmback"],[class*="sheet-back"],[class*="-backdrop"],.people-complete-back,.sp1-modalback,.ai-v4-back,.ai-v6-back,.s7-searchback){
    display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom))!important;overflow-x:hidden!important;overflow-y:auto!important;
  }
  html body :is(.lce-modal,.moi-modal,.depth-modal,.people-complete-modal,.sp1-modal,.ai-v4-modal,.ai-v6-modal,.lce-rel-modal,.caps-seal-confirm,.univers-viewer-v2,.project-viewer-v1,.heritage-modal-v2,.s7-searchbox,[role="dialog"][aria-modal="true"]){
    box-sizing:border-box!important;width:min(620px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;min-width:0!important;max-height:calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)))!important;margin:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;
  }
  html body :is(.lce-modal,.moi-modal,.depth-modal,.people-complete-modal,.sp1-modal,.ai-v4-modal,.ai-v6-modal,.lce-rel-modal,.caps-seal-confirm,.univers-viewer-v2,.project-viewer-v1,.heritage-modal-v2,.s7-searchbox,[role="dialog"][aria-modal="true"]) form{
    width:100%!important;max-width:100%!important;min-width:0!important;margin-inline:auto!important;grid-template-columns:minmax(0,1fr)!important;
  }
}


/* LCE_MON_UNIVERS_MODAL_MENU_GUARD_V3 */
/* Mon univers: fixed header + independently scrollable form body + reachable save action. */
html body .moi-modalback{
  top:82px!important;
  bottom:0!important;
  left:0!important;
  right:0!important;
  height:calc(100dvh - 82px)!important;
  max-height:calc(100dvh - 82px)!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:14px 18px 18px!important;
  overflow:hidden!important;
}
html body .moi-modal{
  width:min(640px,calc(100vw - 36px))!important;
  max-width:calc(100vw - 36px)!important;
  height:calc(100dvh - 110px)!important;
  max-height:calc(100dvh - 110px)!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  padding-bottom:0!important;
}
html body .moi-modal .moi-modalhead{
  position:relative!important;
  top:auto!important;
  z-index:20!important;
  flex:0 0 auto!important;
  background:var(--paper,#fffaf4)!important;
}
html body .moi-modal .moi-modalhead [data-close]{
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  padding:0!important;
  border-radius:999px!important;
  display:grid!important;
  place-items:center!important;
  font-size:22px!important;
  line-height:1!important;
}
html body .moi-modal .moi-form{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-y:auto!important;
  touch-action:pan-y!important;
  align-content:start!important;
  padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important;
}
html body .moi-modal .moi-form>button[type="submit"]{
  position:static!important;
  bottom:auto!important;
  z-index:auto!important;
  min-height:46px!important;
  margin-top:10px!important;
  margin-bottom:max(4px,env(safe-area-inset-bottom,0px))!important;
  box-shadow:none!important;
}
@media(max-width:700px){
  html body .moi-modalback{
    top:calc(env(safe-area-inset-top,0px) + 68px)!important;
    height:calc(100dvh - env(safe-area-inset-top,0px) - 68px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - 68px)!important;
    padding:8px!important;
  }
  html body .moi-modal{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    height:calc(100dvh - env(safe-area-inset-top,0px) - 92px)!important;
    max-height:calc(100dvh - env(safe-area-inset-top,0px) - 92px)!important;
    margin:0 auto!important;
    overflow:hidden!important;
  }
  html body .moi-modal .moi-form{
    padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important;
  }
}
