:root {
  color-scheme: light;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: #171717;
  background: #d9d9d9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 63fr) minmax(320px, 37fr);
  min-height: 100vh;
  min-height: 100svh;
}

.auth-artwork {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #360000;
}

.auth-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-panel {
  min-width: 0;
  padding: clamp(36px, 7vh, 72px) clamp(24px, 3vw, 56px) 48px;
}

.auth-content {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
}

.auth-content h1 {
  margin: 0 0 clamp(48px, 10vh, 104px);
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

.auth-content--signup h1 {
  margin-bottom: 40px;
}

.auth-form {
  display: grid;
  gap: 26px;
}

.auth-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.auth-field label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.auth-field input,
.auth-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #929292;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.auth-field input:hover,
.auth-field select:hover {
  border-color: #555;
}

.auth-field input:focus-visible,
.auth-field select:focus-visible,
.auth-goal input:focus-visible,
.auth-submit:focus-visible,
.auth-switch a:focus-visible {
  outline: 3px solid #00768f;
  outline-offset: 3px;
}

.auth-field input:focus-visible,
.auth-field select:focus-visible {
  border-color: #00768f;
  background: #e5e5e5;
}

.auth-submit {
  min-height: 46px;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid #ad0d0d;
  border-radius: 0;
  background: #ba1111;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-submit:hover {
  border-color: #8c0909;
  background: #9c0c0c;
}

.auth-submit:active {
  background: #800909;
}

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}

.auth-switch a {
  display: inline-block;
  padding: 8px 0;
  color: #006f8c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch a:hover {
  color: #004e62;
}

.auth-help,
.auth-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.auth-help {
  color: #505050;
}

.auth-error {
  color: #a10d0d;
}

.auth-field input.is-invalid,
.auth-field select.is-invalid {
  border-color: #a10d0d;
}

.auth-notice,
.auth-alert {
  margin: 0 0 24px;
  padding: 12px 14px;
  border: 1px solid #8d9c93;
  background: #e6ede8;
  color: #244731;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.auth-alert {
  border-color: #b77878;
  background: #f2e1e1;
  color: #8c1414;
}

.auth-intro {
  margin: -16px 0 32px;
  color: #505050;
  font-size: 13px;
  line-height: 1.9;
}

.auth-form--signup {
  gap: 32px;
}

.auth-section {
  display: grid;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-section legend {
  width: 100%;
  margin-bottom: 22px;
  padding: 0 0 12px;
  border-bottom: 1px solid #aaa;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.auth-required,
.auth-optional {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}

.auth-required {
  color: #a10d0d;
}

.auth-optional {
  color: #606060;
}

.auth-input-unit {
  position: relative;
  min-width: 0;
}

.auth-input-unit input {
  padding-right: 52px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.auth-input-unit input::-webkit-inner-spin-button,
.auth-input-unit input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.auth-unit {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #505050;
  font-size: 12px;
  pointer-events: none;
}

.auth-field select {
  padding-right: 8px;
}

.auth-field select option {
  background: #e5e5e5;
  color: #171717;
}

.auth-field input::placeholder {
  color: #666;
  font-size: 12px;
  opacity: 1;
}

.auth-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-goal {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px;
  border: 1px solid #929292;
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
}

.auth-goal input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #ba1111;
}

.auth-goal:has(input:checked) {
  border-color: #ba1111;
  background: #ead4d4;
  color: #950d0d;
}

.auth-goal:hover {
  border-color: #555;
}

.auth-goal--unset {
  grid-column: 1 / -1;
}

@media (max-aspect-ratio: 4/3) {
  .auth-artwork img {
    object-fit: contain;
  }
}

@media (max-width: 800px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-artwork {
    position: static;
    height: auto;
    min-height: 220px;
    max-height: 44svh;
    aspect-ratio: 1322 / 1190;
  }

  .auth-artwork img {
    object-fit: contain;
  }

  .auth-panel {
    padding: 32px 24px 40px;
  }

  .auth-content h1,
  .auth-content--signup h1 {
    margin-bottom: 32px;
    font-size: 26px;
  }

  .auth-form {
    gap: 22px;
  }
}

@media (min-width: 801px) and (max-width: 1100px), (max-width: 360px) {
  .auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-goals {
    grid-template-columns: minmax(0, 1fr);
  }
}
