/* Family Book optional visual themes — Midnight Aurora
   Opt-in only. Classic Family Book remains the default when no visual theme is selected. */

html[data-fb-visual-theme="midnight-aurora"]{
  --green:#6ee7ff;
  --green2:#a78bfa;
  --brown:#f0abfc;
  --cream:#070b18;
  --paper:#0c1224;
  --ink:#eef7ff;
  --muted:#9eafd0;
  --line:rgba(108,210,255,.22);
  --shadow:0 18px 48px rgba(0,0,0,.42);
  --fb-shell-bg:#050814;
  --fb-shell-panel:rgba(10,18,39,.88);
  --fb-shell-panel-2:rgba(16,27,55,.82);
  --fb-shell-border:rgba(96,205,255,.24);
  --fb-shell-text:#eef7ff;
  --fb-shell-muted:#9eafd0;
  --fb-shell-accent:#67e8f9;
  --fb-shell-accent-soft:rgba(76,180,255,.14);
  --fb-shell-shadow:0 12px 36px rgba(0,0,0,.38);
  color-scheme:dark;
}

html[data-fb-visual-theme="midnight-aurora"] body{
  background:
    radial-gradient(900px 520px at 8% 8%,rgba(0,220,255,.13),transparent 62%),
    radial-gradient(850px 520px at 92% 12%,rgba(150,70,255,.16),transparent 62%),
    radial-gradient(900px 620px at 50% 100%,rgba(0,255,190,.07),transparent 68%),
    #050814!important;
  color:var(--ink);
}

html[data-fb-visual-theme="midnight-aurora"] body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    linear-gradient(115deg,transparent 28%,rgba(0,235,255,.055) 45%,transparent 57%),
    linear-gradient(245deg,transparent 35%,rgba(168,85,247,.055) 52%,transparent 68%);
  opacity:.95;
}

html[data-fb-visual-theme="midnight-aurora"] #app>.app{
  background:transparent!important;
}

