:root {
  color-scheme: light;
  --red: #d71935;
  --red-dark: #b90f29;
  --orange: #ff861b;
  --ink: #202630;
  --muted: #697386;
  --line: #d6dbe4;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  min-width: 320px;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  background: #fff;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: #123d24;
  overflow-anchor: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    url("/web/roosterland-grass-background.webp") center / cover no-repeat;
  filter: saturate(1.2) contrast(1.04);
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 16% 12%, rgba(132, 205, 91, 0.25), transparent 31rem),
    radial-gradient(circle at 86% 45%, rgba(2, 39, 22, 0.58), transparent 34rem),
    linear-gradient(
      115deg,
      rgba(25, 104, 54, 0.7) 0%,
      rgba(15, 83, 45, 0.8) 48%,
      rgba(5, 43, 25, 0.92) 100%
    );
}

button,
input,
select {
  font: inherit;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m6 8 4 4 4-4' stroke='%234b5b51' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

input[type="date"] {
  min-width: 0;
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0.72;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  flex: 1 0 auto;
  width: min(1400px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: 44px 52px 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 560px);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
}

.intro {
  position: relative;
  align-self: start;
  max-width: 660px;
  margin-top: 24px;
  color: #fff;
}

.hero-logo {
  display: block;
  width: 245px;
  height: 160px;
  margin: -34px 0 34px -25px;
  overflow: hidden;
}

.hero-logo img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-34px);
  filter: drop-shadow(0 8px 18px rgba(82, 0, 11, 0.22));
}

.intro h1 {
  max-width: 610px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 4vw, 62px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 18px rgba(84, 0, 12, 0.22);
}

.intro-copy {
  max-width: 590px;
  margin: 22px 0 32px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.55;
}

.feature-list {
  display: grid;
  gap: 18px;
}

.feature {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(8px);
}

.app-fa { display: block; flex: 0 0 auto; line-height: 1; }
.feature-icon > i,
.mobile-community-icon > i { font-size: 21px; }

.feature strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 16px;
}

.feature p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.4;
}

.access {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  overflow-anchor: none;
}

.auth-view {
  position: relative;
  grid-area: 1 / 1;
  width: 100%;
}

.auth-view.is-leaving {
  z-index: 2;
  pointer-events: none;
}

.auth-view.is-entering {
  z-index: 1;
}

.auth-view.is-leaving .card,
.auth-view.is-entering .card {
  will-change: transform, opacity;
}

.card {
  width: 100%;
  padding: 48px 50px 46px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 28px 70px rgba(3, 37, 20, 0.28),
    0 4px 14px rgba(3, 37, 20, 0.12);
}

.card-heading {
  margin-bottom: 30px;
  text-align: center;
}

.card-heading h2,
.view-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.card-heading p,
.view-title p {
  margin: 10px 0 0;
  color: #515a6b;
  font-size: 14px;
  line-height: 1.45;
}

.inline-link {
  color: var(--red);
  font-weight: 700;
}

.inline-link:hover {
  text-decoration: underline;
}

.facade-form {
  display: grid;
  gap: 12px;
}

.facade-form label,
.select-label {
  display: grid;
  gap: 8px;
  margin-top: 5px;
  color: #2f3744;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #fbfcfe;
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

input::placeholder {
  color: #949dab;
}

input:focus,
select:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(215, 25, 53, 0.12);
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  padding-right: 58px;
}

