.community-join-trigger {
  position: fixed;
  z-index: 45;
  right: env(safe-area-inset-right);
  bottom: calc(32px + env(safe-area-inset-bottom));
  display: grid;
  width: 64px;
  min-height: 64px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: 0;
  border-radius: 13px 0 0 13px;
  background: #087e47;
  color: #fff;
  box-shadow: 0 5px 18px rgba(8, 85, 49, .2);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

.community-join-trigger svg { width: 23px; height: 23px; }
.community-join-trigger:hover { background: #07683c; }
.community-join-link:hover { background: var(--app-primary-hover, #6f492f); color: #fff; }

.community-join-dialog {
  box-sizing: border-box;
  width: min(368px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--app-border, #e0e2d9);
  border-radius: 16px;
  background: var(--app-surface, #fffefa);
  color: var(--app-text, #292d27);
  box-shadow: 0 20px 64px rgba(41, 45, 39, .26);
  font: inherit;
}

.community-join-dialog::backdrop { background: rgba(29, 35, 29, .5); }

.community-join-card {
  position: relative;
  padding: 26px 24px 24px;
  text-align: center;
}

.community-join-card h2 { margin: 3px 30px 6px; font-size: 24px; font-weight: 650; line-height: 1.3; }
.community-join-card p { margin: 0 0 16px; color: var(--app-muted, #6f756d); font-size: 13px; line-height: 1.6; }

.community-join-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--app-muted, #6f756d);
  font: 400 24px/1 sans-serif;
  cursor: pointer;
}

.community-join-close:hover { background: var(--app-surface-raised, #eeede5); color: var(--app-text, #292d27); }

.community-join-qr {
  display: block;
  width: min(100%, 256px);
  height: auto;
  margin: 0 auto 18px;
  border: 1px solid var(--app-border, #e0e2d9);
  border-radius: 10px;
  background: #fff;
}

.community-join-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 7px;
  background: var(--app-primary, #855a3c);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.community-join-trigger:focus-visible,
.community-join-close:focus-visible,
.community-join-link:focus-visible { outline: 2px solid var(--app-primary-hover, #6f492f); outline-offset: 3px; }

@media (max-width: 760px) {
  :root:has(.public-header-shell) { scrollbar-gutter: auto; }
  .community-join-trigger {
    bottom: calc(22px + env(safe-area-inset-bottom));
    width: 52px;
    min-height: 56px;
  }
  body:has(.landing-mobile-dock) .community-join-trigger,
  body:not(.mobile-input-active):has(.mobile-console-nav) .community-join-trigger { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
