* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #f2eadc;
  color: #2f2418;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-card {
  width: min(100%, 26rem);
  padding: 1.25rem;
  background: #fffaf1;
  border: 1px solid #d6c6ae;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.profile-card {
  width: min(100%, 42rem);
}

.translator-card {
  width: min(100%, 64rem);
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.intro {
  margin: 0 0 1rem;
  color: #6f5a42;
  line-height: 1.45;
}

form {
  display: grid;
  gap: 0.8rem;
}

.turnstile-widget {
  min-height: 65px;
}

label {
  display: grid;
  gap: 0.25rem;
  font-weight: 700;
}

.profile-field {
  display: grid;
  gap: 0.25rem;
}

.profile-section {
  margin-top: 0.45rem;
  padding-top: 0.9rem;
  border-top: 1px solid #d6c6ae;
}

.profile-section h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.profile-section p {
  margin: 0;
}

.profile-section[hidden],
.member-type-fields[hidden] {
  display: none;
}

.member-type-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  border: 0;
  padding: 0;
}

.member-type-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3rem;
  border: 1px solid #d6c6ae;
  border-radius: 4px;
  padding: 0.65rem 0.7rem;
  background: #fffdf8;
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: #8a6a43;
  background: #ead8b8;
}

.radio-card input {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  width: auto;
}

@media (max-width: 520px) {
  .member-type-choice {
    grid-template-columns: 1fr;
  }
}

label a {
  font-weight: 700;
}

.field-help {
  color: #6f5a42;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.35;
}

input,
select,
button {
  border: 1px solid #d6c6ae;
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.location-picker,
.sangha-picker {
  display: grid;
  gap: 0.25rem;
  position: relative;
}

.location-suggestions,
.sangha-suggestions {
  display: grid;
  overflow: hidden;
  border: 1px solid #d6c6ae;
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 8px 20px rgba(47, 36, 24, 0.14);
}

.location-suggestion,
.sangha-suggestion {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eadfce;
  border-radius: 0;
  background: #fffdf8;
  color: #2f2418;
  text-align: left;
  font-weight: 600;
}

.location-suggestion:hover,
.location-suggestion:focus-visible,
.sangha-suggestion:hover,
.sangha-suggestion:focus-visible {
  background: #f2eadc;
  color: #2f2418;
}

.google-attribution {
  padding: 0.4rem 0.7rem;
  color: #6f5a42;
  font-size: 0.78rem;
  font-weight: 400;
  text-align: right;
}

.checkbox-label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 0.55rem;
  line-height: 1.2;
}

.checkbox-label input {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  width: auto;
  transform: translateY(0.02rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-note {
  margin: -0.2rem 0 0;
  color: #6f5a42;
  font-size: 0.9rem;
}

.secondary-link {
  color: #6b4b2a;
  font-weight: 700;
}

.auth-alt-actions {
  display: grid;
  gap: 0.55rem;
}

.secondary-button {
  background: #fffaf1;
  color: #6b4b2a;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: #f2eadc;
  color: #2f2418;
}

.link-button {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: #6b4b2a;
  text-align: left;
  text-decoration: underline;
}

.link-button:hover,
.link-button:focus-visible {
  background: transparent;
  color: #2f2418;
}

button {
  background: #8a6a43;
  color: #fff7e8;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

button:hover,
button:focus-visible {
  background: #6b4b2a;
}

.status {
  min-height: 1.2rem;
  color: #6f5a42;
}

.translator-toolbar,
.language-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.translator-toolbar label,
.language-form label {
  min-width: 10rem;
}

.button-link {
  display: inline-block;
  border: 1px solid #d6c6ae;
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  background: #8a6a43;
  color: #fff7e8;
  font-weight: 700;
  text-decoration: none;
}

.phrase-list {
  display: grid;
  gap: 0.75rem;
}

.phrase-card {
  display: grid;
  gap: 0.45rem;
  border: 1px solid #d6c6ae;
  border-radius: 6px;
  padding: 0.75rem;
  background: #fffdf8;
}

.phrase-heading,
.phrase-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.phrase-english {
  margin: 0;
  color: #6f5a42;
  line-height: 1.4;
}

.phrase-card textarea {
  width: 100%;
  min-height: 5rem;
  border: 1px solid #d6c6ae;
  border-radius: 4px;
  padding: 0.6rem;
  font: inherit;
}

.switch {
  margin: 1rem 0 0;
  text-align: center;
}

a {
  color: #6b4b2a;
  font-weight: 700;
}