html[data-fb-visual-theme="midnight-aurora"] #app>.app>.topbar{
  background:rgba(5,10,25,.84)!important;
  border-bottom-color:rgba(92,206,255,.2)!important;
  box-shadow:0 8px 34px rgba(0,0,0,.25),0 1px 0 rgba(101,235,255,.08)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-top-nav button{
  color:#aab8d6!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-top-nav button:hover{
  color:#67e8f9!important;
  background:linear-gradient(135deg,rgba(34,211,238,.13),rgba(139,92,246,.13))!important;
  box-shadow:0 0 22px rgba(34,211,238,.13);
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-top-nav button.active{
  color:#fff!important;
  background:linear-gradient(135deg,rgba(34,211,238,.2),rgba(139,92,246,.22))!important;
  box-shadow:0 0 24px rgba(99,102,241,.2),inset 0 0 18px rgba(34,211,238,.08);
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-family-search-box{
  background:rgba(9,17,38,.78)!important;
  border-color:rgba(91,214,255,.3)!important;
  box-shadow:0 0 18px rgba(0,200,255,.06);
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-family-search-box:focus-within{
  border-color:#67e8f9!important;
  box-shadow:0 0 0 3px rgba(34,211,238,.11),0 0 24px rgba(34,211,238,.15)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-family-search-box input{
  color:#eef7ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-family-search-box input::placeholder{
  color:#8295ba!important;
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-left-rail,
html[data-fb-visual-theme="midnight-aurora"] .desktop-right-rail{
  scrollbar-color:rgba(103,232,249,.35) transparent;
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-profile-card,
html[data-fb-visual-theme="midnight-aurora"] .desktop-side-link{
  color:#eaf5ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-profile-card:hover,
html[data-fb-visual-theme="midnight-aurora"] .desktop-side-link:hover{
  background:rgba(55,91,145,.14)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-side-link span:first-child,
html[data-fb-visual-theme="midnight-aurora"] .desktop-widget-icon{
  background:linear-gradient(135deg,rgba(34,211,238,.18),rgba(139,92,246,.2))!important;
  color:#67e8f9!important;
  border:1px solid rgba(103,232,249,.18);
  box-shadow:0 0 16px rgba(34,211,238,.08);
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-side-divider{
  background:rgba(103,232,249,.15)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-side-caption{
  color:#7185aa!important;
}

html[data-fb-visual-theme="midnight-aurora"] .desktop-widget{
  background:linear-gradient(145deg,rgba(10,19,43,.94),rgba(13,22,49,.78))!important;
  border-color:rgba(91,214,255,.2)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-widget-row,
html[data-fb-visual-theme="midnight-aurora"] .desktop-stat{
  color:#eaf5ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-stat{
  background:linear-gradient(135deg,rgba(31,70,113,.2),rgba(84,48,133,.2))!important;
  border:1px solid rgba(103,232,249,.12);
}
html[data-fb-visual-theme="midnight-aurora"] .desktop-stat strong{
  color:#67e8f9!important;
}

html[data-fb-visual-theme="midnight-aurora"] .home-status-composer-shell .wall-composer,
html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-shell,
html[data-fb-visual-theme="midnight-aurora"] .family-wall-panel{
  filter:none;
}

html[data-fb-visual-theme="midnight-aurora"] .home-status-composer-shell .wall-composer,
html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-card,
html[data-fb-visual-theme="midnight-aurora"] .home-memory-add-card{
  background:linear-gradient(145deg,rgba(8,18,41,.95),rgba(15,25,57,.82))!important;
  border-color:rgba(80,205,255,.25)!important;
  box-shadow:0 12px 30px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.025)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-card:hover,
html[data-fb-visual-theme="midnight-aurora"] .home-memory-add-card:hover{
  border-color:rgba(103,232,249,.7)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.36),0 0 22px rgba(34,211,238,.13)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-head h2,
html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-head p{
  color:#eaf5ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .home-memory-strip-viewall{
  color:#67e8f9!important;
}
html[data-fb-visual-theme="midnight-aurora"] .home-memory-add-icon{
  background:linear-gradient(135deg,rgba(34,211,238,.18),rgba(139,92,246,.2))!important;
  color:#67e8f9!important;
}
html[data-fb-visual-theme="midnight-aurora"] .home-memory-add-plus{
  background:linear-gradient(135deg,#06b6d4,#8b5cf6)!important;
  box-shadow:0 0 18px rgba(99,102,241,.35)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .family-countdown-hero{
  background:linear-gradient(135deg,rgba(6,182,212,.16),rgba(124,58,237,.18))!important;
  border:1px solid rgba(103,232,249,.22)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 0 22px rgba(34,211,238,.08);
}
html[data-fb-visual-theme="midnight-aurora"] .family-countdown-icon{
  background:rgba(5,14,31,.82)!important;
  color:#67e8f9!important;
  border-color:rgba(103,232,249,.2)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .family-countdown-unit strong,
html[data-fb-visual-theme="midnight-aurora"] .family-countdown-row-days{
  color:#67e8f9!important;
}

html[data-fb-visual-theme="midnight-aurora"] .primary{
  background:linear-gradient(135deg,#06b6d4,#7c3aed)!important;
  box-shadow:0 10px 26px rgba(34,211,238,.2),0 0 22px rgba(124,58,237,.16)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .primary:hover{
  background:linear-gradient(135deg,#22d3ee,#8b5cf6)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .secondary,
html[data-fb-visual-theme="midnight-aurora"] .demo{
  background:rgba(12,23,47,.9)!important;
  color:#dcecff!important;
  border-color:rgba(103,232,249,.22)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .circle{
  background:rgba(8,17,36,.84)!important;
  color:#67e8f9!important;
  border-color:rgba(103,232,249,.25)!important;
  box-shadow:0 0 16px rgba(34,211,238,.07);
}
html[data-fb-visual-theme="midnight-aurora"] .avatar{
  background:linear-gradient(135deg,#06b6d4,#7c3aed)!important;
  color:#fff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .notify b{
  background:linear-gradient(135deg,#f472b6,#a855f7)!important;
  border-color:#07101f!important;
  box-shadow:0 0 12px rgba(244,114,182,.4);
}

html[data-fb-visual-theme="midnight-aurora"] .settings-page,
html[data-fb-visual-theme="midnight-aurora"] .settings-card,
html[data-fb-visual-theme="midnight-aurora"] .settings-account-summary{
  color:#eaf5ff;
}
html[data-fb-visual-theme="midnight-aurora"] .settings-card,
html[data-fb-visual-theme="midnight-aurora"] .settings-account-summary{
  background:linear-gradient(145deg,rgba(10,19,43,.94),rgba(15,25,57,.84))!important;
  border-color:rgba(103,232,249,.18)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.3)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .settings-card-icon{
  background:linear-gradient(135deg,rgba(34,211,238,.18),rgba(139,92,246,.2))!important;
  color:#67e8f9!important;
}
html[data-fb-visual-theme="midnight-aurora"] .settings-page h1,
html[data-fb-visual-theme="midnight-aurora"] .settings-card h2{
  color:#f2f8ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .settings-card-head p,
html[data-fb-visual-theme="midnight-aurora"] .settings-card-head span,
html[data-fb-visual-theme="midnight-aurora"] .settings-note,
html[data-fb-visual-theme="midnight-aurora"] .settings-toggle-row small{
  color:#93a8c9!important;
}
html[data-fb-visual-theme="midnight-aurora"] .theme-choice{
  background:rgba(8,17,36,.72)!important;
  border-color:rgba(103,232,249,.15)!important;
  color:#eaf5ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .theme-choice.active,
html[data-fb-visual-theme="midnight-aurora"] .fb-visual-theme-choice.active{
  border-color:#67e8f9!important;
  box-shadow:0 0 22px rgba(34,211,238,.16),inset 0 0 18px rgba(124,58,237,.08)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .fb-visual-theme-card{
  background:linear-gradient(145deg,rgba(8,17,36,.95),rgba(20,25,65,.86))!important;
  border-color:rgba(103,232,249,.22)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.3)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .fb-theme-preview{
  background:
    radial-gradient(circle at 22% 30%,rgba(34,211,238,.85),transparent 30%),
    radial-gradient(circle at 78% 32%,rgba(168,85,247,.85),transparent 31%),
    linear-gradient(135deg,#071225,#101b3b 52%,#180f32)!important;
}

html[data-fb-visual-theme="midnight-aurora"] input,
html[data-fb-visual-theme="midnight-aurora"] select,
html[data-fb-visual-theme="midnight-aurora"] textarea{
  background:rgba(7,15,32,.82)!important;
  color:#eef7ff!important;
  border-color:rgba(103,232,249,.2)!important;
}
html[data-fb-visual-theme="midnight-aurora"] input::placeholder,
html[data-fb-visual-theme="midnight-aurora"] textarea::placeholder{
  color:#7589ad!important;
}
html[data-fb-visual-theme="midnight-aurora"] input:focus,
html[data-fb-visual-theme="midnight-aurora"] select:focus,
html[data-fb-visual-theme="midnight-aurora"] textarea:focus{
  border-color:#67e8f9!important;
  box-shadow:0 0 0 3px rgba(34,211,238,.1),0 0 18px rgba(34,211,238,.1)!important;
}

html[data-fb-visual-theme="midnight-aurora"] .fb-visual-theme-choice[data-visual-theme="midnight-aurora"] .fb-theme-check{
  opacity:1;
}
html[data-fb-visual-theme="midnight-aurora"] .fb-visual-theme-choice[data-visual-theme="classic"] .fb-theme-check{
  opacity:0;
}

@media(max-width:1179px){
  html[data-fb-visual-theme="midnight-aurora"] .bottom{
    background:rgba(5,12,27,.92)!important;
    border-color:rgba(103,232,249,.22)!important;
    box-shadow:0 14px 40px rgba(0,0,0,.45),0 0 24px rgba(34,211,238,.08)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .nav{
    color:#8193b5!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .nav.active,
  html[data-fb-visual-theme="midnight-aurora"] .nav.active span{
    color:#67e8f9!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .nav.active:after{
    background:linear-gradient(90deg,#06b6d4,#8b5cf6)!important;
    box-shadow:0 0 12px rgba(103,232,249,.55);
  }
}

/* Keep the login/maintenance screens on their existing visual language. */
html[data-fb-visual-theme="midnight-aurora"] .login-page,
html[data-fb-visual-theme="midnight-aurora"] #fbMaintenanceGate{
  color-scheme:light;
}


/* Theme collection — balanced card proportions */
.fb-visual-theme-card .fb-visual-theme-grid{
  display:grid;
  gap:10px;
  margin-top:16px;
}
.fb-visual-theme-card .fb-visual-theme-choice{
  position:relative;
  width:100%;
  min-height:76px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 26px;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  text-align:left;
  border-radius:14px;
  box-sizing:border-box;
}
.fb-visual-theme-card .fb-theme-preview{
  width:48px;
  height:48px;
  min-width:48px;
  display:grid;
  place-items:center;
  border-radius:13px;
  box-sizing:border-box;
}
.fb-visual-theme-card .fb-theme-preview svg{
  width:23px!important;
  height:23px!important;
  display:block;
}
.fb-visual-theme-card .fb-theme-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  line-height:1.2;
}
.fb-visual-theme-card .fb-theme-copy strong{
  display:block;
  margin:0;
  font-size:15px;
  line-height:1.2;
  font-weight:800;
  white-space:normal;
}
.fb-visual-theme-card .fb-theme-copy small{
  display:block;
  margin:0;
  font-size:12px;
  line-height:1.35;
  font-weight:500;
  opacity:.78;
  white-space:normal;
}
.fb-visual-theme-card .fb-theme-check{
  width:22px!important;
  height:22px!important;
  justify-self:end;
  flex:none;
}
@media(max-width:560px){
  .fb-visual-theme-card .settings-card-head{
    align-items:flex-start;
  }
  .fb-visual-theme-card .settings-card-head .settings-card-icon{
    flex:0 0 42px;
    width:42px;
    height:42px;
  }
  .fb-visual-theme-card .settings-card-head .settings-card-icon svg{
    width:21px!important;
    height:21px!important;
  }
  .fb-visual-theme-card .settings-card-head h2{
    font-size:20px!important;
    line-height:1.15!important;
  }
  .fb-visual-theme-card .settings-card-head>div>span{
    font-size:12px!important;
    line-height:1.35!important;
  }
  .fb-visual-theme-card .fb-visual-theme-choice{
    min-height:72px;
    grid-template-columns:44px minmax(0,1fr) 24px;
    gap:10px;
    padding:11px 12px;
  }
  .fb-visual-theme-card .fb-theme-preview{
    width:44px;
    height:44px;
    min-width:44px;
  }
  .fb-visual-theme-card .fb-theme-preview svg{
    width:21px!important;
    height:21px!important;
  }
  .fb-visual-theme-card .fb-theme-copy strong{
    font-size:14px;
  }
  .fb-visual-theme-card .fb-theme-copy small{
    font-size:11px;
  }
  .fb-visual-theme-card .fb-theme-check{
    width:20px!important;
    height:20px!important;
  }
}


/* ============================================================
   MIDNIGHT AURORA — SETTINGS MOBILE
   Final scenic/glass page treatment matching Members/Calendar.
   ============================================================ */
@media (max-width:759px){
  html[data-fb-visual-theme="midnight-aurora"] #screen:has(.settings-page){
    position:relative!important;
    isolation:isolate!important;
    background:
      linear-gradient(180deg,rgba(2,7,20,.30) 0%,rgba(2,8,22,.50) 28%,rgba(2,8,21,.72) 62%,rgba(2,7,19,.90) 100%),
      url("../assets/midnight-aurora-widget-flow.webp") center top/100% auto repeat-y!important;
    background-color:#020814!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] #screen:has(.settings-page)::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    pointer-events:none;
    background:
      radial-gradient(52% 30% at 88% 7%,rgba(34,211,238,.10),transparent 72%),
      radial-gradient(44% 28% at 5% 16%,rgba(168,85,247,.10),transparent 74%);
  }
  html[data-fb-visual-theme="midnight-aurora"] #screen:has(.settings-page)>.settings-page{
    position:relative!important;
    z-index:1!important;
    background:transparent!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page{
    padding-top:4px!important;
  }

  /* Settings heading capsule */
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-page-head{
    position:relative!important;
    overflow:hidden!important;
    isolation:isolate!important;
    margin:0 0 12px!important;
    padding:15px 13px!important;
    border-radius:18px!important;
    background:
      linear-gradient(135deg,rgba(3,11,28,.36),rgba(4,14,34,.50),rgba(3,10,27,.68)),
      url("../assets/midnight-aurora-alpine.webp") 76% 28%/155% auto no-repeat!important;
    border:1px solid rgba(79,230,255,.34)!important;
    border-left:2px solid rgba(168,85,247,.82)!important;
    box-shadow:-4px 0 16px rgba(139,92,246,.20),0 14px 30px rgba(0,0,0,.26),0 0 18px rgba(34,211,238,.08)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-page-head>*{
    position:relative!important;
    z-index:1!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-page-head .eyebrow{
    color:#7dd3fc!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-page-head h1{
    color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-page-head>div>p:last-child{
    color:#b8c6da!important;
  }

  /* Account and settings capsules */
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-account-summary,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card{
    position:relative!important;
    overflow:hidden!important;
    isolation:isolate!important;
    background:
      linear-gradient(145deg,rgba(4,14,31,.91),rgba(8,18,42,.88)),
      url("../assets/midnight-aurora-alpine.webp") 76% 62%/cover no-repeat!important;
    border:1px solid rgba(90,219,255,.18)!important;
    border-left:2px solid rgba(168,85,247,.52)!important;
    box-shadow:-3px 0 13px rgba(139,92,246,.11),0 11px 25px rgba(0,0,0,.23),inset 0 1px 0 rgba(255,255,255,.025)!important;
    backdrop-filter:blur(8px) saturate(110%)!important;
    -webkit-backdrop-filter:blur(8px) saturate(110%)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card>*,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-account-summary>*{
    position:relative!important;
    z-index:1!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card-icon{
    background:linear-gradient(145deg,rgba(7,20,42,.92),rgba(25,25,66,.78))!important;
    border:1px solid rgba(98,226,255,.20)!important;
    color:#8ff5ff!important;
    box-shadow:0 0 12px rgba(34,211,238,.07)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card-head p{
    color:#7dd3fc!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card-head h2{
    color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-card-head span,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-note,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-toggle-row small,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-select-row small{
    color:#a9b9cd!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-toggle-row,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-select-row{
    border-color:rgba(90,219,255,.12)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .theme-choice,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .fb-visual-theme-choice{
    background:rgba(4,14,31,.86)!important;
    border-color:rgba(90,219,255,.15)!important;
    color:#eef7ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .theme-choice.active,
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .fb-visual-theme-choice.active{
    background:linear-gradient(145deg,rgba(8,29,54,.94),rgba(32,25,72,.82))!important;
    border-color:rgba(103,232,249,.40)!important;
  }
}


/* Midnight Aurora — Help & About destination */
@media(max-width:759px){
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-about-card{
    background:
      linear-gradient(145deg,rgba(3,13,31,.78),rgba(13,18,48,.84)),
      url("../assets/midnight-aurora-alpine.webp") 68% 45%/145% auto no-repeat!important;
    border:1px solid rgba(103,232,249,.28)!important;
    border-left:2px solid rgba(168,85,247,.74)!important;
    box-shadow:-4px 0 15px rgba(139,92,246,.15),0 13px 30px rgba(0,0,0,.28),0 0 18px rgba(34,211,238,.07)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-about-card .settings-card-icon{
    background:linear-gradient(135deg,rgba(34,211,238,.19),rgba(139,92,246,.24))!important;
    color:#8ff5ff!important;
    border-color:rgba(103,232,249,.25)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-about-card .settings-version-row{
    background:rgba(3,12,29,.62)!important;
    border:1px solid rgba(103,232,249,.12)!important;
    color:#b8c6da!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-about-card .settings-version-row strong{
    color:#eaf8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .settings-page .settings-signout{
    background:rgba(33,10,30,.76)!important;
    border:1px solid rgba(244,114,182,.24)!important;
    color:#fda4af!important;
    box-shadow:0 9px 22px rgba(0,0,0,.20)!important;
  }
}


/* ============================================================
   MIDNIGHT AURORA — NESTED MOBILE UI SYSTEM
   Editors, sheets, pickers, modals and secondary forms.
   ============================================================ */
@media(max-width:759px){
  html[data-fb-visual-theme="midnight-aurora"] :is(.memory-inline-editor,.member-form-card,.fb-add-child-card,.fb-date-dialog){
    background:linear-gradient(145deg,rgba(4,14,31,.97),rgba(8,18,42,.95))!important;
    border-color:rgba(90,219,255,.20)!important;
    color:#eef7ff!important;
    box-shadow:0 18px 46px rgba(0,0,0,.34),0 0 18px rgba(139,92,246,.08)!important;
  }

  /* Inline memory editor */
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-editor-head strong{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-editor-head small,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-media-head small,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-capture span{color:#a9b9cd!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-close,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-cancel,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-media-actions button{
    background:#071429!important;border-color:rgba(90,219,255,.20)!important;color:#8ff5ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-field{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-field textarea{
    background:#061326!important;border-color:rgba(90,219,255,.22)!important;color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-people,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-media{
    background:rgba(3,15,34,.78)!important;border-color:rgba(103,232,249,.18)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-people legend,
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-media-head strong{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-people legend small{color:#a9b9cd!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-person{
    background:linear-gradient(145deg,rgba(4,16,35,.96),rgba(7,27,54,.90))!important;
    border-color:rgba(90,219,255,.20)!important;color:#eef7ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-person:has(input:checked){
    background:linear-gradient(145deg,rgba(7,31,57,.98),rgba(37,27,82,.92))!important;
    border-color:rgba(103,232,249,.48)!important;color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-avatar{
    background:linear-gradient(135deg,rgba(34,211,238,.16),rgba(139,92,246,.22))!important;color:#eaf8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-person>svg{color:#67e8f9!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-capture{
    background:rgba(3,20,38,.74)!important;border-color:rgba(103,232,249,.16)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-capture strong{color:#8ff5ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .memory-inline-save{
    background:linear-gradient(105deg,#16bfe2,#3b82f6 52%,#7c3aed)!important;border-color:transparent!important;color:#fff!important;
  }

  /* Edit member / relationship forms */
  html[data-fb-visual-theme="midnight-aurora"] .member-form-page{
    background:linear-gradient(180deg,rgba(2,7,20,.30),rgba(2,8,22,.62)),url("../assets/midnight-aurora-widget-flow.webp") center top/100% auto repeat-y!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .member-form-page>.back-link{color:#7dd3fc!important}
  html[data-fb-visual-theme="midnight-aurora"] .member-form-card .form-title .eyebrow{color:#7dd3fc!important}
  html[data-fb-visual-theme="midnight-aurora"] .member-form-card .form-title h1{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .member-form-card .form-title p{color:#a9b9cd!important}
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm label{color:#eaf8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm :is(input,select){
    background:#061326!important;border-color:rgba(90,219,255,.20)!important;color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm .relationship-section,
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm .locked-member-field{
    background:rgba(3,16,35,.74)!important;border-color:rgba(103,232,249,.17)!important;color:#eef7ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm .relationship-title h3{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] #editMemberForm .relationship-title p{color:#a9b9cd!important}

  /* Add child sheet */
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-head span{color:#7dd3fc!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-head h2,
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-form label>span{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-head p,
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-form label small,
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-note p{color:#a9b9cd!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-close{
    background:#071429!important;border-color:rgba(90,219,255,.20)!important;color:#8ff5ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-form input{
    background:#061326!important;border-color:rgba(90,219,255,.20)!important;color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-note{
    background:rgba(3,20,38,.72)!important;border-color:rgba(103,232,249,.16)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-note>svg{color:#67e8f9!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-add-child-note strong{color:#f4f8ff!important}

  /* Global date picker used by nested editors */
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-dialog{
    background:linear-gradient(145deg,rgba(3,14,32,.98),rgba(12,20,51,.97)),url("../assets/midnight-aurora-alpine.webp") 70% 18%/cover no-repeat!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-dialog-head p{color:#7dd3fc!important;opacity:1!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-dialog-head h2{color:#f4f8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-close,
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-nav button{
    border-color:rgba(90,219,255,.22)!important;color:#dff8ff!important;background:rgba(3,17,38,.70)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-jump{
    background:rgba(3,16,35,.76)!important;border-color:rgba(103,232,249,.16)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-jump :is(select,input){
    background:#061326!important;border-color:rgba(90,219,255,.20)!important;color:#f4f8ff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-day{color:#eaf8ff!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-day.today{box-shadow:inset 0 0 0 1px #67e8f9!important}
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-day.selected,
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-jump-apply{
    background:linear-gradient(135deg,#16bfe2,#7c3aed)!important;color:#fff!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] .fb-date-clear{color:#67e8f9!important}
}

/* ============================================================
   MIDNIGHT AURORA — GLOBAL NEON BUTTON INTERACTION
   Shared desktop + mobile interaction language.
   ============================================================ */
html[data-fb-visual-theme="midnight-aurora"] :is(
  button,
  .primary,.secondary,.demo,
  [role="button"],
  .nav
):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo){
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,color .16s ease,filter .16s ease,transform .12s ease!important;
}

@media (hover:hover){
  html[data-fb-visual-theme="midnight-aurora"] :is(
    button,
    .primary,.secondary,.demo,
    [role="button"],
    .nav
  ):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):hover{
    border-color:rgba(101,247,255,.92)!important;
    box-shadow:
      inset 0 0 0 1px rgba(199,253,255,.10),
      inset 0 0 18px rgba(34,211,238,.15),
      0 0 7px rgba(103,232,249,.58),
      0 0 17px rgba(34,211,238,.34),
      0 0 25px rgba(139,92,246,.12)!important;
    filter:brightness(1.08)!important;
  }
}

html[data-fb-visual-theme="midnight-aurora"] :is(
  button,
  .primary,.secondary,.demo,
  [role="button"],
  .nav
):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):focus-visible{
  outline:1px solid rgba(168,249,255,.95)!important;
  outline-offset:2px!important;
  border-color:rgba(101,247,255,.96)!important;
  box-shadow:
    inset 0 0 20px rgba(34,211,238,.18),
    0 0 8px rgba(103,232,249,.72),
    0 0 20px rgba(34,211,238,.42),
    0 0 28px rgba(139,92,246,.16)!important;
}

html[data-fb-visual-theme="midnight-aurora"] :is(
  button,
  .primary,.secondary,.demo,
  [role="button"],
  .nav
):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):active{
  border-color:rgba(137,250,255,1)!important;
  box-shadow:
    inset 0 0 24px rgba(34,211,238,.26),
    0 0 8px rgba(103,232,249,.82),
    0 0 21px rgba(34,211,238,.50),
    0 0 30px rgba(139,92,246,.20)!important;
  filter:brightness(1.13)!important;
  transform:translateY(0)!important;
}

html[data-fb-visual-theme="midnight-aurora"] :is(
  button,
  .primary,.secondary,.demo,
  [role="button"],
  .nav
):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo) svg{
  transition:filter .16s ease,color .16s ease!important;
}

@media (hover:hover){
  html[data-fb-visual-theme="midnight-aurora"] :is(
    button,
    .primary,.secondary,.demo,
    [role="button"],
    .nav
  ):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):hover svg{
    filter:drop-shadow(0 0 3px rgba(255,255,255,.78)) drop-shadow(0 0 7px rgba(103,232,249,.88))!important;
  }
}

/* Touch devices have no persistent hover: make press feedback equally bold. */
@media (hover:none), (max-width:759px){
  html[data-fb-visual-theme="midnight-aurora"] :is(
    button,
    .primary,.secondary,.demo,
    [role="button"],
    .nav
  ):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):active{
    background-color:rgba(7,67,88,.72)!important;
  }
  html[data-fb-visual-theme="midnight-aurora"] :is(
    button,
    .primary,.secondary,.demo,
    [role="button"],
    .nav
  ):not(:disabled):not(.danger):not(.destructive):not(.wall-delete):not(.memory-delete):not(.family-spotlight-photo):active svg{
    filter:drop-shadow(0 0 3px rgba(255,255,255,.92)) drop-shadow(0 0 7px rgba(103,232,249,1)) drop-shadow(0 0 11px rgba(34,211,238,.72))!important;
  }
}

/* ============================================================
   MIDNIGHT AURORA — SHARED NESTED PAGE SYSTEM
   Common cards/forms/menus across desktop and mobile routes.
   ============================================================ */
html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .member-form-card,.settings-card,.settings-account-summary,
  .invite-card,.access-card,.notification-card,
  .album-card,.album-editor-card,.memory-editor-card,.memory-detail-card,
  .event-editor-card,.event-detail-card,.profile-view-card,
  .relationship-section,.history-info-note,.history-notes-section,
  .tree-history-directory,.story-page-head
){
  border-color:rgba(83,229,255,.42)!important;
  background:
    linear-gradient(145deg,rgba(2,14,34,.76),rgba(5,22,48,.62))!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 0 7px rgba(103,232,249,.12),
    0 10px 26px rgba(0,0,0,.20)!important;
  color:#eef7ff!important;
}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .settings-card-icon,.empty-icon,.history-info-note>svg,
  .member-form-card .form-title>span
){
  border:1px solid rgba(91,238,255,.62)!important;
  background:linear-gradient(145deg,rgba(4,38,67,.94),rgba(24,28,78,.90))!important;
  color:#8ff8ff!important;
  box-shadow:inset 0 0 13px rgba(34,211,238,.12),0 0 7px rgba(103,232,249,.32),0 0 15px rgba(34,211,238,.14)!important;
}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .settings-card-icon,.empty-icon,.history-info-note>svg
) svg{
  filter:drop-shadow(0 0 4px rgba(103,232,249,.82))!important;
}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .settings-nav-row,.settings-toggle-row,.settings-select-row,
  .managed-profile-check,.relationship-row,.history-note-card,
  .history-memory-card,.member-menu button
){
  border-color:rgba(93,226,255,.22)!important;
  background:rgba(3,20,43,.58)!important;
  color:#eef7ff!important;
}

@media(hover:hover){
  html[data-fb-visual-theme="midnight-aurora"] #screen :is(
    .settings-nav-row,.history-memory-card,.member-menu button
  ):not(.danger):hover{
    border-color:rgba(101,247,255,.76)!important;
    background:linear-gradient(90deg,rgba(7,40,69,.92),rgba(7,77,96,.78))!important;
    box-shadow:inset 0 0 18px rgba(34,211,238,.12),0 0 7px rgba(103,232,249,.42),0 0 16px rgba(34,211,238,.20)!important;
  }
}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(input,select,textarea){
  border-color:rgba(96,219,255,.28)!important;
  background:rgba(2,13,31,.76)!important;
  color:#f1f7ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] #screen :is(input,select,textarea):focus{
  border-color:rgba(103,242,255,.82)!important;
  box-shadow:0 0 0 1px rgba(103,232,249,.16),0 0 12px rgba(34,211,238,.20)!important;
}
html[data-fb-visual-theme="midnight-aurora"] #screen :is(input,textarea)::placeholder{color:#8195ae!important}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .back-link,.link,.settings-page-head button
){color:#82f4ff!important}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .member-form-card,.settings-card,.profile-view-card,
  .memory-detail-card,.event-detail-card,.album-editor-card
) h1,
html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .member-form-card,.settings-card,.profile-view-card,
  .memory-detail-card,.event-detail-card,.album-editor-card
) h2{color:#f4f8ff!important}

html[data-fb-visual-theme="midnight-aurora"] #screen :is(
  .member-form-card,.settings-card,.profile-view-card,
  .memory-detail-card,.event-detail-card,.album-editor-card
) :is(p,small){border-color:rgba(91,226,255,.14)}

/* Midnight Aurora — overlays, nested menus and sheets */
html[data-fb-visual-theme="midnight-aurora"] :is(
  #profilePopover .profile-popover-menu,
  #profilePopover .fb-theme-panel,
  .memory-filter-sheet-card,
  .memory-detail-more-menu
){
  border:1px solid rgba(83,229,255,.46)!important;
  background:linear-gradient(145deg,rgba(2,13,32,.96),rgba(7,22,48,.95))!important;
  color:#eef7ff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 0 9px rgba(103,232,249,.20),0 18px 44px rgba(0,0,0,.42)!important;
}
html[data-fb-visual-theme="midnight-aurora"] :is(
  #profilePopover .fb-account-card,
  #profilePopover .fb-theme-choice,
  .mobile-profile-menu-profile,
  .mobile-profile-menu-card,
  .mobile-profile-menu-admin
){
  border-color:rgba(88,229,255,.30)!important;
  background:rgba(3,19,42,.72)!important;
  color:#eef7ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] :is(
  #profilePopover .fb-desktop-menu-row>span:first-child,
  .mobile-profile-menu-card-icon,
  .mobile-profile-menu-admin span:first-child
){
  border:1px solid rgba(91,238,255,.58)!important;
  background:linear-gradient(145deg,rgba(4,38,67,.94),rgba(25,28,78,.90))!important;
  color:#8ff8ff!important;
  box-shadow:inset 0 0 12px rgba(34,211,238,.12),0 0 7px rgba(103,232,249,.28)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .memory-filter-sheet-head h2{color:#f4f8ff!important}
html[data-fb-visual-theme="midnight-aurora"] .memory-filter-sheet-head small{color:#8ff8ff!important}

/* Memory detail is a major nested route: replace its remaining paper panel. */
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-copy{
  background:linear-gradient(145deg,rgba(2,14,34,.94),rgba(5,22,48,.90))!important;
  border-color:rgba(83,229,255,.42)!important;
  color:#eef7ff!important;
  box-shadow:0 0 8px rgba(103,232,249,.12)!important;
}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-head h1{color:#f4f8ff!important}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-date,
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-author small{color:#9eb0c8!important}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-author strong{color:#eef7ff!important}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished :is(.memory-detail-story,.memory-detail-add-caption){
  border-color:rgba(91,229,255,.30)!important;
  background:rgba(3,20,43,.62)!important;
  color:#eef7ff!important;
}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-story p{color:#e9f3ff!important}
html[data-fb-visual-theme="midnight-aurora"] .memory-detail-polished .memory-detail-tags button{
  border-color:rgba(91,229,255,.28)!important;
  background:rgba(3,20,43,.68)!important;
  color:#eef7ff!important;
}
