:root {
  --paper: #eee8da;
  --paper-light: #f8f4ea;
  --paper-deep: #ddd2bf;
  --ink: #1c1b18;
  --ink-soft: #464138;
  --muted: #756d61;
  --line: #c9bdab;
  --red: #a33a2d;
  --red-dark: #74271f;
  --green: #263733;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr);
}

.welcome-panel,
.form-panel {
  position: relative;
  min-height: 100vh;
}

.welcome-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(34px, 5vw, 76px) clamp(34px, 7vw, 112px) clamp(42px, 6vw, 86px);
  color: var(--paper-light);
  background:
    radial-gradient(circle at 82% 20%, rgba(226, 214, 187, .12), transparent 20rem),
    linear-gradient(145deg, #30433d, var(--green) 52%, #1d2a27);
}

.welcome-panel::before {
  content: "";
  position: absolute;
  width: min(65vw, 820px);
  aspect-ratio: 1;
  right: max(-29vw, -430px);
  bottom: max(-37vw, -550px);
  border: 1px solid rgba(242, 238, 227, .16);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(242, 238, 227, .025),
    0 0 0 140px rgba(242, 238, 227, .018);
}

.welcome-panel::after {
  content: "未完";
  position: absolute;
  right: clamp(22px, 5vw, 76px);
  top: 47%;
  color: rgba(248, 244, 234, .035);
  font-size: clamp(120px, 18vw, 310px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.12em;
  transform: translateY(-50%);
  white-space: nowrap;
}

.brand,
.welcome-copy,
blockquote {
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
}

.brand-mark {
  width: 29px;
  height: 37px;
  position: relative;
  display: block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 35px;
  top: 1px;
  border: 1px solid currentColor;
}

.brand-mark::before {
  left: 2px;
  transform: skewY(-11deg);
}

.brand-mark::after {
  right: 2px;
  transform: skewY(11deg);
}

.brand-mark i {
  position: absolute;
  z-index: 2;
  width: 1px;
  background: #cf6b58;
  left: 50%;
  transform: translateX(-50%);
}

.brand-mark i:first-child {
  height: 31px;
  top: 3px;
}

.brand-mark i:last-child {
  width: 5px;
  height: 5px;
  bottom: -2px;
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: .14em;
}

.brand small {
  margin-top: 2px;
  color: rgba(248, 244, 234, .58);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.welcome-copy {
  max-width: 680px;
  margin: clamp(80px, 14vh, 170px) 0 80px;
  animation: rise-in .8s var(--ease) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 26px;
  color: #dc7965;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.welcome-copy h1 {
  margin: 0;
  font-size: clamp(54px, 6.3vw, 106px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -.055em;
}

.welcome-copy h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(248, 244, 234, .52);
}

.welcome-copy > p:last-child {
  max-width: 540px;
  margin: 38px 0 0;
  color: rgba(248, 244, 234, .68);
  font-size: 17px;
  line-height: 2;
}

blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid rgba(220, 121, 101, .65);
}

blockquote p {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: .04em;
}

blockquote cite {
  color: rgba(248, 244, 234, .48);
  font-family: var(--sans);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .1em;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px clamp(36px, 6vw, 96px);
  background:
    radial-gradient(circle at 93% 5%, rgba(255, 255, 255, .8), transparent 24rem),
    linear-gradient(138deg, var(--paper-light), var(--paper) 55%, var(--paper-deep));
}

.form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(28, 27, 24, .14);
}

.folio {
  position: absolute;
  top: 38px;
  right: 44px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: .2em;
}

.form-wrap {
  width: min(100%, 440px);
  animation: rise-in .8s .12s var(--ease) both;
}

.form-wrap header {
  margin-bottom: 45px;
}

.section-number {
  margin: 0 0 20px;
  color: var(--red);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
}

.form-wrap h2 {
  margin: 0;
  font-size: clamp(40px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.form-wrap header > p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.form-error {
  margin: -17px 0 26px;
  padding: 13px 15px;
  border: 1px solid rgba(163, 58, 45, .28);
  color: var(--red-dark);
  background: rgba(163, 58, 45, .055);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
}

.form-error strong,
.form-error span {
  display: block;
}

.form-error strong {
  margin-bottom: 1px;
}

.field {
  display: block;
  margin-bottom: 28px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.field input {
  width: 100%;
  height: 54px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.field input:focus {
  border-color: var(--red);
  box-shadow: 0 1px 0 var(--red);
}

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

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

.password-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  padding: 8px 2px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--red);
}

.submit-button {
  width: 100%;
  min-height: 58px;
  margin-top: 13px;
  padding: 0 22px;
  border: 1px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--paper-light);
  background: var(--green);
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease);
}

.submit-button span {
  font-size: 15px;
  letter-spacing: .08em;
}

.submit-button i {
  font-family: var(--sans);
  font-size: 20px;
  font-style: normal;
  transition: transform .3s var(--ease);
}

.submit-button:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
  transform: translateY(-2px);
}

.submit-button:hover i {
  transform: translateX(5px);
}

.submit-button:focus-visible,
.trial-link:focus-visible,
.brand:focus-visible,
.password-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.submit-button[disabled] {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.trial-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 27px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  transition: color .2s ease;
}

.trial-link:hover {
  color: var(--red);
}

.privacy-note {
  position: absolute;
  right: clamp(36px, 6vw, 96px);
  bottom: 30px;
  left: clamp(36px, 6vw, 96px);
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  letter-spacing: .02em;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .login-shell {
    display: block;
  }

  .welcome-panel,
  .form-panel {
    min-height: auto;
  }

  .welcome-panel {
    min-height: 460px;
    padding: 30px 24px 42px;
  }

  .welcome-panel::before {
    right: -310px;
    bottom: -390px;
    width: 620px;
  }

  .welcome-panel::after {
    right: 12px;
    font-size: 130px;
  }

  .welcome-copy {
    margin: 80px 0 56px;
  }

  .welcome-copy h1 {
    font-size: clamp(48px, 13vw, 72px);
  }

  .welcome-copy > p:last-child {
    margin-top: 28px;
    font-size: 15px;
  }

  blockquote {
    display: none;
  }

  .form-panel {
    min-height: 650px;
    padding: 78px 24px 100px;
  }

  .form-panel::before {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .folio {
    top: 24px;
    right: 24px;
  }

  .form-wrap {
    width: min(100%, 520px);
  }

  .privacy-note {
    right: 24px;
    bottom: 24px;
    left: 24px;
  }
}

@media (max-width: 460px) {
  .welcome-panel {
    min-height: 420px;
  }

  .welcome-copy {
    margin: 65px 0 30px;
  }

  .welcome-copy h1 {
    font-size: 46px;
  }

  .welcome-copy > p:last-child {
    line-height: 1.8;
  }

  .form-wrap h2 {
    font-size: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
