/* === Base Styles === */
/* Unified logo-tied system: one charcoal, one blue chrome, one green action, one cream ladder */
:root {
  --color-primary: #4a8bb5;
  --color-primary-dark: #3a7199;
  --color-primary-deep: #2d6a85;
  --color-primary-soft: rgba(74, 139, 181, 0.10);
  --color-accent: #5c9120;
  --color-accent-dark: #487f14;
  --color-accent-mid: #56851f;
  --color-accent-soft: rgba(92, 145, 32, 0.12);
  --color-ink: #04194d;
  --color-logo-blue: #2a3886;
  --color-gold: #dd7c05;
  --color-link: #3a7199;
  --color-nav-text: #f4f7fa;
  --color-nav-muted: #d7e0e8;
  /* Legacy: was cool nav gray misnamed as cream — keep as nav muted alias */
  --color-cream: #d7e0e8; /* legacy alias of --color-nav-muted */
  --color-cream-dark: #b0a391;
  --color-text: #2c3340;
  --color-text-muted: #5a6578;
  --color-border: #ded6ca;
  --color-border-strong: #c9bfb0;
  --color-page: #faf8f4;
  --color-page-mid: #f4efe7;
  --color-page-deep: #e9e2d6;
  --color-page-frost: #fffcf9;
  --color-shadow: rgba(44, 51, 64, 0.10);
  --color-shadow-md: rgba(44, 51, 64, 0.14);
  --color-focus-border: #4a8bb5;
  --color-focus-ring: rgba(74, 139, 181, 0.35);
  --color-danger: #b42318;
  --color-danger-bg: #c43c3c;
  --color-danger-bg-deep: #9f2d2d;
  --color-header-top: #5ba0c4;
  --color-header-mid: #4a8bb5;
  --color-header-bottom: #3a7199;

  --f2n-btn-font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f2n-btn-weight: 600;
  --f2n-btn-size: 0.9375rem;
  --f2n-btn-radius: 999px;
  --f2n-btn-pad: 0.7rem 1.35rem;
  --f2n-btn-primary-bg: linear-gradient(180deg, #5c9120 0%, #487f14 100%);
  --f2n-btn-primary-hover: linear-gradient(180deg, #56851f 0%, #3f6e12 100%);
  --f2n-btn-primary-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 6px 18px rgba(44, 51, 64, 0.12);
  --f2n-btn-primary-hover-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 22px rgba(44, 51, 64, 0.16);
  --f2n-btn-secondary-bg: #ffffff;
  --f2n-btn-secondary-color: #2c3340;
  --f2n-btn-secondary-border: 1px solid rgba(44, 51, 64, 0.18);
  --f2n-btn-danger-bg: linear-gradient(180deg, #c43c3c 0%, #9f2d2d 100%);

  --f2n-empty-border: 1.5px dashed rgba(74, 139, 181, 0.28);
  --f2n-empty-bg: rgba(255, 252, 248, 0.72);
  --f2n-empty-radius: 16px;
  --f2n-skel-base: rgba(74, 139, 181, 0.08);
  --f2n-skel-shine: rgba(255, 255, 255, 0.55);
}
input:focus, textarea:focus, select:focus {
  background-color: #ffffff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-focus-border, #4a8bb5);
  outline-offset: 1px;
}
html {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #ffffff;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  color: var(--color-text);
  user-select: none;
  -webkit-user-select: none;
}
input,
textarea,
select,
[contenteditable="true"] {
  user-select: text;
  -webkit-user-select: text;
}
button,
.menu a,
.menu a *,
[role="button"],
.profileMenuTrigger,
.profileMenuItem,
.mobileMenuButton,
.headerRight button,
.close {
  user-select: none;
  -webkit-user-select: none;
}


.header {
  width: 100%;
  background: linear-gradient(180deg, var(--color-header-top, #5ba0c4) 0%, var(--color-header-mid, #4a8bb5) 48%, var(--color-header-bottom, #3a7199) 100%);
  --f2n-header-height: 72px;
  
  --header-pad-x: 10px;
  --header-edge-gap: 20px;
  padding: 12px var(--header-pad-x);
  border-bottom: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  
  z-index: 1001;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 8px 22px rgba(42, 56, 134, 0.12);
}
.logoBorder {
  width: 52px;
  height: 52px;
  margin-left: var(--header-edge-gap);
  margin-right: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  background: #ffffff;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.menu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  transition: opacity .25s ease;
  z-index: 1;
  max-width: min(72vw, 720px);
  justify-content: center;
  pointer-events: none;
}
body.app-loading .menu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
body.app-loading .menu.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.menu a {
  pointer-events: auto;
  color: var(--color-nav-text, #f4f7fa);
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  padding: 8px 11px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.menu img {
  display: block;
  max-height: 34px;
  height: 34px;
  width: 34px;
  opacity: 0.96;
  filter: brightness(1.12) contrast(1.02);
}
.menu a:hover {
  background-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.menu a:hover img {
  opacity: 1;
  filter: brightness(1.18) contrast(1.04);
}
.menu a.active {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.menu a.active img {
  opacity: 1;
  filter: brightness(1.2) contrast(1.05);
}
.headerRight {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-right: var(--header-edge-gap);
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
  position: relative;
  z-index: 1002;
}
.headerRightContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.headerRight button {
  border: none;
  cursor: pointer;
  font-weight: normal;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}
.accountButton {
  display: none;
}

body.logged-out #userLogoutButton,
body.logged-out #mobileLogoutButton {
  display: none !important;
}
body.logged-out #userLoginButton.accountButton,
body.logged-out #userSignupButton.accountButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.logged-in #userLoginButton,
body.logged-in #userSignupButton,
body.logged-in #mobileLoginButton,
body.logged-in #mobileSignupButton {
  display: none !important;
}

body.logged-in #userLogoutButton.accountButton {
  display: none !important;
}
.accountButton img {
  display: block;
  max-height: 28px;
  height: 28px;
  width: 28px;
  padding: 4px;
  opacity: 0.95;
  filter: drop-shadow(0 1px 1px rgba(20, 45, 60, 0.18));
}
@media screen and (min-width: 768px) {
  #userLoginButton.accountButton img,
  #userSignupButton.accountButton img {
    max-height: 34px;
    height: 34px;
    width: 34px;
    padding: 0;
    opacity: 1;
  }
}
.bodySection {
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease;
  width: 100%;
  box-sizing: border-box;
}
.bodySection.visible {
  display: block;
  opacity: 1;
  visibility: visible;
}
/* Logged-out: keep only the homepage in document flow until JS selects another section. */
body.logged-out .bodySection {
  display: none;
}
body.logged-out #index.bodySection {
  display: block;
}
#index {
  margin-top: 0;
}
body.logged-in #index {
  margin-top: 12px;
}


body.logged-in .homeLandingMarketing {
  display: none !important;
}
.homeLanding {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
body.logged-out .homeLanding {
  --homeNavy: var(--color-text, #2c3340);
  --homeTeal: var(--color-accent, #5c9120);
  --homeTealDeep: var(--color-accent-dark, #487f14);
  --homeCream: #faf7f2;
  --homeGold: #dd7c05;
  --homeForest: #487f14;
  --homeBlue: #2a3886;
  background:
    radial-gradient(ellipse 95% 55% at 50% 38%, rgba(232, 210, 175, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 125% 82% at 50% -14%, rgba(255, 255, 255, 0.96) 0%, transparent 54%),
    radial-gradient(ellipse 72% 48% at 90% 10%, rgba(255, 236, 214, 0.42) 0%, transparent 44%),
    radial-gradient(ellipse 58% 42% at 6% 82%, rgba(245, 228, 210, 0.32) 0%, transparent 46%),
    linear-gradient(172deg, #fffefb 0%, #faf7f2 40%, #f3eee6 68%, #e9e2d6 100%);
  color: var(--color-text);
  padding-bottom: 24px;
  min-height: calc(100dvh - var(--f2n-header-height, 72px));
  box-sizing: border-box;
}
body.logged-out {
  background: linear-gradient(172deg, #fffefb 0%, #faf7f2 40%, #f3eee6 68%, #e9e2d6 100%);
  background-color: #e9e2d6;
}
body.logged-out #index {
  position: relative;
  z-index: 0;
  min-height: calc(100dvh - var(--f2n-header-height, 72px));
  background: transparent;
}
body.logged-out #index .homeLandingCta .mapAccountButtons {
  display: flex;
}
body.logged-out .homeLanding::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.48) 0%, transparent 10%),
    radial-gradient(circle at 76% 22%, rgba(212, 175, 110, 0.07) 0%, transparent 14%),
    radial-gradient(circle at 52% 92%, rgba(230, 215, 195, 0.28) 0%, transparent 38%);
  pointer-events: none;
  opacity: 0.58;
}
.homeLandingMarketing {
  --homeBlockGap: 22px;
  --homeTaglineToGlobeGap: 0px;
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 22px 20px;
  box-sizing: border-box;
}
.homeLandingHero {
  text-align: center;
  padding: 16px 20px 0;
  margin-bottom: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.homeLandingTitle {
  margin: 0 0 8px;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  letter-spacing: 0.1em;
  line-height: 1.18;
  text-transform: uppercase;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--homeNavy, #2c3340);
  text-shadow: none;
}
.homeLandingSubtitle {
  margin: 0 0 26px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.02rem, 2.25vw, 1.32rem);
  font-style: italic;
  font-weight: 400;
  color: var(--homeTeal, #5c9120);
  letter-spacing: 0.02em;
  line-height: 1.38;
}
.homeLandingTyped.bodyTitleHome {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #2f3a48;
  background: transparent !important;
  border: none !important;
  padding: 0 8px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  max-width: 36em;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.homeLandingTypedEmphasis {
  font-weight: 700;
  color: var(--homeNavy, #2c3340);
}
.homeLandingFeatures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin: 0 auto 40px;
  padding: 0 8px;
  max-width: 980px;
  text-align: left;
}
.homeFeatureCard {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  backdrop-filter: blur(16px) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 26px 22px 24px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 36px rgba(74, 139, 181, 0.06),
    0 2px 8px rgba(74, 139, 181, 0.04);
  box-sizing: border-box;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.homeFeatureCard:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 40px rgba(74, 139, 181, 0.1),
    0 4px 12px rgba(74, 139, 181, 0.06);
}
.homeFeatureCardIcon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-sizing: border-box;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 45, 86, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
}
.homeFeatureCardIcon svg {
  width: 36px;
  height: 36px;
  display: block;
}
.homeFeatureCardIconImg {
  background: transparent;
  padding: 0;
  overflow: hidden;
}
.homeFeatureCardIconImg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}
.homeFeatureCardTitle {
  margin: 0 0 10px;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--homeNavy, #2c3340);
  letter-spacing: 0.02em;
  line-height: 1.28;
}
.homeFeatureCardText {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.52;
  color: #4a5562;
  font-weight: 400;
}
.homeLandingCta {
  text-align: center;
  padding: 8px 20px 4px;
}
.homeLandingLegal {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #5c6678;
  position: relative;
  z-index: 2;
}
.homeLandingLegal a {
  color: #5c9120;
  text-decoration: none;
  pointer-events: auto;
}
.homeLandingLegal a:hover {
  text-decoration: underline;
}
.homeLandingCta .mapAccountButtons {
  margin-top: 0;
  margin-bottom: 4px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
@media screen and (max-width: 767px) {
  .homeLandingCta .mapAccountButtons {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: calc(100% - 32px);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    box-sizing: border-box;
  }
  .homeLandingCta .homeLandingCtaPrimary,
  .homeLandingCta .homeLandingCtaSecondary {
    font-size: 0.84rem !important;
    padding: 10px 14px !important;
    letter-spacing: 0.03em !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(50% - 5px);
    white-space: nowrap;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
}
.homeLandingCtaPrimary,
.homeLandingCtaSecondary,
.accountActionButton {
  font-family: var(--f2n-btn-font) !important;
  font-weight: var(--f2n-btn-weight) !important;
  font-size: var(--f2n-btn-size) !important;
  padding: var(--f2n-btn-pad) !important;
  border-radius: var(--f2n-btn-radius) !important;
  border: none !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease, border-color 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
  background: var(--f2n-btn-primary-bg) !important;
  color: #fff !important;
  box-shadow: var(--f2n-btn-primary-shadow) !important;
}
.homeLandingCtaPrimary img,
.homeLandingCtaSecondary img,
.accountActionButton img {
  height: 22px;
  width: 22px;
  display: block;
  flex-shrink: 0;
  opacity: 1;
}
@media screen and (min-width: 768px) {
  .homeLandingCtaPrimary img,
  .homeLandingCtaSecondary img {
    height: 28px;
    width: 28px;
  }
}
.homeLandingCtaPrimary span,
.homeLandingCtaSecondary span {
  display: inline-block;
  white-space: nowrap;
}
.homeLandingCtaPrimary:hover,
.homeLandingCtaSecondary:hover,
.accountActionButton:hover {
  background: var(--f2n-btn-primary-hover) !important;
  color: #fff !important;
  box-shadow: var(--f2n-btn-primary-hover-shadow) !important;
  transform: translateY(-1px);
}
.homeLandingBrand {
  margin: 18px 0 0;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--homeNavy, #2c3340);
}


.homeGlobe {
  display: none;
  position: relative;
}
body.logged-out .homeGlobe {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: calc(var(--homeTaglineToGlobeGap, 0px) - 14px);
  margin-bottom: var(--homeBlockGap, 18px);
  padding: 0 16px;
  min-height: 0;
  box-sizing: border-box;
  perspective: 1400px;
}
/* Avoid iOS WebKit OOM when signup/login lightbox opens over the spinning SVG. */
body.logged-out.f2n-account-lightbox-open .homeGlobe {
  visibility: hidden;
  pointer-events: none;
}
body.logged-out.f2n-account-lightbox-open .homeGlobeSvgWrap {
  filter: none;
}
@media screen and (min-width: 768px) {
  body.logged-out .homeGlobe {
    margin-top: calc(var(--homeTaglineToGlobeGap, 0px) - 30px);
  }
}
@media screen and (max-width: 767px) {
  body.logged-out .homeGlobe {
    margin-top: 22px;
  }
}
.homeGlobeSvgWrap {
  position: relative;
  width: 88vmin;
  height: 88vmin;
  max-width: 88vmin;
  max-height: 88vmin;
  transform: rotateX(18deg);
  transform-origin: center 55%;
  border-radius: 50%;
  filter:
    drop-shadow(0 2px 4px rgba(15, 35, 50, 0.05))
    drop-shadow(0 14px 32px rgba(15, 35, 50, 0.08))
    drop-shadow(0 28px 56px rgba(15, 35, 50, 0.06));
}
.homeGlobeSvgWrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    inset 0 10px 40px rgba(92, 145, 32, 0.06),
    inset 0 -20px 48px rgba(46, 98, 128, 0.1);
  z-index: 1;
}
.homeGlobeSvg {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.homeGlobePopup {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%) scale(0.92);
  min-width: 140px;
  max-width: 85%;
  padding: 11px 20px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px) saturate(1.02);
  backdrop-filter: blur(12px) saturate(1.02);
  color: #04194d;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(74, 139, 181, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 8px 24px rgba(4, 25, 77, 0.07);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.15s ease, transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
}
.homeGlobePopupText {
  display: block;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  letter-spacing: inherit;
  font-weight: 500;
}
.homeGlobePopup.homeGlobePopupVisible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
@media screen and (min-width: 768px) {
  body.logged-out .homeGlobeSvgWrap {
    max-width: 580px;
    max-height: 580px;
    width: 580px;
    height: 580px;
  }
}

#map {
  display: block;
  width: 100%;
  min-height: 480px;
  max-height: none;
  max-width: none;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(ellipse 95% 75% at 50% 48%, rgba(255, 254, 251, 0.96) 0%, transparent 58%),
    linear-gradient(178deg, #fffefb 0%, #f3eee6 36%, #e8f0f4 100%);
  box-sizing: border-box;
}
.mapMemoryBubble {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(74, 139, 181, 0.16);
  stroke-width: 0.65;
}
.mapMemoryBubbleCard {
  
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(74, 139, 181, 0.16);
}
.mapMemoryText {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  fill: #04194d;
}
.bodyTitle {
  font-size: 24px;
  padding: 20px;
  font-weight: bold;
  background-color: #ffffff;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text);
}
#index .homeLandingMarketing .bodyTitleHome {
  min-height: 3.75em;
  line-height: inherit;
  box-sizing: border-box;
  margin-bottom: 0;
}
#index .bodyTitleCursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--homeTeal, #3d8c14);
  margin-left: 3px;
  vertical-align: -0.02em;
  border-radius: 1px;
  animation: bodyTitle-cursor-blink 0.9s step-end infinite;
}
#index .bodyTitleHome.bodyTitleTyped .bodyTitleCursor {
  display: none;
}
@keyframes bodyTitle-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
body.app-loading .profileMenuTrigger:not(.visible),
body.app-loading .mobileMenu:not(.visible) {
  visibility: hidden !important;
  opacity: 0;
  pointer-events: none;
}
body.app-loading .profileMenuTrigger.visible {
  visibility: visible !important;
  opacity: 1;
  pointer-events: auto;
}
body.app-loading .mobileMenu.visible {
  visibility: visible !important;
  opacity: 1;
  pointer-events: auto;
}

.mobileMenu {
  display: none;
  position: relative;
  transition: opacity .2s ease;
}
.hamburger {
  font-size: 26px;
  background: none;
  border: none;
  color: var(--color-nav-text, #f4f7fa);
  cursor: pointer;
  padding: 10px;
}
.mobileDropdown {
  display: block;
  position: absolute;
  right: 0;
  top: 40px;
  background: rgba(255, 252, 248, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 12px 32px var(--color-shadow-md, rgba(44, 51, 64, 0.14));
  border-radius: 14px;
  z-index: 999;
}
.mobileDropdown a {
  display: block;
  color: var(--color-text, #2c3340);
  text-decoration: none;
  padding: 6px 8px;
  font-weight: normal;
  text-align: left;
}
.mobileDropdown a:hover {
  background-color: var(--color-primary-soft, rgba(74, 139, 181, 0.12));
  color: var(--color-text, #2c3340);
}

.mapAccountButtons {
  display: none;
  margin-top: 40px;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.accountActionButton:active {
  transform: scale(0.98);
}

.profileMenuDropdown {
  display: none;
  position: absolute;
  top: 56px;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 18px 40px var(--color-shadow-md, rgba(44, 51, 64, 0.14));
  
  z-index: 2147483000;
  overflow: hidden;
  pointer-events: auto;
  will-change: opacity, transform;
}
.profileMenuDropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 14px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  transform: rotate(45deg);
}
.profileMenuItem {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  font: inherit;
  color: var(--color-text, #2c3340);
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
}
.profileMenuItem:hover {
  background: var(--color-primary-soft);
}
.profileMenuItem:active {
  transform: translateY(1px);
}
.profileMenuItem:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 10px;
}
.profileMenuItem.danger {
  color: #ffffff;
  background: var(--f2n-btn-danger-bg, linear-gradient(180deg, #c43c3c 0%, #c43c3c 100%));
}
.profileMenuItem.danger:hover {
  background: linear-gradient(180deg, #d44c4c 0%, #b03434 100%);
  color: #ffffff;
}
.profileMenuItem .menuIcon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  display: inline-block;
}
#profileMenuView, #profileMenuView:visited, #profileMenuView:hover, #profileMenuView:focus {
  text-decoration: none;
}
#profileMenuView {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 10px;
}
#profileMenuView:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-border-strong);
}
#profileMenuViewName {
  padding: 2px 6px;
  border: 0;
  font-weight: 700;
}


#settingsMenuLink, #settingsMenuLink:visited, #settingsMenuLink:hover, #settingsMenuLink:focus,
#notificationsMenuLink, #notificationsMenuLink:visited, #notificationsMenuLink:hover, #notificationsMenuLink:focus,
#howtoMenuLink, #howtoMenuLink:visited, #howtoMenuLink:hover, #howtoMenuLink:focus {
  text-decoration: none;
}
#settingsMenuLink,
#notificationsMenuLink,
#howtoMenuLink {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-weight: 400;
  margin-bottom: 10px;
  
  background: rgba(189, 176, 158, 0.28);
  color: var(--color-text, #2c3340);
  justify-content: flex-start;
  gap: 10px;
}
#settingsMenuLink:hover,
#notificationsMenuLink:hover,
#howtoMenuLink:hover {
  background: rgba(189, 176, 158, 0.40);
  border-color: var(--color-border-strong);
}


#adminMenuLink, #adminMenuLink:visited, #adminMenuLink:hover, #adminMenuLink:focus {
  text-decoration: none;
}
#adminMenuLink {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-weight: 400;
  margin-bottom: 10px;
  background: rgba(175, 162, 145, 0.45);
  color: var(--color-text, #2c3340);
  justify-content: flex-start;
  gap: 10px;
}
#adminMenuLink:hover {
  background: rgba(175, 162, 145, 0.58);
  border-color: var(--color-border-strong);
}
#adminMenuLink i {
  margin-right: 8px;
  opacity: 0.9;
}


