:root {
  --auth-ink: #432d1b;
  --auth-muted: #76563a;
  --auth-green: #398f35;
  --auth-green-dark: #216b29;
  --auth-gold: #d69a45;
  --auth-line: #d8b875;
  --auth-paper: rgba(255, 247, 219, 0.985);
  --auth-danger: #b7473c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #6ea742;
}

body.farm-auth-shell {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: visible;
  color: var(--auth-ink);
  background: #6ea742;
  font-family:
    ui-rounded, "SF Pro Rounded", "Trebuchet MS", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

.farm-auth-page {
  position: relative;
  width: 100%;
  min-height: 100dvh;
}

.farm-auth-habitat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-height: 100dvh;
  padding: 64px clamp(72px, 10vw, 192px);
  overflow: hidden;
  isolation: isolate;
}

.farm-auth-world,
.farm-auth-identity,
.farm-auth-banner-media,
.farm-auth-banner-scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.farm-auth-world {
  z-index: 0;
  overflow: hidden;
  background: #82bd4d;
}
.farm-auth-banner-scene {
  object-fit: cover;
  object-position: center;
}

.farm-auth-foreground {
  display: none;
}

.farm-auth-workbench {
  position: relative;
  z-index: 2;
  width: clamp(420px, 22.5vw, 440px);
  min-width: 420px;
  min-height: 0;
  padding: 96px 36px 68px;
  border: 3px solid var(--auth-gold);
  border-radius: 40px;
  background-color: var(--auth-paper);
  background-image: url("/theme-assets/investasiku-farming/farming/branding/ranch-auth-panel-landscape-v1.webp");
  /* The source artwork has transparent pixels below the hills. Offset the
     bitmap so the painted ground, not the file box, locks to the card edge. */
  background-position: center calc(100% + 25px);
  background-size: calc(100% - 22px) auto;
  background-repeat: no-repeat;
  box-shadow:
    0 10px 0 #82502b,
    0 24px 50px rgba(41, 43, 21, 0.22),
    inset 0 0 0 3px rgba(255, 255, 255, 0.78);
}

.farm-auth-workbench::before {
  position: absolute;
  z-index: 0;
  inset: 9px;
  border: 1px solid rgba(192, 132, 57, 0.25);
  border-radius: 31px;
  content: "";
  pointer-events: none;
}

.farm-auth-workbench::after {
  content: none;
}

.farm-auth-card-brand {
  position: absolute;
  z-index: 3;
  top: -92px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(532px, calc(100% - 12px));
  aspect-ratio: 3 / 1;
  padding: 56px 52px 11px;
  background: url("/theme-assets/investasiku-farming/farming/branding/ranch-auth-panel-crown-v1.webp")
    center / contain no-repeat;
  transform: translateX(-50%);
  pointer-events: none;
}

.farm-auth-card-mark {
  display: none;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #f1c866;
  border-radius: 18px;
  background: #fff3c6;
  box-shadow:
    0 4px 0 #56301b,
    inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.farm-auth-card-mark img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}
.farm-auth-card-wordmark {
  display: block;
  width: min(410px, 94%);
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(56, 27, 10, 0.48));
}
.farm-auth-card-brand > strong {
  color: #fff2c7;
  font:
    900 42px/1 Georgia,
    serif;
  text-shadow: 0 4px 0 rgba(56, 27, 10, 0.48);
}

.farm-auth-heading {
  position: relative;
  z-index: 1;
  margin: 0 0 18px;
  padding: 0 4px 17px;
  border-bottom: 1px solid rgba(183, 123, 50, 0.3);
  text-align: center;
}

