:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #39423c;
  --green: #075b30;
  --muted: #53685c;
  --line: #ccd8d0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(27, 58, 44, .43);
}
body.embedded { background: transparent; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #157748; outline-offset: 2px; }
a { color: var(--green); }
h2, p { margin: 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.auth-dialog {
  position: relative;
  width: min(100%, 540px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  border: 1px solid #e1e6e2;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -8px 40px #1439251c;
  scrollbar-width: thin;
}
.embedded .auth-dialog {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overscroll-behavior: contain;
  box-shadow: none;
}
.auth-dialog::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 50%;
  width: 40px;
  height: 5px;
  border-radius: 4px;
  background: #d1dadc;
  transform: translateX(-50%);
}
.modal-head { min-height: 42px; }
.close-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #f2f5f5;
  color: #6c7a7d;
}
.close-modal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-body { padding: 14px 25px max(26px, env(safe-area-inset-bottom)); }
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  margin: 0 auto 24px;
}
.project-logo { display: block; width: 230px; max-width: 74%; height: auto; }
.google-auth-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 10px 45px;
  border: 1px solid #cdd5d2;
  border-radius: 9px;
  background: #fff;
  color: #303c35;
  font: 500 17px/1.4 Arial, sans-serif;
}
.google-auth-button:hover { background: #f8faf9; }
.google-auth-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #64735f;
  font-size: 15px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e7ece1; }
.auth-form { display: grid; gap: 17px; }
.auth-field { display: grid; gap: 8px; min-width: 0; font-size: 15px; font-weight: 650; }
.auth-field input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f0f5f2;
  color: #1d3024;
  font-size: 16px;
  font-weight: 450;
}
.auth-field input::placeholder { color: #64766b; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px; }
.password-toggle, .auth-forgot, .auth-switch button {
  border: 0;
  background: none;
  color: var(--green);
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-height: 36px;
  padding: 4px 5px;
  color: #526b5b;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-50%);
}
.auth-forgot { justify-self: end; padding: 0; text-align: right; font-size: 15px; font-weight: 700; }
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}
.auth-submit:hover { background: #064a28; }
.auth-note, #signed-in-email, section > p:not([class]) { color: var(--muted); overflow-wrap: anywhere; }
.auth-note { font-size: 12px; text-align: center; }
.auth-switch {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 22px 0 4px;
  text-align: center;
  font-size: 16px;
}
.auth-switch button { padding: 0; font-weight: 750; }
.auth-alternative { margin-top: 12px; font-size: 13px; }
.auth-browse {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 15px;
  border-top: 1px solid #edf0f3;
  font-size: 13px;
  text-decoration: none;
}
.auth-browse:hover { text-decoration: underline; }
section h2 { margin-bottom: 6px; font-size: 21px; }
section > h2 ~ .auth-form, #signed-in .continue { margin-top: 16px; }
#status:not(:empty) {
  margin-bottom: 16px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #edf6ef;
  color: #204d36;
  font-size: 14px;
}
#status[data-kind="error"]:not(:empty) { background: #fff1ee; color: #833225; }
#signup .auth-form { gap: 12px; }
.auth-dialog[data-mode="signup"] .auth-brand { margin-bottom: 14px; }
.auth-dialog[data-mode="signup"] .auth-divider { margin: 14px 0; }
@media (max-width: 360px) {
  .modal-body { padding: 8px 18px max(22px, env(safe-area-inset-bottom)); }
  .auth-brand { min-height: 65px; margin-bottom: 20px; }
  .project-logo { width: 195px; }
  .auth-switch { font-size: 14px; }
}
