.group-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.group-nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.group-tagline {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(46, 203, 255, 0.45);
}

.chat-top-bar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.leader-tools-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 203, 255, 0.35);
  background: rgba(12, 18, 32, 0.85);
  color: #bae6fd;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.leader-tools-toggle:hover {
  background: rgba(46, 203, 255, 0.12);
  border-color: rgba(46, 203, 255, 0.55);
}

.leader-tools-toggle.is-open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.leader-tools-badge {
  min-width: 1.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fbbf24;
  color: #1a1200;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.leader-dock {
  margin: 0;
  padding: 0.75rem 0.8rem;
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(46, 203, 255, 0.28);
  border-top: none;
  background: linear-gradient(180deg, rgba(14, 28, 48, 0.95), rgba(10, 16, 28, 0.92));
}

.leader-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.dock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.dock-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: #bae6fd;
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.dock-requests {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dock-requests-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}

.dock-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(8, 10, 22, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.dock-request .name {
  font-weight: 600;
  color: #fff;
}

.dock-request .actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dock-request .btn-add,
.dock-request .btn-reject {
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.dock-request .btn-add {
  border: 0;
  background: #22c55e;
  color: #052e16;
}

.dock-request .btn-reject {
  background: transparent;
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

#inviteGroupContext,
#pendingInvitesList,
#pendingRequestsList,
#noOutgoingInvites,
#noPending {
  display: none !important;
}

.chat-invite-label {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.invite-form.chat-invite-form {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.invite-form.chat-invite-form .invite-search-wrap {
  flex: 1;
  min-width: 160px;
}

.invite-form.chat-invite-form button {
  align-self: center;
  margin: 0;
}

.chat-header .group-header-row {
  background: rgba(16, 18, 34, 0.72);
  border: 1px solid rgba(140, 160, 255, 0.2);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  backdrop-filter: blur(16px);
}

.chat-join-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(46, 203, 255, 0.35);
  background: rgba(46, 203, 255, 0.1);
}

.chat-join-bar p {
  margin: 0;
  font-size: 0.88rem;
  color: #e0f2fe;
}

.chat-join-bar .btn-request-inline {
  margin: 0;
  white-space: nowrap;
}

.muted-link {
  opacity: 0.75;
  font-weight: 500;
}

.pending-banner {
  margin: 0 0 0.75rem;
}

.btn-request-inline {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  color: #041018 !important;
  font-weight: 700;
  text-decoration: none !important;
}

.group-leader {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: #86efac;
}

.group-header-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 0.35rem;
}

.group-header-pic {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 191, 255, 0.25);
  background: #111;
}

.group-header-text {
  min-width: 0;
  flex: 1;
}

.group-header-text h1 {
  margin: 0;
}

.group-description {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.45;
  max-width: 40rem;
}

.pic-edit-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.pic-edit-url {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.45rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0f;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
}

.pic-edit-preview {
  margin: 0.55rem 0;
}

.pic-edit-preview img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.desc-edit-wrap {
  margin: 0.35rem 0 0;
}

.desc-edit-wrap label {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.desc-edit-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 4.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0f;
  color: #fff;
  font-size: 0.92rem;
  font-family: inherit;
  resize: vertical;
  margin: 0.35rem 0 0.5rem;
}

.request-join-wrap {
  margin-top: 0.75rem;
}

.members-section,
.owner-section {
  margin-bottom: 0;
  padding: 1.05rem;
  background: rgba(16, 18, 34, 0.72);
  border-radius: 16px;
  border: 1px solid rgba(140, 160, 255, 0.18);
}

.members-section h2,
.owner-section h2 {
  font-size: 1rem;
  color: #00bfff;
  margin-bottom: 0.5rem;
}

.members-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #0a0a0f;
  border-radius: 8px;
}

.member-name {
  font-weight: 500;
}

.role-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.role-tag.leader {
  background: rgba(0, 191, 255, 0.25);
  color: #00bfff;
}

.role-tag.member {
  background: rgba(255, 255, 255, 0.08);
  color: #bbb;
}

.msg-author {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.2rem;
}

.owner-hint {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: #0a0a0f;
  border-radius: 8px;
}

.pending-item .name {
  font-weight: 500;
}

.pending-item .actions {
  display: flex;
  gap: 0.5rem;
}

.pending-item button {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: none;
  font-size: 0.85rem;
  cursor: pointer;
}

.pending-item .btn-add {
  background: #00bfff;
  color: #fff;
}