.farm-auth-heading-icon,
.farm-auth-heading small {
  display: none;
}
.farm-auth-heading strong {
  display: block;
  color: var(--auth-ink);
  font-family:
    "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", "Trebuchet MS",
    system-ui, sans-serif;
  font-size: clamp(27px, 1.62vw, 30px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.farm-auth-heading p {
  max-width: 400px;
  margin: 8px auto 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.38;
  text-wrap: balance;
}

.farm-auth-notice {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 2px 18px;
  padding: 11px 13px;
  border: 1px solid #d8ad61;
  border-radius: 15px;
  background: #fff0bd;
  color: #694822;
  font-size: 11px;
  font-weight: 800;
}

.farm-auth-panel {
  position: relative;
  z-index: 1;
  display: none;
}
.farm-auth-panel.is-active {
  display: block;
}
.farm-auth-panel form,
.farm-support-links {
  display: grid;
  gap: 11px;
}

.farm-auth-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.farm-auth-label {
  color: #5e432d;
  font-size: 13px;
  font-weight: 900;
}
.farm-auth-label small {
  margin-left: 4px;
  color: #8a7357;
  font-size: 9px;
  text-transform: none;
}
.farm-auth-field > small {
  color: #826d54;
  font-size: 9px;
  line-height: 1.3;
}
.farm-auth-trap {
  position: absolute !important;
  left: -10000px !important;
}
[data-auth-panel="login"] .farm-auth-field:not(.farm-auth-captcha-field) {
  gap: 0;
}

.farm-auth-field input,
.farm-phone-input,
.farm-password,
.farm-input-control {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 2px solid var(--auth-line);
  border-radius: 21px;
  outline: 0;
  background: rgba(255, 255, 250, 0.94);
  box-shadow:
    0 4px 10px rgba(103, 68, 27, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.8);
  color: #344f3a;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.farm-auth-field input {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
}
.farm-auth-field input::placeholder {
  color: #9e8b70;
  font-weight: 700;
}
.farm-auth-field input:focus,
.farm-phone-input:focus-within,
.farm-password:focus-within,
.farm-input-control:focus-within {
  border-color: var(--farm-brand, #4a9143);
  box-shadow:
    0 0 0 4px rgba(70, 143, 66, 0.15),
    0 4px 10px rgba(103, 68, 27, 0.06);
}
.farm-auth-field.is-valid .farm-input-control,
.farm-auth-field.is-valid .farm-phone-input,
.farm-auth-field.is-valid .farm-password {
  border-color: #62a457;
}
.farm-auth-field.is-invalid .farm-input-control,
.farm-auth-field.is-invalid .farm-phone-input,
.farm-auth-field.is-invalid .farm-password {
  border-color: var(--auth-danger);
  background: #fff7f2;
}

.farm-input-control {
  position: relative;
  display: block;
}
.farm-input-control > input {
  display: block;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.has-required-badge {
  position: relative;
}
.farm-required-badge {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 13px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid #fff4cd;
  border-radius: 50%;
  background: #d68a28;
  box-shadow: 0 1px 0 rgba(91, 54, 19, 0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.farm-input-control.has-required-badge > input,
.farm-phone-input.has-required-badge > input {
  padding-right: 43px;
}
.farm-auth-field input[name="username"],
.farm-auth-field input[name="password"],
.farm-auth-field input[name="confirm_password"],
.farm-auth-field input[name="referral_code"] {
  padding-left: 39px;
}

.farm-phone-input {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  overflow: hidden;
}
.farm-phone-input b {
  display: grid;
  place-items: center;
  border-right: 1px solid #ddbd7c;
  border-radius: 19px 0 0 19px;
  background: #f8e7af;
  color: #2d6239;
  font-size: 14px;
}
.farm-phone-input input {
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.farm-password {
  position: relative;
  overflow: hidden;
}
.farm-password input {
  height: 100%;
  padding-right: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.farm-password.has-required-badge input {
  padding-right: 88px;
}
.farm-password.has-required-badge .farm-required-badge {
  right: 65px;
}
.farm-password > button {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  width: 58px;
  height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid #ddbd7c;
  border-radius: 0 19px 19px 0;
  background: linear-gradient(180deg, #fae8b0, #efd38c);
  cursor: pointer;
}
.farm-password-eye {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
}
.farm-password-eye svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #52704e;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.farm-password button.is-visible .farm-password-eye::after {
  position: absolute;
  top: 2px;
  left: 11px;
  width: 2px;
  height: 22px;
  border-radius: 2px;
  background: #8c5630;
  content: "";
  transform: rotate(-43deg);
}

.farm-field-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-50%);
  pointer-events: none;
}
.farm-field-icon.is-user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536f55' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5.5 20c.4-4 2.7-6 6.5-6s6.1 2 6.5 6'/%3E%3C/svg%3E");
}
.farm-field-icon.is-lock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536f55' stroke-width='1.9' stroke-linecap='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='3'/%3E%3Cpath d='M8 10V7.5a4 4 0 0 1 8 0V10M12 14v2.5'/%3E%3C/svg%3E");
}
.farm-field-icon.is-referral {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536f55' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7.5A2.5 2.5 0 0 1 6.5 5H12l8 8-7 7-8-8V7.5Z'/%3E%3Ccircle cx='8.2' cy='9.2' r='1.2'/%3E%3C/svg%3E");
}
.farm-field-icon.is-verify {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23536f55' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5.5 5.7v5.5c0 4.1 2.6 7.7 6.5 9.8 3.9-2.1 6.5-5.7 6.5-9.8V5.7L12 3Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.farm-auth-button {
  display: grid;
  grid-template-columns: 1fr auto;
  place-items: center;
  width: 100%;
  min-height: 50px;
  padding: 9px 16px;
  border: 1px solid #276a2d;
  border-radius: 23px;
  background: linear-gradient(180deg, #62b94f, #36891f);
  box-shadow:
    0 5px 0 #21622a,
    inset 0 1px rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px rgba(25, 71, 31, 0.4);
  cursor: pointer;
}
.farm-auth-button b {
  font-size: 21px;
  line-height: 0.7;
}
.farm-auth-button:focus-visible {
  outline: 3px solid rgba(255, 207, 94, 0.8);
  outline-offset: 3px;
}
.farm-auth-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #21622a;
}
.farm-auth-button.is-secondary {
  grid-template-columns: 1fr;
  border-color: #ad7939;
  background: #fff1bd;
  box-shadow: 0 4px 0 #8b572e;
  color: #654528;
  text-shadow: none;
}

.farm-auth-link,
.farm-auth-switch button {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #277239;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.farm-auth-link {
  justify-self: end;
  margin-top: -3px;
}
.farm-auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0 0;
  color: #6d5238;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}
.farm-auth-switch::before,
.farm-auth-switch::after {
  flex: 1 1 54px;
  width: auto;
  max-width: 74px;
  height: 1px;
  background: rgba(183, 123, 50, 0.42);
  content: "";
}
[data-auth-panel="login"] .farm-auth-link {
  order: 5;
  justify-self: center;
  margin-top: -2px;
}
[data-auth-panel="login"] .farm-auth-button {
  order: 3;
}
[data-auth-panel="login"] .farm-auth-switch {
  order: 4;
}
[data-auth-panel="register"] .farm-auth-switch {
  gap: 8px;
  font-size: 12px;
}
[data-auth-panel="register"] .farm-auth-switch button {
  font-size: 13px;
}
[data-auth-panel="register"] .farm-auth-switch::before,
[data-auth-panel="register"] .farm-auth-switch::after {
  max-width: 30px;
}
.farm-register-label.is-wide {
  display: none;
}
.farm-register-label.is-compact {
  display: inline;
}

.farm-referral-field input {
  text-transform: uppercase;
}
.farm-referral-field input::placeholder {
  text-transform: none;
}
.farm-referral-field input[readonly] {
  background: #eef5dd;
  color: #3f6c43;
}
.farm-referral-feedback[data-state="valid"] {
  color: #367943;
}
.farm-referral-feedback[data-state="invalid"] {
  color: var(--auth-danger);
}
.farm-referral-feedback[data-state="checking"],
.farm-referral-feedback[data-state="warning"] {
  color: #91652c;
}
.farm-referral-feedback:empty,
.farm-referral-feedback[data-state="idle"] {
  display: none;
}
.farm-referral-invite {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #6fa160;
  border-radius: 16px;
  background: #eef7d8;
}
.farm-referral-invite > .game-icon {
  width: 40px;
  height: 40px;
}
.farm-referral-invite strong {
  display: block;
  font-size: 12px;
}
.farm-referral-invite small {
  display: block;
  margin-top: 3px;
  color: #677252;
  font-size: 9px;
}

.farm-captcha {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 7px;
}
.farm-captcha img {
  width: 108px;
  height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  background: #fff;
  object-fit: contain;
}
.farm-captcha .farm-input-control {
  height: 44px;
}
.farm-captcha input {
  height: 100%;
  padding-left: 34px;
  text-align: center;
  text-transform: uppercase;
}
.farm-captcha .farm-field-icon {
  left: 9px;
}
.farm-captcha button {
  width: 44px;
  height: 44px;
  border: 1px solid #b88342;
  border-radius: 13px;
  background: #f5dfa6;
  color: #66431f;
  font-size: 19px;
  cursor: pointer;
}

.farm-slider-captcha {
  display: grid;
  gap: 6px;
}
.farm-slider-track {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 52px;
  overflow: hidden;
  border: 2px solid #e0c58f;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf5 0 64%, #edf1cf 64%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.farm-slider-fill {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: var(--captcha-progress);
  background: linear-gradient(180deg, #d7edac, #93ce73);
  pointer-events: none;
}
.farm-slider-goal {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 13px;
  width: 23px;
  height: 23px;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%235a7a43' stroke-width='1.8'%3E%3Cpath d='M5 27V11l11-7 11 7v16M9 27V14h14v13M13 27v-8h6v8'/%3E%3C/svg%3E")
    center/contain no-repeat;
  transform: translateY(-50%);
}
.farm-slider-copy {
  position: relative;
  z-index: 2;
  padding-inline: 60px 50px;
  color: #705333;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}
.farm-slider-track input[type="range"] {
  position: absolute;
  z-index: 3;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background: transparent;
  box-shadow: none;
  appearance: none;
  cursor: grab;
}
.farm-slider-track:focus-within {
  box-shadow: 0 0 0 3px rgba(70, 143, 66, 0.16);
}
.farm-slider-track input[type="range"]::-webkit-slider-runnable-track {
  height: 100%;
  background: transparent;
}
.farm-slider-track input[type="range"]::-webkit-slider-thumb {
  width: 38px;
  height: 38px;
  margin-top: 0;
  border: 1px solid #99692f;
  border-radius: 12px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24'%3E%3Cpath d='m8 6 6 6-6 6M17 6l6 6-6 6' fill='none' stroke='%23663f1d' stroke-width='2.7'/%3E%3C/svg%3E")
      center/20px 16px no-repeat,
    linear-gradient(145deg, #fff4bd, #efc55f);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    0 2px 5px rgba(99, 60, 24, 0.2);
  appearance: none;
}
.farm-slider-track input[type="range"]::-moz-range-track {
  height: 100%;
  background: transparent;
}
.farm-slider-track input[type="range"]::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border: 1px solid #99692f;
  border-radius: 12px;
  background: #efc55f;
}
.farm-slider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 17px;
  padding-inline: 3px;
}
.farm-slider-meta > span {
  color: #756143;
  font-size: 9px;
  font-weight: 850;
}
.farm-slider-meta .farm-slider-help {
  margin: 0;
  font-size: 9px;
}
.farm-slider-captcha.is-verified .farm-slider-track {
  background: #e4f2ca;
  border-color: #6ca75d;
}
.farm-slider-captcha.is-verified .farm-slider-copy,
.farm-slider-captcha.is-verified .farm-slider-meta > span {
  color: #27683a;
}
.farm-slider-captcha.is-error .farm-slider-track {
  border-color: #ba6657;
}
.farm-slider-captcha.is-error .farm-slider-meta > span {
  color: #a33d32;
}

.farm-recovery-back {
  display: block;
  justify-self: auto;
  margin: 17px auto 0;
}

.farm-auth-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  padding: 12px;
  border: 1px solid #c99850;
  border-radius: 17px;
  background: #fff5cf;
  color: #665238;
}
.farm-recovery-scene > .game-icon {
  width: 40px;
  height: 40px;
}
.farm-recovery-scene strong {
  display: block;
  font-size: 13px;
}
.farm-recovery-scene p {
  margin: 5px 0 0;
  color: var(--auth-muted);
  font-size: 10px;
  line-height: 1.45;
}
.farm-recovery-warning {
  font-size: 10px;
  font-weight: 800;
}
.farm-auth-note-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: #d69c37;
  color: #fff;
}
.farm-auth-support {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid #c18d45;
  border-radius: 17px;
  background: #fff7d9;
  box-shadow: 0 3px 0 #aa7336;
  color: #36533d;
  text-decoration: none;
}
.farm-auth-support .game-icon {
  width: 34px;
  height: 34px;
}
.farm-auth-support strong {
  font-size: 11px;
}
.farm-auth-support b {
  font-size: 20px;
}

.farm-auth-public-links {
  position: fixed;
  z-index: 6;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 24px);
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 244, 208, 0.58);
  border-radius: 999px;
  background: rgba(42, 76, 39, 0.72);
  box-shadow: 0 5px 16px rgba(28, 47, 24, 0.2);
  color: #fff9dc;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(26, 39, 20, 0.55);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.farm-auth-public-links a {
  color: inherit;
  text-decoration: none;
}
.farm-auth-public-links a:hover,
.farm-auth-public-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.farm-auth-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  align-items: center;
  width: min(390px, calc(100% - 24px));
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #c89349;
  border-radius: 17px;
  background: #fff7d8;
  box-shadow:
    0 6px 0 #79502f,
    0 16px 34px rgba(28, 49, 29, 0.28);
  color: #5f462d;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.farm-auth-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.farm-auth-toast.is-hiding {
  opacity: 0;
  transform: translate(-50%, 10px);
}
.farm-auth-toast > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #478f49;
}
.farm-auth-toast.is-error > span {
  background: #b7483b;
}
.farm-auth-toast strong {
  font-size: 11px;
  line-height: 1.4;
}