#notificationsMenuBadge.notificationsMenuBadge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #b00020;                 
  background: rgba(255, 0, 0, 0.14); 
  border: 1px solid rgba(176, 0, 32, 0.25);
}


#notificationsMenuBadge[hidden] {
  display: none !important;
}


.notificationsTriggerBadge {
  position: absolute;
  bottom: -2px;
  right: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #b00020;
  background: #ffcdd2;
  border: 1px solid rgba(176, 0, 32, 0.3);
  z-index: 3;
  pointer-events: none;
}
.notificationsTriggerBadge[hidden] {
  display: none !important;
}

.profileMenuTrigger {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
.profileMenuTrigger.visible {
  opacity: 1;
  visibility: visible;
}
.headerRight button.profileMenuTrigger {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  border-radius: 9999px !important;
  line-height: 0;
}
.profileMenuThumb {
  display: block;
  position: relative;
  z-index: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #fff;
  border: 2px solid #4a8bb5;
  box-sizing: border-box;
  transition: transform .15s ease;
  aspect-ratio: 1 / 1;
}
.headerRight .profileMenuTrigger:hover #profileMenuTriggerThumb {
  transform: scale(.98);
}
.headerRight .profileMenuTrigger:focus-visible #profileMenuTriggerThumb {
  outline: 2px solid var(--color-nav-text, #f4f7fa);
  outline-offset: 2px;
  border-radius: 50%;
}
@media screen and (min-width: 768px) {
  
  .headerRight button:not(.profileMenuTrigger) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: rgba(252, 250, 245, 0.96);
    padding: 8px 14px;
    min-height: 44px;
    min-width: 48px;
    border-radius: 8px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #5ba0c4 0%, var(--color-primary-dark, #3a7199) 48%, #3a7199 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 6px rgba(0, 0, 0, 0.18);
    font-weight: 500;
  }
  .headerRight button:not(.profileMenuTrigger):hover {
    background: linear-gradient(180deg, #356890 0%, #2f5f88 50%, #285278 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 3px 8px rgba(0, 0, 0, 0.2);
  }
  .headerRight button:not(.profileMenuTrigger):active {
    background: linear-gradient(180deg, #3a7199 0%, #3a7199 55%, #1f4568 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22) inset;
    transform: translateY(1px);
  }
  .headerRight button:not(.profileMenuTrigger):focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
  }
  body.logged-out #userLoginButton.accountButton,
  body.logged-out #userSignupButton.accountButton {
    display: inline-flex !important;
  }
}
#mobileProfileThumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  background-color: #fff;
  border: 2px solid #4a8bb5;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
}
#profileMenuTrigger {
  position: relative;
  overflow: visible;
  --badge: 14px;
  --badge-offset: -2px;
  --caret-size: 5px;
}
#profileMenuTrigger::after {
  content: "";
  position: absolute;
  right: var(--badge-offset);
  bottom: var(--badge-offset);
  width: var(--badge);
  height: var(--badge);
  border-radius: 50%;
  background: var(--color-primary-dark);
  border: 1px solid #ffffff;
  box-sizing: border-box;
  z-index: 1;
}
#profileMenuTrigger::before {
  content: "";
  position: absolute;
  right: calc(var(--badge-offset) + (var(--badge) / 2) - var(--caret-size));
  bottom: calc(var(--badge-offset) + (var(--badge) / 2) - ((var(--caret-size) + 1px) / 2));
  width: 0;
  height: 0;
  border-left: var(--caret-size) solid transparent;
  border-right: var(--caret-size) solid transparent;
  border-top: calc(var(--caret-size) + 1px) solid #ffffff;
  pointer-events: none;
  z-index: 2;
}
.profileMenuTrigger[aria-expanded="true"] #profileMenuTriggerThumb {
  transform: none !important;
}
#profileMenuThumb, #mobileProfileThumb {
  view-transition-name: none !important;
  contain: paint;
}
#mobileMenuDropdown #mobileProfileView {
  display: none;
}
#mobileMenuDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  height: auto;
  width: max-content;
  min-width: 200px;
  max-width: 280px;
  background: rgba(255, 252, 248, 0.96);
  color: var(--color-text, #2c3340);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 12px 32px var(--color-shadow-md, rgba(44, 51, 64, 0.14)),
    0 2px 8px rgba(74, 139, 181, 0.06);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  padding: 8px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2147483000;
}
#mobileMenuDropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#mobileMenuDropdown a,
#mobileMenuDropdown .mobileDropdown a {
  color: var(--color-text, #2c3340);
}
#mobileMenuBackdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}
#mobileMenuBackdrop.show {
  display: block;
}
#mobileMenuToggle {
  position: relative;
  z-index: 1000;
}