.show-password {
  position: absolute;
  right: 9px;
  top: 8px;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b94a2;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.show-password > i { margin: auto; font-size: 17px; }

.show-password:hover {
  background: #fff0f2;
  color: var(--red);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 5px;
  font-size: 13px;
}

.remember {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  margin: 0 !important;
  color: #4a5362 !important;
  font-weight: 500 !important;
  cursor: pointer;
}

.remember input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.primary {
  min-height: 51px;
  margin-top: 7px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, #e32643, #c8112d);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(201, 17, 45, 0.17);
  transition:
    transform 100ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.primary:hover {
  filter: brightness(0.96);
  box-shadow: 0 9px 20px rgba(201, 17, 45, 0.23);
}

.primary:active {
  transform: translateY(1px);
}

.primary:disabled {
  cursor: wait;
  filter: grayscale(0.12);
  opacity: 0.72;
  transform: none;
}

.form-error {
  min-height: 0;
  margin: 0;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.form-error:not(:empty) {
  margin-top: 2px;
}

.verification-card { text-align: center; }
.verification-mark { display: grid; width: 66px; height: 66px; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #e9f4ec; color: #1d6b3a; font-size: 27px; }
.verification-code { font-size: 25px; font-weight: 750; letter-spacing: .42em; text-align: center; }
.text-button { display: block; margin: 16px auto 0; padding: 7px; border: 0; background: transparent; color: var(--red); font-size: 13px; font-weight: 700; cursor: pointer; }
.muted-button { margin-top: 4px; color: var(--muted); font-weight: 550; }

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 27px 0 22px;
  color: #596273;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e1e4e9;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.social-button {
  min-height: 48px;
  border: 1px solid #d7dce4;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 100ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.social-button:hover {
  border-color: #aeb5c1;
  background: #f9fafc;
}

.social-button:active {
  transform: translateY(1px);
}

.social-button svg {
  display: block;
  width: 23px;
  height: 23px;
  margin: auto;
}

.social-button .apple-mark {
  width: 21px;
  height: 24px;
  fill: #0b0b0d;
}

.oauth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 21px 0 16px;
  color: #737b87;
  font-size: 12px;
  font-weight: 600;
}

.oauth-separator::before,
.oauth-separator::after {
  height: 1px;
  flex: 1;
  background: #e3e6eb;
  content: "";
}

.oauth-separator-register {
  margin: 18px 0 16px;
}

.oauth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oauth-button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #d8dde5;
  border-radius: 10px;
  background: #fff;
  color: #303743;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(18, 28, 22, .03);
  transition: border-color 150ms ease, background 150ms ease, transform 100ms ease;
}

.oauth-button:hover {
  border-color: #aeb6c2;
  background: #f9fafb;
}

.oauth-button:active {
  transform: translateY(1px);
}

.oauth-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.oauth-button.is-disabled {
  cursor: not-allowed;
  opacity: .52;
  filter: grayscale(.18);
}

.oauth-button.is-disabled:active {
  transform: none;
}

.oauth-status {
  min-height: 0;
  margin: 9px 0 0;
  color: #69717e;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.oauth-status:empty {
  display: none;
}

.hidden {
  display: none !important;
}

@media (min-width: 881px) {
  .access {
    min-height: 604px;
    align-items: center;
  }
}

.form-card {
  padding: 34px 42px 36px;
}

.view-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 21px;
  padding-bottom: 17px;
  border-bottom: 1px solid #e5e8ed;
}

.view-title h2 {
  font-size: 27px;
}

.close-link {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #e0e3e8;
  border-radius: 50%;
  background: #f6f7f9;
  color: #505968;
}

.close-link > i { font-size: 17px; }

.close-link:hover {
  background: #eceff3;
}

.register-grid {
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 11px;
}

.register-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  color: #5e6a61;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.register-section::after {
  height: 1px;
  flex: 1;
  background: #e3e8e4;
  content: "";
}

.span-two {
  grid-column: 1 / -1;
}

.legal {
  margin: 1px 0 0;
  color: #6c7583;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.text-link {
  display: block;
  width: fit-content;
  margin: 17px auto 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.recovery-copy {
  margin: 0 0 18px;
  color: #606979;
  font-size: 14px;
  line-height: 1.5;
}

.mobile-community {
  display: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 196, 77, 0.9);
  outline-offset: 3px;
}

footer {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  min-height: 78px;
  margin-top: auto;
  padding: 25px 42px;
  background: rgba(255, 255, 255, 0.97);
  color: #7b8493;
  font-size: 12px;
}

.footer-inner {
  width: min(1400px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
}

.footer-brand {
  color: var(--red);
  font-size: 17px;
  font-weight: 800;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 22px;
}

footer a:hover {
  color: var(--red);
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 28px;
  max-width: min(440px, calc(100vw - 30px));
  padding: 13px 18px;
  border-radius: 9px;
  background: #202630;
  color: #fff;
  box-shadow: 0 14px 34px rgba(32, 38, 48, 0.28);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  text-align: center;
  font-size: 13px;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .page {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 500px);
    gap: 42px;
    padding-right: 34px;
    padding-left: 34px;
  }

  .intro h1 {
    font-size: 42px;
  }
}

