[data-member-signup] form {
  display: grid;
  gap: .75rem;
  margin-block: .75rem;
}
[data-member-signup] form[hidden] {
  display: none;
}
[data-member-signup] label {
  display: grid;
  gap: .35rem;
}
[data-member-signup] label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
[data-member-signup] input:not([type="checkbox"]) {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
}
[data-member-signup] button {
  justify-self: start;
}

[data-member-signup] .sg-signup-phone {
  display: grid;
  gap: .35rem;
  min-width: 0;
}
.sg-phone-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: .5rem;
}
[data-member-signup] .sg-phone-row input,
[data-member-signup] .sg-phone-dialog input {
  font-size: 16px;
}
[data-member-signup] button.sg-phone-picker,
[data-member-signup] button.sg-phone-option,
[data-member-signup] button.sg-phone-close {
  box-sizing: border-box;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}
[data-member-signup] button.sg-phone-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: 0 .65rem;
  border: 1px solid #625867;
  border-radius: 9px;
  background: #17151e;
  color: #f2ebdc;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
[data-member-signup] button.sg-phone-picker:disabled {
  opacity: .65;
  cursor: default;
}
.sg-phone-flag {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #ffffff38;
}
.sg-phone-caret {
  width: .35rem;
  height: .35rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
[data-member-signup] dialog.sg-phone-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(400px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(.7rem, 3vw, 1rem);
  border: 1px solid #635767;
  border-radius: 14px;
  color: #f2ebdc;
  background: #201d29;
  overflow: auto;
}
.sg-phone-dialog::backdrop { background: rgb(0 0 0 / 66%); }
.sg-phone-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}
.sg-phone-dialog-header h4 {
  margin: 0;
  color: inherit;
  font-size: 1.05rem;
}
[data-member-signup] button.sg-phone-close {
  flex: 0 0 44px;
  padding: 0;
  width: 44px;
  color: #f2ebdc;
  background: transparent;
  border-color: transparent;
  font-size: 1.5rem;
}
[data-member-signup] .sg-phone-list {
  margin: .55rem 0 0;
  padding: .1rem .2rem;
  max-height: min(50dvh, 350px);
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
[data-member-signup] button.sg-phone-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .5rem;
  border: 1px solid transparent;
  border-radius: 7px;
  text-align: start;
  color: #f2ebdc;
  background: transparent;
}
.sg-phone-option span:last-child { color: #d3c5a6; }
[data-member-signup] button.sg-phone-option[aria-pressed="true"] {
  border-color: #6e5b3d;
  background: #332b34;
}
@media (hover: hover) {
  [data-member-signup] button.sg-phone-option:hover,
  [data-member-signup] button.sg-phone-close:hover {
    border-color: #6e5b3d;
    background: #332b34;
  }
}
[data-member-signup] .sg-phone-picker:focus-visible,
[data-member-signup] .sg-phone-dialog :is(button, input):focus-visible {
  outline: 2px solid #efcb76;
  outline-offset: 1px;
}
[data-member-signup] .sg-phone-empty:not([hidden]) {
  margin: .45rem .3rem;
  color: #d3c5a6;
}