body.logged-out:not(.home-ready) #index {
  opacity: 0;
  visibility: hidden;
}
body.logged-out .accountActionButton {
  display: inline-flex;
}
body.logged-in .mapAccountButtons {
  display: none;
}
body.logged-in #profileMenuTrigger {
  display: inline-flex !important;
}
body.logged-out #profileMenuTrigger {
  display: none !important;
}
/* Logged-out homepage: keep profile chrome and account lightboxes out of document flow (prevents scroll jump on reload). */
body.logged-out #profileTopContainer {
  display: none !important;
}
body.logged-out .form {
  display: none !important;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
body.logged-out .form.f2n-account-form-open,
body.logged-out #userLoginForm.f2n-account-form-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.logged-out .header {
  position: relative;
  z-index: 9999;
}
body.logged-out .mobileMenu {
  position: relative;
  z-index: 10000;
}
.preHidden {
  opacity: 0;
  visibility: hidden;
}
.profileHeaderHideUntilLoaded {
  visibility: hidden !important;
  opacity: 0 !important;
  transition: none !important;
}

body.profile-switching-to-other .memoriesHeader,
body.profile-switching-to-other .memoriesSidebar,
body.profile-switching-to-other .memoriesSidebarDock,
body.profile-switching-to-other .memoriesSidebarCollapseBtn {
  visibility: hidden !important;
  opacity: 0 !important;
  transition: none !important;
  pointer-events: none !important;
}

