/* Asmbly 0.9.31.8.10.1.3.2 — Mobile Calendar, overlay and dock state integrity */
@media(max-width:900px){
  :root{--asmbly-mobile-brand-row:66px;--asmbly-mobile-dock-clearance:86px}

  /* One active destination, expressed by a glass/glow surface rather than yellow underlines. */
  html body .asmbly-unified-mobile-pill>a:after{display:none!important;content:none!important}
  html body .asmbly-unified-mobile-pill>a{background:transparent!important;box-shadow:none!important;color:rgba(255,255,255,.64)!important}
  html body .asmbly-unified-mobile-pill>a.active,
  html body .asmbly-unified-mobile-pill>a[aria-current="page"]{
    background:linear-gradient(145deg,rgba(255,255,255,.19),rgba(255,255,255,.075))!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.13),0 8px 24px rgba(0,0,0,.26),0 0 24px rgba(124,92,255,.10)!important;
    color:#fff!important
  }

  /* The trigger itself is ASMBLY-branded, not a gray system button. */
  html body .asmbly-unified-mobile-plus{
    border:1px solid rgba(255,255,255,.24)!important;
    background:linear-gradient(145deg,#ffbd4a 0%,#ff7a45 42%,#ff4f88 70%,#8a63ff 100%)!important;
    color:#140d15!important;
    box-shadow:0 16px 42px rgba(0,0,0,.42),0 0 28px rgba(255,80,128,.24),inset 0 1px 0 rgba(255,255,255,.44)!important
  }
  html body .asmbly-unified-mobile-plus:active{transform:scale(.96)!important;filter:saturate(1.08) brightness(.98)!important}
  html body.asmbly-dock-actions-open .asmbly-unified-mobile-plus,
  html body .asmbly-unified-mobile-dock.actions-open .asmbly-unified-mobile-plus{transform:rotate(45deg)!important;background:linear-gradient(145deg,#8a63ff,#ff4f88 58%,#ffbd4a)!important}

  /* Remove legacy page reservations. Floating chrome should not create black bars. */
  html,html body{min-height:100%;background:#090a0f!important}
  html body{padding-top:0!important;padding-bottom:0!important}
  html.asmbly-calendar-mobile-active body.asmbly-calendar-open{position:static!important;inset:auto!important;width:auto!important;height:auto!important;overflow:hidden!important}
  html body .asmbly-topbar.asmbly-topbar-reset{height:0!important;min-height:0!important;max-height:0!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important}

  /* Calendar owns the usable app viewport below the floating brand row and reaches the bottom edge. */
  html body #asmblyCalendarShell.asmbly-calendar-reset{
    position:fixed!important;
    inset:calc(var(--asmbly-mobile-brand-row) + env(safe-area-inset-top,0px)) 0 0!important;
    z-index:11000!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:56px 44px minmax(0,1fr)!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#090a0f!important;
    isolation:isolate!important
  }
  html body #asmblyCalendarShell.asmbly-calendar-reset[hidden],
  html body #asmblyCalendarShell.asmbly-calendar-reset[inert][aria-hidden="true"]{display:none!important}

  html body #asmblyCalendarShell .calendar-reset-topbar{
    grid-row:1!important;
    grid-template-columns:42px minmax(0,1fr) 52px 42px 50px!important;
    gap:6px!important;
    height:56px!important;
    padding:6px 10px!important;
    background:rgba(12,13,19,.96)!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
    box-shadow:none!important
  }
  html body #asmblyCalendarShell .calendar-reset-heading h2{font-size:19px!important;line-height:1!important}
  html body #asmblyCalendarShell .calendar-reset-nav{display:contents!important}
  html body #asmblyCalendarShell #asmblyCalendarResetPrev,
  html body #asmblyCalendarShell #asmblyCalendarResetNext,
  html body #asmblyCalendarShell #asmblyCalendarResetMore{display:none!important}
  html body #asmblyCalendarShell #asmblyCalendarResetToday{grid-column:3!important;width:52px!important;min-width:52px!important;padding:0!important}
  html body #asmblyCalendarShell #asmblyCalendarResetSearch{grid-column:4!important}
  html body #asmblyCalendarShell #asmblyCalendarResetAdd{grid-column:5!important;width:50px!important;padding:0!important}

  html body #asmblyCalendarShell .calendar-reset-modebar{
    grid-row:2!important;
    height:44px!important;
    padding:5px 10px!important;
    background:#0f1016!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important
  }
  html body #asmblyCalendarShell .calendar-reset-modebar button{height:34px!important;border-radius:13px!important}

  html body #asmblyCalendarShell .asmbly-calendar-workspace{
    grid-row:3!important;
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    background:#090a0f!important
  }
  html body #asmblyCalendarShell .calendar-canvas-panel{
    height:100%!important;
    min-height:0!important;
    display:block!important;
    overflow:hidden!important;
    background:#090a0f!important
  }
  html body #asmblyCalendarShell .calendar-canvas{
    display:block!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding:8px 8px calc(var(--asmbly-mobile-dock-clearance) + env(safe-area-inset-bottom,0px))!important;
    background:#090a0f!important;
    scroll-padding-bottom:calc(var(--asmbly-mobile-dock-clearance) + env(safe-area-inset-bottom,0px))!important
  }
  html body #asmblyCalendarShell .calendar-empty{min-height:100%!important;padding:26px 20px calc(var(--asmbly-mobile-dock-clearance) + 18px)!important;background:#090a0f!important}

  /* A real month grid. The old mobile UX hid this unconditionally. */
  html body #asmblyCalendarShell.is-month-primary .calendar-month-weekdays,
  html body #asmblyCalendarShell.is-month-primary .calendar-month-grid,
  html body #asmblyCalendarShell .calendar-month-weekdays,
  html body #asmblyCalendarShell .calendar-month-grid{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    width:100%!important;
    min-width:0!important
  }
  html body #asmblyCalendarShell .calendar-month-weekdays{
    position:sticky!important;
    top:-8px!important;
    z-index:3!important;
    padding:4px 0!important;
    background:#090a0f!important
  }
  html body #asmblyCalendarShell .calendar-month-weekdays span{padding:7px 1px!important;font-size:8px!important;text-align:center!important}
  html body #asmblyCalendarShell .calendar-month-day{
    min-width:0!important;
    min-height:72px!important;
    padding:5px!important;
    border:1px solid rgba(255,255,255,.07)!important;
    border-radius:0!important;
    background:rgba(255,255,255,.018)!important;
    overflow:hidden!important
  }
  html body #asmblyCalendarShell .calendar-month-day.other-month{opacity:.4!important}
  html body #asmblyCalendarShell .calendar-month-day.is-selected{outline:2px solid #63b3ff!important;outline-offset:-2px!important;background:rgba(99,179,255,.08)!important}
  html body #asmblyCalendarShell .calendar-month-signals{margin-top:6px!important;grid-template-columns:6px minmax(0,1fr)!important;gap:3px!important}
  html body #asmblyCalendarShell .calendar-month-signals i{width:6px!important;height:6px!important}
  html body #asmblyCalendarShell .calendar-month-signals span{font-size:7px!important}
  html body #asmblyCalendarShell .calendar-month-plan-preview,
  html body #asmblyCalendarShell .calendar-month-event-previews{display:none!important}

  /* Agenda fills the same viewport and never creates a permanent black footer. */
  html body #asmblyCalendarShell.is-events-primary .calendar-agenda{display:grid!important;gap:10px!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  html body #asmblyCalendarShell.is-events-primary .calendar-agenda>section{margin:0!important;padding:10px!important;border-radius:16px!important;background:rgba(255,255,255,.028)!important}

  /* Date detail is a deliberate sheet, not a retained full-screen takeover. */
  html body #asmblyCalendarResetSide{
    position:fixed!important;
    inset:auto 8px calc(var(--asmbly-mobile-dock-clearance) + env(safe-area-inset-bottom,0px)) 8px!important;
    z-index:12420!important;
    width:auto!important;
    height:min(68dvh,620px)!important;
    min-height:0!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:28px!important;
    background:#111219!important;
    box-shadow:0 28px 90px rgba(0,0,0,.68)!important;
    overflow:hidden!important;
    transform:translateY(calc(100% + 110px))!important;
    opacity:0!important;
    pointer-events:none!important;
    transition:transform .22s ease,opacity .18s ease!important
  }
  html body #asmblyCalendarResetSide.is-open{transform:translateY(0)!important;opacity:1!important;pointer-events:auto!important}
  html body #asmblyCalendarResetSide .calendar-day-explorer{height:100%!important;max-height:100%!important;border-radius:28px!important;overflow:auto!important;padding-bottom:18px!important}
  html body #asmblyCalendarResetDayBackdrop.is-open{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:12410!important;
    background:rgba(3,4,8,.56)!important;
    backdrop-filter:blur(5px)!important;
    -webkit-backdrop-filter:blur(5px)!important
  }

  /* Calendar discovery/search is an owned sheet above Calendar. */
  html body .asmbly-mobile-overlay-portal .calendar-discovery-panel.is-asmbly-portaled{
    position:fixed!important;
    inset:calc(var(--asmbly-mobile-brand-row) + env(safe-area-inset-top,0px) + 8px) 8px calc(var(--asmbly-mobile-dock-clearance) + env(safe-area-inset-bottom,0px)) 8px!important;
    z-index:12470!important;
    display:grid!important;
    width:auto!important;
    height:auto!important;
    max-height:none!important;
    padding:14px!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:26px!important;
    background:#111219!important;
    box-shadow:0 30px 100px rgba(0,0,0,.7)!important;
    transform:none!important;
    opacity:1!important;
    pointer-events:auto!important
  }

  /* Add-plan is a proper top-level overlay. */
  html body #asmblyCalendarItemModal{
    position:fixed!important;
    inset:0!important;
    z-index:13120!important;
    display:grid!important;
    align-items:end!important;
    padding:calc(12px + env(safe-area-inset-top,0px)) 8px calc(10px + env(safe-area-inset-bottom,0px))!important;
    background:rgba(3,4,8,.68)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;
    overflow:hidden!important
  }
  html body #asmblyCalendarItemModal[hidden]{display:none!important}
  html body #asmblyCalendarItemModal .calendar-modal-card{
    width:100%!important;
    max-width:540px!important;
    max-height:88dvh!important;
    margin:0 auto!important;
    overflow:auto!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:28px!important;
    background:#13141b!important;
    box-shadow:0 30px 110px rgba(0,0,0,.72)!important
  }
  html body.asmbly-calendar-item-overlay-open .asmbly-unified-mobile-dock{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

  /* Global Search must show an actual search control above Calendar, never blur alone. */
  html body .asmbly-unified-search-scrim{display:none}
  html body.asmbly-mobile-search-open .asmbly-unified-search-scrim{
    position:fixed!important;
    inset:0!important;
    z-index:12600!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:rgba(3,4,8,.67)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important
  }
  html body.asmbly-mobile-search-open .asmbly-search-wrap{
    position:fixed!important;
    z-index:12620!important;
    top:calc(8px + env(safe-area-inset-top,0px))!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    height:54px!important;
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    padding:5px!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:20px!important;
    background:#12131a!important;
    box-shadow:0 24px 90px rgba(0,0,0,.68)!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important
  }
  html body.asmbly-mobile-search-open .asmbly-search-wrap input{display:block!important;min-width:0!important;flex:1!important;color:#fff!important;background:transparent!important}
  html body.asmbly-mobile-search-open .asmbly-unified-mobile-brand,
  html body.asmbly-mobile-search-open .asmbly-unified-mobile-utilities{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

  /* Global floating dock remains above ordinary surfaces, but below owned modal overlays. */
  html body .asmbly-unified-mobile-dock{z-index:13000!important}
  html body .asmbly-unified-mobile-brand,
  html body .asmbly-unified-mobile-utilities{z-index:12910!important}

  /* One body-level portal owns Search, Calendar discovery, City & dates, and options. */
  html body .asmbly-mobile-overlay-portal{
    position:fixed!important;
    inset:0!important;
    z-index:12500!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    pointer-events:none!important
  }
  html body .asmbly-mobile-overlay-portal:not(.is-active){visibility:hidden!important}
  html body .asmbly-mobile-overlay-portal.is-active{visibility:visible!important}
  html body .asmbly-mobile-overlay-portal-scrim{
    position:absolute!important;
    inset:0!important;
    z-index:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    background:rgba(3,4,8,.64)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;
    pointer-events:auto!important
  }
  html body .asmbly-mobile-overlay-portal.is-calendar-picker .asmbly-mobile-overlay-portal-scrim{pointer-events:none!important;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  html body .asmbly-mobile-overlay-portal>.is-asmbly-portaled{pointer-events:auto!important}
  html body .asmbly-mobile-overlay-portal .calendar-discovery-panel.is-asmbly-portaled{z-index:20!important}
  html body .asmbly-mobile-overlay-portal #asmblyCalendarResetOptions.is-asmbly-portaled{position:fixed!important;inset:0!important;z-index:30!important;display:grid!important;pointer-events:auto!important}
  html body .asmbly-mobile-overlay-portal .calendar-mobile-picker-host.is-asmbly-portaled{z-index:40!important;pointer-events:none!important}
  html body .asmbly-mobile-overlay-portal .calendar-mobile-picker-host.is-asmbly-portaled[aria-hidden="false"]{pointer-events:auto!important}
  html body .asmbly-mobile-overlay-portal .calendar-mobile-picker-host.is-asmbly-portaled .calendar-mobile-picker-sheet{margin-bottom:calc(var(--asmbly-mobile-dock-clearance) + env(safe-area-inset-bottom,0px))!important}
  html body .asmbly-mobile-overlay-portal .asmbly-search-wrap.is-asmbly-portaled{z-index:50!important}

  /* The dock is authoritative chrome. Calendar and ordinary overlays sit behind it. */
  html body .asmbly-unified-mobile-dock{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:none!important}
  html body .asmbly-unified-mobile-dock .asmbly-unified-mobile-pill,
  html body .asmbly-unified-mobile-dock .asmbly-unified-mobile-plus{pointer-events:auto!important}

}

@media(max-width:390px){
  html body #asmblyCalendarShell .calendar-month-day{min-height:66px!important;padding:4px!important}
  html body #asmblyCalendarShell .calendar-month-signals span{display:none!important}
}