.pending-item .btn-reject {
  background: transparent;
  color: #999;
  border: 1px solid #444;
}

.no-pending {
  font-size: 0.9rem;
  opacity: 0.8;
}

.meet-map {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  margin: 0.75rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.map-edit-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.map-edit-hint {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.map-edit-panel label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}

.map-edit-panel input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0f;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.map-edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.btn-map-primary,
.btn-map-secondary {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
}

.btn-map-primary {
  background: #00bfff;
  color: #fff;
}

.btn-map-primary:hover {
  background: #0099cc;
}

.btn-map-secondary {
  background: transparent;
  color: #00bfff;
  border: 1px solid #00bfff;
}

.btn-map-secondary:hover {
  background: rgba(0, 191, 255, 0.1);
}


.pick-place-banner {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 191, 255, 0.18);
  border-radius: 8px;
  font-size: 0.95rem;
  color: #fff;
}

.meet-photo-wrap {
  margin-bottom: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.meet-photo-wrap img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.meet-picker {
  margin-top: 1rem;
  text-align: left;
}

.meet-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.meet-tab {
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0a0a0f;
  color: #ccc;
  cursor: pointer;
  font-size: 0.85rem;
}

.meet-tab.active {
  background: #00bfff;
  border-color: #00bfff;
  color: #fff;
}

.meet-tab-panel label {
  display: block;
  font-size: 0.8rem;
  margin: 0.5rem 0 0.25rem;
  opacity: 0.9;
}

.meet-tab-panel input[type="text"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0f;
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.maps-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.maps-row input {
  flex: 1;
  margin-bottom: 0 !important;
}

.maps-row .btn-map-secondary,
.maps-row a.btn-map-secondary {
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.photo-places-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .photo-places-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.photo-place-card {
  display: flex;
  flex-direction: column;
  background: #0a0a0f;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-place-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.photo-place-body {
  padding: 0.65rem;
}

.photo-place-body h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: #fff;
}

.photo-place-body p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.55rem;
}

.photo-place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.photo-place-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.leader-meet-tools {
  margin-top: 0.85rem;
}

@media (max-width: 560px) {
  .photo-place-card {
    grid-template-columns: 1fr;
  }
  .photo-place-card img {
    width: 100%;
    height: 140px;
  }
  .photo-place-body {
    padding: 0.65rem;
  }
}

.invite-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
}

.invite-search-wrap {
  position: relative;
}

.invite-form input[type="search"],
.invite-form input[type="text"] {
  width: 100%;
  min-width: 160px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0a0a0f;
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.invite-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  max-height: 220px;
  overflow-y: auto;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.invite-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 0;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.92rem;
}

.invite-search-item:hover,
.invite-search-item:focus {
  background: rgba(56, 189, 248, 0.12);
}

.invite-search-item .muted {
  display: block;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.invite-search-empty {
  padding: 0.75rem;
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0;
}

.invite-picked {
  margin: 0;
  font-size: 0.9rem;
  color: #86efac;
}

.invite-form button {
  margin: 0;
  align-self: flex-start;
}

.invite-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.invite-status {
  font-size: 0.9rem;
  margin-top: 0.35rem;
  color: #7dd3fc;
}

.invite-status.error {
  color: #f87171;
}

.owner-subhead {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.invite-actions .btn-add,
.invite-actions .btn-reject {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}

.invite-actions .btn-add {
  background: #22c55e;
  color: #052e16;
}

.invite-actions .btn-reject {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
}

.meet-section {
  background: rgba(16, 18, 34, 0.45);
  border: 1px solid rgba(140, 160, 255, 0.18);
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.25rem;
}

.meet-head {
  margin-bottom: 0.85rem;
}

.meet-head h2 {
  margin-bottom: 0.2rem;
}

.meet-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.meet-lead {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: rgba(220, 225, 255, 0.65);
  line-height: 1.4;
}

.meet-facts {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.meet-fact span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 225, 255, 0.5);
  margin-bottom: 0.15rem;
}

.meet-fact .meet-city,
.meet-fact .meet-place,
.meet-fact .meet-address {
  margin: 0;
}

.meet-picker {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(140, 160, 255, 0.16);
}

/* Non-members: hide member-only UI even before JS finishes */
body.group-access-locked #meetSection,
body.group-access-locked #membersSection,
body.group-access-locked #ownerSection,
body.group-access-locked #leaderToolsToggle,
body.group-access-locked #chatInviteBar,
body.group-access-locked #chatForm,
body.group-access-locked #chatQuick {
  display: none !important;
}
