/* Launch Day Action Hub: fast mobile-first COMPASS access */
.compass-action-hub {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 2147483000;
  display: grid;
  justify-items: end;
  gap: 0.65rem;
  pointer-events: none;
}

.compass-action-button,
.compass-action-menu {
  pointer-events: auto;
}

.compass-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 56px;
  min-width: 56px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.92), rgba(246, 238, 221, 0.88)),
    linear-gradient(135deg, rgba(73, 47, 30, 0.92), rgba(132, 95, 58, 0.88));
  color: #2f2118;
  box-shadow: 0 18px 44px rgba(39, 28, 19, 0.28);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.compass-action-button img {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 999px;
  object-fit: cover;
}

.compass-action-button span {
  line-height: 1;
}

.compass-action-menu {
  display: grid;
  gap: 0.45rem;
  width: min(88vw, 19rem);
  padding: 0.75rem;
  border: 1px solid rgba(108, 78, 48, 0.22);
  border-radius: 1.15rem;
  background: rgba(255, 250, 240, 0.97);
  box-shadow: 0 24px 60px rgba(39, 28, 19, 0.28);
  backdrop-filter: blur(12px);
}

.compass-action-menu[hidden] {
  display: none !important;
}

.compass-action-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0.72rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.78);
  color: #3b2a1d;
  text-decoration: none;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(108, 78, 48, 0.08);
}

.compass-action-menu a::after {
  content: "\203A";
  font-size: 1.15rem;
  opacity: 0.7;
}

.compass-action-menu a.primary-action {
  background: linear-gradient(135deg, #4d321f, #8f663c);
  color: #fffaf0;
}

.compass-action-menu a:hover,
.compass-action-menu a:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(143, 102, 60, 0.34);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .compass-action-hub {
    right: 0.85rem;
    bottom: calc(0.85rem + env(safe-area-inset-bottom));
  }

  .compass-action-button {
    padding: 0.5rem 0.72rem;
    min-height: 58px;
  }

  .compass-action-button img {
    width: 40px;
    height: 40px;
  }

  .compass-action-button span {
    font-size: 0.76rem;
  }

  .compass-action-menu {
    width: min(92vw, 20rem);
  }
}


/* Launch Day homepage action strip */
.launch-action-strip {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(108, 78, 48, 0.16);
  border-radius: 1.25rem;
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 0 18px 46px rgba(65, 45, 28, 0.1);
  text-align: center;
}

.launch-action-strip h2 {
  margin: 0.2rem 0 0.85rem;
  font-size: clamp(1.35rem, 4vw, 2.2rem);
}

.launch-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.launch-action-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #3b2a1d;
  text-decoration: none;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(108, 78, 48, 0.12);
}

.launch-action-grid a.primary-action {
  background: linear-gradient(135deg, #4d321f, #8f663c);
  color: #fffaf0;
}

@media (max-width: 760px) {
  .launch-action-strip {
    margin-top: 0.75rem;
    width: min(94vw, 42rem);
  }

  .launch-action-grid {
    grid-template-columns: 1fr;
  }

  .launch-action-grid a {
    min-height: 50px;
  }
}


/* Scoped action-hub repair. Existing event handlers remain unchanged. */
.compass-action-hub,
.compass-action-hub * {
  box-sizing: border-box;
}

.compass-action-hub {
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

/* One visible launcher on pages that load this stylesheet. */
.mobile-compass-launcher,
.compass-floating-entry {
  display: none !important;
}

.compass-action-hub .compass-action-button {
  position: relative;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 8px;
  gap: 0;
}

.compass-action-hub .compass-action-button img {
  width: 40px;
  height: 40px;
  max-width: 100%;
  object-fit: contain;
}

/* Keep COMPASS available as the button's accessible name. */
.compass-action-hub .compass-action-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.compass-action-hub .compass-action-button:focus-visible {
  outline: 3px solid #2f7f7a;
  outline-offset: 4px;
}

.compass-action-hub .compass-action-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  margin: 0;
  width: min(20rem, calc(100vw - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - 7rem - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
  max-height: calc(100dvh - 7rem - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
}

.compass-action-hub .compass-action-menu a {
  justify-content: space-between;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .compass-action-hub *,
  .launch-action-grid a {
    transition: none;
  }
}