#groupSheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--hub-bg, #000);
  display: grid;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

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

body.group-flow-open .credit-float,
body.group-flow-open .wa-bottom-nav { display: none !important; }

.group-flow {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.group-flow-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 10px;
}

.group-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.group-flow-titles {
  text-align: center;
  min-width: 0;
}

.group-flow-titles b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#groupPickCount {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.group-next {
  border: 0;
  border-radius: 10px;
  background: var(--crew-accent, var(--wa));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  min-width: 72px;
}

.group-next:disabled {
  opacity: 0.35;
}

#groupPickPane,
#groupNamePane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.group-flow-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--hub-card, #1c1c1e);
}

.group-flow-search svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}

.group-flow-search input {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  width: 100%;
  min-width: 0;
}

.group-flow-scroll-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.group-flow-scroll {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 16px;
}

.group-section-label {
  margin: 14px 16px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.group-letter {
  margin: 18px 16px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.group-card {
  margin: 0 14px 8px;
  background: var(--hub-card, #1c1c1e);
  border-radius: 14px;
  overflow: hidden;
}

.group-contact-row {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--hub-sep, rgba(255, 255, 255, 0.08));
  background: transparent;
  color: inherit;
  text-align: left;
}

.group-card .group-contact-row:first-child { border-top: 0; }

.group-contact-row .wa-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.group-contact-meta b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-contact-meta span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

.group-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  box-sizing: border-box;
}

.group-contact-row.is-picked .group-check {
  border-color: var(--wa);
  background: var(--wa);
  box-shadow: inset 0 0 0 3px var(--hub-card, #1c1c1e);
}

.group-alpha {
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 8px 2px;
  pointer-events: auto;
}

.group-alpha button {
  border: 0;
  background: transparent;
  color: var(--wa);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 4px;
  line-height: 1.1;
}

.group-flow-empty {
  margin: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.group-name-field {
  display: grid;
  gap: 8px;
  margin: 24px 16px;
}

.group-name-field span {
  font-size: 14px;
  color: var(--muted);
}

.group-name-field input {
  border-radius: 12px;
  background: var(--hub-card, #1c1c1e);
  padding: 14px 16px;
  font-size: 17px;
}