body.profile-switching-to-other .memoriesSidebarDock,
body.profile-switching-to-other .memoriesSidebarCollapseBtn,
body.profile-sidebar-pending-for-other .memoriesHeader,
body.profile-sidebar-pending-for-other .memoriesSidebar,
body.profile-sidebar-pending-for-other .memoriesSidebarDock,
body.profile-sidebar-pending-for-other .memoriesSidebarCollapseBtn {
  display: none !important;
}

.memoriesHeader,
.memoriesSidebar,
#profileContent {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.preHidden.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .18s ease;
}
.imgLayer {
  border-radius: inherit;
}

@media screen and (max-width: 767px) {
  #index,
  body.logged-in #index {
    margin-top: 0 !important;
  }
  #index.bodySection,
  #index.bodySection.visible {
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
  }
  body.logged-out #index .homeLanding {
    padding-bottom: 0;
  }
  #index .homeLandingMarketing {
    padding-left: 0;
    padding-right: 0;
  }
  .bodySection:not(#index) {
    padding: 0 8px 24px;
    min-height: 50vh;
  }
  body.logged-out .homeGlobe {
    margin-top: 22px;
    margin-bottom: var(--homeBlockGap, 18px);
    padding: 0 8px;
  }
  body.logged-out #index .homeGlobe {
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
  }
  body.logged-out #index .homeLandingHero {
    padding-left: 0;
    padding-right: 0;
  }
  body.logged-out #index .homeLandingFeatures {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  body.logged-out #index .homeLandingCta {
    padding-left: 16px;
    padding-right: 16px;
  }
  body.logged-out .homeGlobeSvgWrap {
    width: 88vmin;
    height: 88vmin;
    max-width: 88vmin;
    max-height: 88vmin;
  }
  .header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    /* Clearance from logo/burger; icons spread only within the middle */
    --header-side-gap: 10px;
    --header-icon-gap: 6px;
    --header-edge-gap: 0px;
    --header-pad-x: 10px;
    padding: 10px max(var(--header-pad-x), env(safe-area-inset-right, 0px)) 10px max(var(--header-pad-x), env(safe-area-inset-left, 0px));
    gap: var(--header-side-gap);
    position: relative;
  }
  .logoBorder {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
    position: relative;
    z-index: 3;
  }
  .menu {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    gap: var(--header-icon-gap);
    overflow: hidden;
    white-space: nowrap;
    /* Spread icons across the middle band only (logo/burger stay outside this box) */
    justify-content: space-between;
    pointer-events: auto;
    padding: 0;
    box-sizing: border-box;
    z-index: 1;
  }
  .menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    white-space: nowrap;
    flex: 0 0 auto;
    border-radius: 8px;
  }
  .menu img {
    max-height: 28px;
    height: 28px;
    width: 28px;
    display: block;
  }
  .headerRight {
    position: relative;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: 0;
    z-index: 3;
    isolation: isolate;
  }
  .headerRightContainer {
    justify-content: center;
    flex-wrap: nowrap;
    gap: var(--header-side-gap);
  }
  .mobileMenu {
    margin: 0;
  }
  
  #mobileMenuToggle.hamburger {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    margin: 0;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: none;
    background: linear-gradient(180deg, #5ba0c4 0%, var(--color-primary-dark, #3a7199) 48%, #3a7199 100%);
    border-radius: 8px;
    color: rgba(252, 250, 245, 0.96);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }
  #mobileMenuToggle.hamburger:hover {
    background: linear-gradient(180deg, #356890 0%, #2f5f88 50%, #285278 100%);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 3px 8px rgba(0, 0, 0, 0.2);
  }
  #mobileMenuToggle.hamburger:active {
    background: linear-gradient(180deg, #3a7199 0%, #3a7199 55%, #1f4568 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22) inset;
  }
  #mobileMenuToggle.hamburger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.45);
    outline-offset: 2px;
  }
  .mobileMenu .mobileDropdown {
    top: calc(100% + 8px);
  }
  .headerRight button {
    padding: 10px 14px;
    font-size: 14px;
  }
  #userLoginButton, #userSignupButton, #userLogoutButton {
    display: none !important;
  }
  body.logged-out #index {
    margin-top: 0;
  }
  body.logged-out #index .bodyTitle.bodyTitleHome {
    padding-top: 0px;
    padding-bottom: 0;
  }
  #index .homeLandingMarketing .bodyTitleHome {
    min-height: 3.75em;
    margin-bottom: 0;
  }
  .mobileMenu {
    display: block;
  }
  
  body.logged-out #mobileMenuDropdown {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    min-width: 168px;
    max-width: min(200px, calc(100vw - 24px));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 12px 32px rgba(4, 25, 77, 0.14);
  }

  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0.6rem 1rem !important;
    font-family: var(--f2n-btn-font, "DM Sans", "Segoe UI", system-ui, sans-serif);
    font-weight: var(--f2n-btn-weight, 600);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: var(--f2n-btn-radius, 999px);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease, border-color 0.2s ease, color 0.2s ease;
  }
  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton {
    color: #fff !important;
    border: none !important;
    border-bottom: none !important;
    background: var(--f2n-btn-primary-bg, linear-gradient(180deg, #5c9120 0%, #487f14 100%));
    box-shadow: var(--f2n-btn-primary-shadow, 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 22px rgba(92, 145, 32, 0.22));
  }
  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton:hover,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton:hover {
    background: var(--f2n-btn-primary-hover, linear-gradient(180deg, #56851f 0%, #3f6e12 100%));
    box-shadow: var(--f2n-btn-primary-hover-shadow, 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 10px 26px rgba(72, 127, 20, 0.3));
  }
  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton:active,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton:active {
    background: var(--f2n-btn-primary-hover, linear-gradient(180deg, #56851f 0%, #3f6e12 100%));
    box-shadow: 0 1px 2px rgba(61, 102, 18, 0.25) inset;
    transform: scale(0.98);
  }
  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton img,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton img {
    max-height: 22px;
    height: 22px;
    width: 22px;
    display: block;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    opacity: 1;
  }
  body.logged-out #mobileMenuDropdown #mobileLoginButton.mobileMenuButton span,
  body.logged-out #mobileMenuDropdown #mobileSignupButton.mobileMenuButton span {
    display: inline-block;
    white-space: nowrap;
  }
  body.logged-out #mobileMenuDropdown #mobileLogoutButton {
    display: none !important;
  }
  body.logged-in #mobileMenuDropdown #mobileLoginButton,
  body.logged-in #mobileMenuDropdown #mobileSignupButton {
    display: none !important;
  }
  .mobileMenuButton {
    display: block;
    color: var(--color-text, #2c3340);
    text-decoration: none;
    padding: 12px 20px !important;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid rgba(74, 139, 181, 0.12);
    background-color: transparent;
    border-radius: 10px;
    font-size: 16px;
  }
  .mobileDropdown img {
    display: block;
    max-height: 30px;
    height: auto;
    width: auto;
    padding: 5px;
  }
  .mobileDropdown a {
    display: block;
    color: var(--color-text, #2c3340);
    text-decoration: none;
    padding: 10px 12px;
    font-weight: 500;
    text-align: left;
    border-bottom: 1px solid rgba(74, 139, 181, 0.1);
    border-radius: 10px;
  }
  .mobileDropdown a:hover {
    background-color: var(--color-primary-soft, rgba(74, 139, 181, 0.12));
    transform: none;
    transition: background 0.15s ease;
  }
  .mobileDropdown a.active {
    background-color: #1f485a;
  }
  .mobileDropdown a:last-child {
    border-bottom: none;
  }
  body.logged-in .mobileMenu {
    display: none !important;
  }
  body.logged-out .mobileMenu {
    display: block !important;
  }
  body.viewing-other-profile .mobileMenu {
    display: none !important;
  }
  body.profile-switching-to-other .mobileMenu {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.viewing-other-profile #mobileMenuToggle,
  body.viewing-other-profile #mobileMenuDropdown {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  
  body.logged-out.viewing-other-profile .mobileMenu,
  body.logged-out.viewing-other-profile #mobileMenuToggle {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  body.logged-out.viewing-other-profile #mobileMenuDropdown {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 8px;
    padding: 10px;
    min-width: 168px;
    max-width: min(200px, calc(100vw - 24px));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.97);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.9) inset,
      0 12px 32px rgba(4, 25, 77, 0.14);
    visibility: visible !important;
    pointer-events: auto !important;
  }
  #map {
    width: 100%;
    max-width: 960px;
    height: 350px;
    margin: 0 auto;
    overflow: auto;
  }
  .mapMemoryText {
    font-size: 8px;
  }
  .bodyTitle {
    font-size: 20px;
    padding: 15px;
  }
}

@media screen and (max-width: 900px) {
  .homeLandingFeatures {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .homeGlobeSvgWrap {
    transform: rotateX(18deg);
  }
  .homeGlobePopup {
    transition: none;
  }
  #profileMenuTrigger::after,
  #profileMenuTrigger::before {
    transition: none;
  }
  .preHidden.visible {
    transition: none;
  }
  .memoriesHeader,
  .memoriesSidebar,
  #profileContent {
    transition: none !important;
  }
  .bodySection {
    transition: none !important;
  }
  .mobileMenu {
    transition: none !important;
  }
  .headerRight .profileMenuTrigger:hover #profileMenuTriggerThumb {
    transition: none;
  }
  .homeFeatureCard {
    transition: none;
  }
  .homeFeatureCard:hover {
    transform: none;
  }
}