@media (max-width: 880px) {
  .page {
    width: min(720px, 100%);
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 26px;
    padding: max(20px, env(safe-area-inset-top)) 20px 32px;
  }

  .intro {
    display: grid;
    justify-items: center;
    max-width: none;
    margin-top: 0;
    text-align: center;
  }

  .hero-logo {
    width: 178px;
    height: 124px;
    margin: 0 auto 16px;
  }

  .hero-logo img {
    transform: translateY(-25px);
  }

  .intro h1 {
    max-width: 520px;
    font-size: 28px;
    line-height: 1.16;
  }

  .intro-copy {
    max-width: 560px;
    margin: 12px auto 0;
    font-size: 14px;
  }

  .feature-list {
    display: none;
  }

  .mobile-community {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    width: min(560px, 100%);
    margin: 2px auto 0;
    padding: 0 12px;
    color: #fff;
    text-align: left;
  }

  .mobile-community-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
  }

  .mobile-community strong {
    display: block;
    margin-bottom: 3px;
    font-size: 16px;
  }

  .mobile-community p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    line-height: 1.45;
  }

  .card {
    max-width: 560px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow:
      0 22px 54px rgba(3, 37, 20, 0.24),
      0 3px 10px rgba(3, 37, 20, 0.1);
  }

  footer {
    display: none;
  }
}

@media (max-width: 620px) {
  .page {
    gap: 22px;
    padding:
      max(16px, env(safe-area-inset-top))
      14px
      max(28px, env(safe-area-inset-bottom));
  }

  .hero-logo {
    width: 166px;
    height: 112px;
    margin: 0 auto 14px;
  }

  .hero-logo img {
    transform: translateY(-23px);
  }

  .intro h1 {
    max-width: 350px;
    font-size: 24px;
    line-height: 1.17;
    letter-spacing: -0.035em;
  }

  .intro-copy {
    display: none;
  }

  .card,
  .form-card {
    padding: 28px 22px 26px;
    border-radius: 20px;
  }

  .card-heading {
    margin-bottom: 24px;
  }

  .card-heading h2,
  .view-title h2 {
    font-size: 26px;
  }

  .card-heading p,
  .view-title p {
    margin-top: 9px;
    font-size: 14px;
  }

  .facade-form {
    gap: 13px;
  }

  .facade-form label,
  .select-label {
    gap: 7px;
    margin-top: 0;
    font-size: 13px;
  }

  input,
  select {
    min-height: 52px;
    padding: 0 14px;
    font-size: 16px;
  }

  .show-password {
    top: 8px;
    min-width: 52px;
  }

  .login-options {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    margin: 3px 0 2px;
  }

  .login-options > .inline-link {
    justify-self: end;
    text-align: right;
  }

  .primary {
    min-height: 52px;
    margin-top: 3px;
  }

  .divider {
    margin: 23px 0 18px;
  }

  .social-button {
    min-height: 48px;
    border-radius: 10px;
  }

  .oauth-button {
    min-height: 50px;
    border-radius: 12px;
    font-size: 14px;
  }

  .mobile-community {
    grid-template-columns: 42px 1fr;
    gap: 13px;
    padding: 2px 8px 0;
  }

  .mobile-community-icon {
    width: 42px;
    height: 42px;
  }

  .mobile-community strong {
    font-size: 15px;
  }

  .mobile-community p {
    font-size: 12px;
  }

  .view-title {
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .register-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .register-grid .span-two,
  .span-two {
    grid-column: 1;
  }

  .recovery-copy {
    margin-bottom: 18px;
  }
}

@media (max-width: 390px) {
  .page {
    gap: 20px;
    padding-right: 11px;
    padding-left: 11px;
  }

  .hero-logo {
    width: 154px;
    height: 104px;
    margin-bottom: 13px;
  }

  .hero-logo img {
    transform: translateY(-21px);
  }

  .intro h1 {
    max-width: 310px;
    font-size: 22px;
  }

  .card,
  .form-card {
    padding: 25px 18px 24px;
  }

  .social-row {
    gap: 8px;
  }

  .login-options {
    grid-template-columns: 1fr;
    gap: 11px;
    align-items: start;
  }

  .login-options > .inline-link {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 350px) {
  .card,
  .form-card {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-view .card {
    animation: none !important;
    scroll-behavior: auto;
  }
}