@media (min-width: 900px) {
  .farm-auth-heading strong {
    font-size: 26px;
    white-space: nowrap;
    text-wrap: nowrap;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-habitat {
    align-items: flex-start;
    padding-block: 106px 64px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-workbench {
    min-height: 0;
    padding-bottom: 90px;
  }
  .farm-auth-public-links {
    top: auto;
    right: 0;
    bottom: 13px;
    left: 0;
    width: auto;
    max-width: none;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #fff9dc;
    font-size: 11px;
    font-weight: 850;
    text-shadow: 0 1px 3px rgba(40, 42, 19, 0.85);
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .farm-auth-page:not([data-auth-mode="login"]) .farm-auth-public-links {
    top: 12px;
    right: auto;
    bottom: auto;
    left: 14px;
    width: max-content;
    max-width: calc(100vw - 28px);
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 244, 208, 0.58);
    border-radius: 999px;
    background: rgba(42, 76, 39, 0.72);
    box-shadow: 0 5px 16px rgba(28, 47, 24, 0.2);
    font-size: 9px;
    line-height: 1;
    transform: none;
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
  }
}

@media (min-width: 900px) and (max-height: 900px) {
  .farm-auth-page[data-auth-mode="register"] .farm-auth-habitat {
    padding-block: 100px 12px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-workbench {
    padding-top: 60px;
    padding-bottom: 76px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-heading {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-panel form {
    gap: 10px;
  }
}

@media (min-width: 900px) and (max-width: 1500px) {
  .farm-register-label.is-wide {
    display: none;
  }
  .farm-register-label.is-compact {
    display: inline;
  }
}

@media (min-width: 900px) and (max-height: 760px) {
  .farm-auth-habitat {
    align-items: center;
    padding-block: 64px 10px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-workbench {
    padding-top: 75px;
    padding-bottom: 62px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-card-brand {
    top: -61px;
    width: min(420px, calc(100% - 60px));
    padding: 41px 36px 9px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-card-wordmark {
    width: min(340px, 94%);
    height: 70px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-heading {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-heading strong {
    font-size: 26px;
    white-space: nowrap;
    text-wrap: nowrap;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-heading p {
    max-width: 390px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-panel form,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-support-links {
    gap: 9px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-field input,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-phone-input,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-password,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-input-control {
    height: 46px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-button {
    min-height: 48px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-switch {
    margin-top: 10px;
  }
  .farm-auth-page:not([data-auth-mode="register"])
    [data-auth-panel="login"]
    .farm-auth-link {
    margin-top: 3px;
  }
  .farm-auth-public-links {
    top: 12px;
    right: auto;
    bottom: auto;
    left: 14px;
    width: max-content;
    max-width: calc(100vw - 28px);
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 244, 208, 0.58);
    border-radius: 999px;
    background: rgba(42, 76, 39, 0.72);
    box-shadow: 0 5px 16px rgba(28, 47, 24, 0.2);
    font-size: 9px;
    line-height: 1;
    transform: none;
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
  }
}

@media (min-width: 900px) and (max-height: 620px) {
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-heading {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-panel form,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-support-links {
    gap: 7px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-field input,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-phone-input,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-password,
  .farm-auth-page:not([data-auth-mode="register"]) .farm-input-control {
    height: 44px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-button {
    min-height: 46px;
  }
  .farm-auth-page:not([data-auth-mode="register"]) .farm-auth-switch {
    margin-top: 6px;
  }
  .farm-auth-page:not([data-auth-mode="register"])
    [data-auth-panel="login"]
    .farm-auth-link {
    margin-top: 0;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .farm-auth-habitat {
    align-items: center;
    justify-content: center;
    padding: 105px 26px;
  }
  .farm-auth-workbench {
    width: min(390px, 64vw);
    min-width: 360px;
    min-height: 0;
    padding: 60px 28px 50px;
    border-radius: 38px;
    background-position: center calc(100% + 19px);
    background-size: calc(100% - 18px) auto;
  }
  .farm-auth-card-brand {
    top: -84px;
    width: min(474px, calc(100% + 10px));
    padding: 52px 45px 10px;
  }
  .farm-auth-card-wordmark {
    width: min(360px, 94%);
    height: 75px;
  }
  .farm-auth-heading strong {
    font-size: 22px;
  }
  .farm-auth-heading p {
    max-width: 370px;
    font-size: 12px;
  }
  .farm-auth-field input,
  .farm-phone-input,
  .farm-password,
  .farm-input-control {
    height: 46px;
  }
  .farm-auth-button {
    min-height: 48px;
  }
  .farm-auth-switch {
    gap: 8px;
    font-size: 12px;
  }
  .farm-auth-switch button {
    font-size: 13px;
  }
  .farm-auth-switch::before,
  .farm-auth-switch::after {
    max-width: 45px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-habitat {
    align-items: center;
    padding-block: 108px;
  }
  .farm-auth-foreground {
    position: absolute;
    z-index: 3;
    bottom: -110px;
    left: 35%;
    display: block;
    width: min(640px, 94vw);
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-foreground {
    bottom: -180px;
  }
}

@media (max-width: 599px) {
  .farm-auth-habitat {
    align-items: center;
    justify-content: center;
    padding: 104px clamp(24px, 8.5vw, 38px);
  }
  .farm-auth-workbench {
    width: min(330px, 100%);
    min-width: 0;
    min-height: 0;
    padding: 69px 17px 58px;
    border-width: 2px;
    border-radius: 34px;
    background-position: center calc(100% + 10px);
    background-size: calc(100% - 16px) auto;
    box-shadow:
      0 7px 0 #82502b,
      0 18px 38px rgba(41, 43, 21, 0.23),
      inset 0 0 0 2px rgba(255, 255, 255, 0.76);
  }
  .farm-auth-workbench::before {
    inset: 7px;
    border-radius: 27px;
  }
  .farm-auth-card-brand {
    top: -61px;
    width: calc(100% + 12px);
    padding: 39px 33px 8px;
  }
  .farm-auth-card-wordmark {
    width: min(275px, 94%);
    height: 51px;
  }
  .farm-auth-card-brand > strong {
    font-size: 31px;
  }
  .farm-auth-heading {
    margin-bottom: 9px;
    padding-bottom: 10px;
  }
  .farm-auth-heading strong {
    font-size: clamp(21px, 5.9vw, 24px);
    line-height: 1.08;
  }
  .farm-auth-heading p {
    max-width: 285px;
    margin-top: 6px;
    font-size: 9.5px;
    line-height: 1.34;
  }
  .farm-auth-panel form,
  .farm-support-links {
    gap: 7px;
  }
  .farm-auth-field {
    gap: 3px;
  }
  .farm-auth-field input,
  .farm-phone-input,
  .farm-password,
  .farm-input-control {
    height: 44px;
    border-radius: 19px;
  }
  .farm-auth-field input {
    padding-block: 8px;
    font-size: 13px;
  }
  .farm-auth-label {
    font-size: 11px;
  }
  .farm-auth-field > small {
    font-size: 7px;
  }
  .farm-phone-input {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .farm-phone-input b {
    border-radius: 17px 0 0 17px;
    font-size: 13px;
  }
  .farm-password input {
    padding-right: 51px;
  }
  .farm-password > button {
    width: 51px;
    border-radius: 0 17px 17px 0;
  }
  .farm-password-eye {
    width: 20px;
    height: 20px;
  }
  .farm-auth-button {
    min-height: 46px;
    border-radius: 20px;
    font-size: 14px;
  }
  .farm-auth-button.is-secondary {
    border-radius: 20px;
  }
  .farm-auth-link,
  .farm-auth-switch button {
    font-size: 11px;
  }
  .farm-auth-switch {
    gap: 6px;
    margin-top: 8px;
    font-size: 10px;
  }
  .farm-auth-switch::before,
  .farm-auth-switch::after {
    display: block;
    flex-basis: 18px;
    max-width: 27px;
  }
  .farm-register-label.is-wide {
    display: none;
  }
  .farm-register-label.is-compact {
    display: inline;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-habitat {
    padding-block: 105px;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-workbench {
    padding-bottom: 58px;
  }
  .farm-auth-foreground {
    position: absolute;
    z-index: 3;
    bottom: -15px;
    left: 50%;
    display: block;
    width: min(520px, 113vw);
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
  }
  .farm-auth-page[data-auth-mode="register"] .farm-auth-foreground {
    bottom: -105px;
  }
  .farm-auth-page[data-auth-mode="forgot"] .farm-auth-foreground,
  .farm-auth-page[data-auth-mode="reset"] .farm-auth-foreground {
    bottom: -100px;
  }
}

@media (max-width: 359px) {
  .farm-auth-habitat {
    padding: 92px clamp(22px, 8vw, 28px) 64px;
  }
  .farm-auth-workbench {
    padding: 62px 15px 56px;
    margin-top: 25px;
  }
  .farm-auth-card-brand {
    top: -55px;
    width: calc(100% + 10px);
    padding: 35px 29px 7px;
  }
  .farm-auth-card-wordmark {
    width: 92%;
    height: 46px;
  }
  .farm-auth-heading strong {
    font-size: 20px;
  }
  .farm-auth-heading p {
    font-size: 8px;
  }
}

@media (max-width: 599px) and (max-height: 700px) {
  .farm-auth-habitat {
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 46px;
  }
  .farm-auth-workbench {
    padding-top: 65px;
    padding-bottom: 58px;
  }
  .farm-auth-card-brand {
    top: -56px;
    padding-top: 36px;
  }
  .farm-auth-card-wordmark {
    height: 65px;
  }
  .farm-auth-heading strong {
    font-size: 20px;
  }
  .farm-auth-heading p {
    font-size: 9px;
  }
  .farm-auth-field input,
  .farm-phone-input,
  .farm-password,
  .farm-input-control {
    height: 42px;
  }
  .farm-auth-button {
    min-height: 44px;
  }
  [data-auth-panel="login"] .farm-auth-link {
    margin-top: -1px;
  }
  .farm-auth-foreground {
    bottom: -30px;
  }
}

@media (max-width: 359px) and (max-height: 700px) {
  .farm-auth-habitat {
    padding-top: 75px;
    padding-bottom: 24px;
  }
  .farm-auth-card-brand {
    top: -52px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .farm-auth-field input:hover,
  .farm-phone-input:hover,
  .farm-password:hover,
  .farm-input-control:hover {
    border-color: #b77e39;
  }
  .farm-auth-button:hover {
    filter: brightness(1.04) saturate(1.04);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