.charCountDisplay {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted, #5a6578);
  margin-top: 2px;
  text-align: right;
}
.charCountDisplay.charCountAtLimit {
  color: var(--color-text, #2c3340);
  font-weight: 600;
}

/* How-To Guides section (profile menu → How-To Guides); doc reader chrome in adminDesign.css */
#howto.howtoBodySection {
  min-height: 60vh;
  text-align: left;
  background: #f0f4f6;
  color: #2c3d47;
  padding-bottom: 48px;
  box-sizing: border-box;
}

#howto.howtoBodySection > .bodyTitle {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--color-text, #2c3340);
  margin: 0;
  padding: 20px 16px 12px;
  max-width: none;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

#howto .howtoMain {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 16px 60px;
  box-sizing: border-box;
}

#howto .howtoDocShell {
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-border, #ded6ca);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(74, 139, 181, 0.12);
  overflow: hidden;
}

#howto .adminHidden {
  display: none !important;
}

#howto .adminRefreshBtn {
  padding: 10px 16px;
  background: var(--color-primary, #4a8bb5);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: normal;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

#howto .adminRefreshBtn:hover {
  background: var(--color-primary-dark, #3a7199);
}

@media screen and (max-width: 767px) {
  #howto.howtoBodySection > .bodyTitle {
    padding: 16px 12px 10px;
  }

  #howto .howtoMain {
    padding: 0 12px 40px;
  }
}

