:root {
  color-scheme: light;
  --accent: #ff4f00;
  --accent-strong: #c83d00;
  --accent-soft: #fff0e8;
  --ink: #1b1715;
  --ink-muted: #71645e;
  --surface: #eeeae5;
  --panel: #fffdfb;
  --line: #ded7d1;
  --danger: #b42318;
  --focus: rgba(255, 79, 0, 0.22);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(440px, 1.08fr);
}

.auth-context {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  color: var(--ink);
  background-color: #eee9e2;
  background-image:
    linear-gradient(rgba(47, 35, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 35, 29, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  border-top: 6px solid var(--accent);
}

.auth-context::after {
  content: "";
  position: absolute;
  right: -11vw;
  bottom: -18vw;
  width: 42vw;
  aspect-ratio: 1;
  border: clamp(42px, 7vw, 110px) solid rgba(255, 79, 0, 0.075);
  border-radius: 36% 64% 58% 42%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 14px;
}

.brand-logo {
  display: block;
  width: min(278px, 72vw);
  height: auto;
}

.brand-product,
.access-note,
.context-copy p,
.form-heading p,
.help-copy,
.field-hint,
.form-error {
  margin: 0;
}

.brand-product {
  padding-left: 2px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.context-copy {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  margin: auto 0;
}

.context-copy h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 620;
}

.context-copy p {
  max-width: 44ch;
  margin-top: 24px;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.8;
}

.access-note {
  position: relative;
  z-index: 1;
  color: var(--ink-muted);
  font-size: 12px;
}

.auth-panel {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 80px);
  background: var(--panel);
}

.auth-card {
  width: min(420px, 100%);
}

.form-heading {
  margin-bottom: 34px;
}

.form-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.form-heading h2 {
  margin: 10px 0 12px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.form-heading > p:last-child {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.65;
}

form {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: var(--panel);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:hover {
  border-color: #b9aaa1;
}

input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus);
}

.reveal-button {
  min-height: 30px;
  padding: 0 2px;
  border: 0;
  color: var(--accent-strong);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.reveal-button:focus-visible,
.primary-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.field-hint {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.primary-button {
  min-height: 49px;
  border: 0;
  border-radius: 11px;
  color: #fffaf7;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
  transition: background 160ms ease, transform 120ms ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.help-copy {
  margin-top: 28px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}

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

  .auth-context {
    min-height: auto;
    padding: 22px 20px 18px;
  }

  .context-copy,
  .access-note {
    display: none;
  }

  .auth-panel {
    min-height: calc(100dvh - 104px);
    place-items: start center;
    padding: 52px 20px 36px;
  }

  .brand-lockup { gap: 8px; }
  .brand-logo { width: 224px; }
  .brand-product { font-size: 9.5px; }
}

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