.auth-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100dvh;
  padding: 30px clamp(26px, 5vw, 74px);
}

.auth-main {
  display: grid;
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(52px, 7vw, 118px);
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 38px 0 54px;
}

.auth-form-panel {
  width: min(410px, 100%);
}

.auth-form {
  display: grid;
  gap: 22px;
  padding-top: 8px;
}

.quiet-field {
  display: grid;
  gap: 8px;
  color: var(--soft-ink);
  font-size: var(--text-meta);
}

.quiet-field input {
  width: 100%;
  min-height: 46px;
  padding: 7px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: var(--text-body);
}

.quiet-field input:focus {
  border-bottom-color: var(--ink);
}

.quiet-field input:hover:not(:focus) {
  border-bottom-color: var(--line-strong);
}

.auth-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
}

.auth-form-footer a {
  color: var(--soft-ink);
  font-size: var(--text-meta);
  text-underline-offset: 4px;
}

.auth-hint,
.signed-in-note {
  margin: 2px 0 0;
  color: var(--faint-ink);
  font-size: var(--text-meta);
}

.auth-hint strong {
  color: var(--soft-ink);
  font-weight: 560;
}

.auth-art {
  display: grid;
  min-width: 0;
  min-height: clamp(460px, 70vh, 720px);
  margin: 0;
  overflow: hidden;
  place-items: center;
}

.auth-art img {
  width: 100%;
  height: clamp(460px, 70vh, 720px);
  object-fit: cover;
  object-position: 70% 58%;
  mix-blend-mode: multiply;
  transform: scale(1.2);
  transform-origin: 70% 62%;
}

@media (max-width: 860px) {
  .auth-shell {
    padding: 24px 20px;
  }

  .auth-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 70px 0 32px;
  }

  .auth-form-panel {
    width: min(480px, 100%);
  }

  .auth-art {
    min-height: 320px;
  }

  .auth-art img {
    height: 320px;
    object-position: 72% 68%;
    transform: scale(1.35);
    transform-origin: 70% 72%;
  }
}

@media (max-width: 520px) {
  .auth-main {
    padding-top: 58px;
  }

  .auth-form-footer {
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .auth-form-footer .quiet-save {
    width: 100%;
  }

  .auth-art,
  .auth-art img {
    min-height: 260px;
    height: 260px;
  }
}

.quiet-field small { font-size: var(--text-meta); line-height: 1.5; }
@media (max-width: 600px) {
  .quiet-field input { font-size: 16px; /* iOS zooms a focused field under 16px */ }
}

/* The landing opens the login page over itself, whole, not as a small dialog. */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  background: var(--surface);
}

/* A class display value would otherwise outrank the browser's own hidden rule. */
.auth-overlay[hidden],
.auth-form[hidden] {
  display: none;
}

.auth-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-overlay-close {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 15px;
  color: var(--soft-ink);
  background: transparent;
  font-size: var(--text-meta);
  cursor: pointer;
}

.auth-overlay-close:hover {
  color: var(--ink);
  background: var(--celadon-soft);
}