/* Privacy Policy section (#privacy in index.php) */
#privacy.privacyBodySection,
#child-safety.privacyBodySection {
  text-align: left;
  min-height: 60vh;
  padding-bottom: 48px;
  box-sizing: border-box;
}

#privacy .legalLanding,
#child-safety .legalLanding {
  --homeNavy: var(--color-text, #2c3340);
  --homeTeal: var(--color-accent, #5c9120);
  --homeTealDeep: var(--color-accent-dark, #487f14);
  position: relative;
  min-height: calc(100vh - 72px);
  padding: 24px 16px 48px;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 95% 55% at 50% 38%, rgba(232, 210, 175, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 125% 82% at 50% -14%, rgba(255, 255, 255, 0.96) 0%, transparent 54%),
    radial-gradient(ellipse 72% 48% at 90% 10%, rgba(255, 236, 214, 0.42) 0%, transparent 44%),
    radial-gradient(ellipse 58% 42% at 6% 82%, rgba(245, 228, 210, 0.32) 0%, transparent 46%),
    linear-gradient(172deg, #fffefb 0%, #faf7f2 40%, #f3eee6 68%, #e9e2d6 100%);
}

#privacy .legalLanding::before,
#child-safety .legalLanding::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.48) 0%, transparent 10%),
    radial-gradient(circle at 76% 22%, rgba(212, 175, 110, 0.07) 0%, transparent 14%),
    radial-gradient(circle at 52% 92%, rgba(230, 215, 195, 0.28) 0%, transparent 38%);
  pointer-events: none;
  opacity: 0.58;
}

#privacy .legalMain,
#child-safety .legalMain {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 28px 24px 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(92, 145, 32, 0.14);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(74, 139, 181, 0.06);
  color: var(--color-text, #2c3340);
  line-height: 1.6;
  text-align: left;
}

#privacy .legalMain h1,
#child-safety .legalMain h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--homeNavy, #2c3340);
}

#privacy .legalMeta,
#child-safety .legalMeta {
  margin: 0 0 20px;
  color: #5c6678;
  font-size: 0.92rem;
}

