.member-entry {
  position: absolute;
  top: 18px;
  right: 30px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: 180px;
  padding: 4px 10px 4px 5px;
  color: #314f2d;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #fffdf4;
  border: 1px solid #b9cc8f;
  border-radius: 4px;
  cursor: pointer;
}

.member-entry:hover {
  color: #fffdf4;
  background: #527a43;
  border-color: #405f34;
}

.member-entry-mark {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: #fffdf4;
  background: #527a43;
  border-radius: 50%;
}

.member-entry-mark svg {
  display: block;
}

.member-entry:hover .member-entry-mark {
  color: #314f2d;
  background: #f0d181;
}

#member-entry-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.has-member-dialog {
  overflow: hidden;
}

.member-auth-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.member-auth-dialog[hidden] {
  display: none;
}

.member-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 48, 40, .48);
}

.member-auth-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: calc(100vh - 32px);
  padding: 24px;
  overflow-y: auto;
  color: #263028;
  background: #fffdf4;
  border: 1px solid #b9aa82;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(38, 48, 40, .24);
}

.member-auth-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #6a736b;
  font-size: 24px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.member-auth-heading span {
  color: #a66f20;
  font-size: 11px;
  font-weight: 900;
}

.member-auth-heading h2 {
  margin: 4px 44px 18px 0;
  font-size: 25px;
}

.member-auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #edf2e4;
  border: 1px solid #d5dec0;
  border-radius: 6px;
}

.member-auth-tabs button {
  min-height: 38px;
  padding: 6px;
  color: #53604e;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.member-auth-tabs button[aria-selected="true"] {
  color: #263028;
  background: #fffdf4;
  box-shadow: 0 1px 4px rgba(49, 79, 45, .12);
}

.member-auth-form {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.member-auth-form[hidden] {
  display: none;
}

.member-auth-form label {
  display: grid;
  gap: 6px;
  color: #45513f;
  font-size: 13px;
  font-weight: 800;
}

.member-auth-form input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: #263028;
  font: inherit;
  background: #fff;
  border: 1px solid #c9c1a9;
  border-radius: 4px;
}

.member-auth-form input:focus {
  outline: 3px solid rgba(193, 138, 53, .24);
  border-color: #a66f20;
}

.member-auth-form input[readonly] {
  color: #6a736b;
  background: #f0eee5;
}

.member-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: end;
  gap: 8px;
}

.member-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 146px;
  align-items: end;
  gap: 8px;
}

.member-captcha-refresh {
  width: 146px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  background: #f5f0df;
  border: 1px solid #c9c1a9;
  border-radius: 4px;
  cursor: pointer;
}

.member-captcha-refresh img {
  display: block;
  width: 146px;
  height: 52px;
}

.member-captcha-refresh:disabled {
  cursor: wait;
  opacity: .6;
}

.member-code-row button,
.member-primary-button {
  min-height: 42px;
  padding: 7px 12px;
  color: #fffdf4;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #527a43;
  border: 1px solid #405f34;
  border-radius: 4px;
  cursor: pointer;
}

.member-code-row button:disabled,
.member-primary-button:disabled {
  cursor: wait;
  opacity: .6;
}

.member-auth-message {
  min-height: 21px;
  margin: 14px 0 0;
  color: #527a43;
  font-size: 13px;
  font-weight: 700;
}

.member-auth-message.is-error {
  color: #b44a3c;
}

@media (max-width: 680px) {
  .member-entry {
    top: 14px;
    right: 18px;
    max-width: 132px;
  }

  .member-auth-dialog {
    align-items: end;
    padding: 0;
  }

  .member-auth-panel {
    width: 100%;
    max-height: 92vh;
    padding: 22px 16px max(18px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .member-code-row {
    grid-template-columns: minmax(0, 1fr) 106px;
  }

  .member-captcha-row {
    grid-template-columns: minmax(0, 1fr) 126px;
  }

  .member-captcha-refresh,
  .member-captcha-refresh img {
    width: 126px;
  }
}