#privacy .legalMain h2,
#child-safety .legalMain h2 {
  margin: 28px 0 10px;
  font-size: 1.12rem;
  color: #5c9120;
}

#privacy .legalMain p,
#privacy .legalMain ul,
#child-safety .legalMain p,
#child-safety .legalMain ul {
  margin: 0 0 14px;
  font-size: 0.98rem;
}

#privacy .legalMain ul,
#child-safety .legalMain ul {
  padding-left: 1.25rem;
}

#privacy .legalMain a,
#child-safety .legalMain a {
  color: #5c9120;
}

#privacy .legalMain,
#privacy .legalMain *,
#child-safety .legalMain,
#child-safety .legalMain * {
  user-select: text;
  -webkit-user-select: text;
}

#privacy .legalMain a:hover,
#child-safety .legalMain a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  #privacy .legalLanding,
  #child-safety .legalLanding {
    padding: 16px 12px 36px;
  }

  #privacy .legalMain,
  #child-safety .legalMain {
    padding: 20px 16px 24px;
  }
}


/* Shared empty states + skeleton shimmer (use across sections) */
.f2nEmptyState {
  border: var(--f2n-empty-border, 1.5px dashed rgba(74, 139, 181, 0.28));
  border-radius: var(--f2n-empty-radius, 16px);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--f2n-empty-bg, rgba(255, 252, 248, 0.72));
  color: var(--color-text, #2c3340);
  max-width: 480px;
  margin: 1.5rem auto;
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
}
.f2nEmptyState h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text, #2c3340);
}
.f2nEmptyState p {
  margin: 0;
  color: var(--color-text-muted, #5a6578);
  font-size: 0.92rem;
  line-height: 1.45;
}
.f2nSkel {
  display: block;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--f2n-skel-base, rgba(74, 139, 181, 0.08)) 0%,
    var(--f2n-skel-shine, rgba(255, 255, 255, 0.55)) 50%,
    var(--f2n-skel-base, rgba(74, 139, 181, 0.08)) 100%
  );
  background-size: 200% 100%;
  animation: f2nSkelShine 1.2s ease-in-out infinite;
}
@keyframes f2nSkelShine {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .f2nSkel { animation: none; }
}

/* Shared person picker cards (Ask Someone, Groups invite/search) */
.f2nPersonPickerList {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.f2nPersonPickerCard,
.accountForm button.f2nPersonPickerCard {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(44, 51, 64, 0.08);
  border-radius: 0;
  background: #ffffff;
  color: #1f2937;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  letter-spacing: normal;
  box-shadow: none;
  transition: background 0.15s ease;
  transform: none;
}

.f2nPersonPickerCard:last-child {
  border-bottom: 0;
}

.f2nPersonPickerCard:hover,
.f2nPersonPickerCard:focus-visible,
.accountForm button.f2nPersonPickerCard:hover,
.accountForm button.f2nPersonPickerCard:focus-visible {
  background: #f8fafc;
  color: #1f2937;
  box-shadow: none;
  outline: none;
  transform: none;
}

.f2nPersonPickerCardSelected,
.accountForm button.f2nPersonPickerCard.f2nPersonPickerCardSelected {
  background: #f3f6f9;
  color: #1f2937;
}

.f2nPersonPickerCardSelected:hover,
.f2nPersonPickerCardSelected:focus-visible,
.accountForm button.f2nPersonPickerCard.f2nPersonPickerCardSelected:hover,
.accountForm button.f2nPersonPickerCard.f2nPersonPickerCardSelected:focus-visible {
  background: #eef2f6;
  color: #1f2937;
}

.f2nPersonPickerAvatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eef3;
  border: 1px solid rgba(44, 51, 64, 0.08);
}

.f2nPersonPickerBody {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  flex: 1 1 auto;
}

.f2nPersonPickerName {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.f2nPersonPickerMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.f2nPersonPickerBadge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  background: #eef2f6;
  color: #4b5563;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.f2nPersonPickerCheck {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1.5px solid #1e4e78;
  background: #1e4e78;
  color: #fff;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.f2nPersonPickerCardSelected .f2nPersonPickerCheck {
  display: inline-flex;
}

.f2nPersonPickerEmpty {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.15rem 1rem;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.45;
}

.f2nPersonPickerEmpty strong {
  color: #374151;
  font-size: 0.94rem;
  font-weight: 600;
}

.groupPeopleResults,
#storyGuideAskResults {
  padding: 0;
  background: #ffffff;
  border: 1px solid rgba(44, 51, 64, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(44, 51, 64, 0.08);
  overflow-x: hidden;
  overflow-y: auto;
}
