:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --supporting-ink: #737373;
  --quiet-ink: #929292;
  --brand-orange: #ff5c00;
  --brand-orange-bg: #fff3eb;
  --control-paper: #ffffff;
  --control-line: #e7e7e7;
  --control-focus: #858585;
  --soft-paper: #f3f3f3;
  --soft-paper-hover: #eaeaea;
  --divider-line: #eeeeee;
  --error-ink: #b63b30;
  --error-line: #ce6a60;
  --success-green: #22c55e;
  --success-green-bg: #f0fdf4;
  --font: Inter, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --form-width: 392px;
  --control-height: 48px;
  --field-radius: 16px;
  --pill-radius: 999px;
  --ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #ffe8d6; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }

.site-header { flex: 0 0 80px; display: flex; align-items: center; padding: 0 32px; }

.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; border-radius: 4px; }
.brand-mark { display: block; width: 28px; height: 24px; }
.brand-wordmark {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.auth-shell { flex: 1; display: grid; place-items: center; padding: 32px 24px 36px; }
.auth-panel { width: 100%; max-width: var(--form-width); }

.auth-intro { text-align: center; margin-bottom: 32px; }
h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.auth-description { margin: 8px 0 0; color: var(--quiet-ink); font-size: 16px; line-height: 24px; text-wrap: pretty; }
h1:focus { outline: none; }

.lock-icon-wrap {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--brand-orange-bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--brand-orange);
  margin-bottom: 16px;
}

.auth-mark {
  display: block;
  width: 72px;
  height: 44px;
  margin: 0 auto 24px;
}

.fields { display: grid; gap: 12px; }

.control {
  min-height: var(--control-height);
  display: flex; align-items: center;
  background: var(--control-paper);
  border: 1px solid var(--control-line);
  border-radius: var(--field-radius);
  transition: border-color 160ms var(--ease);
}
.control:hover { border-color: #d2d2d2; }
.control:focus-within { border-color: var(--control-focus); }
.control input {
  width: 100%; min-width: 0; height: 46px;
  padding: 0 16px; border: 0; border-radius: inherit; outline: none;
  color: var(--ink); background: transparent;
  font-size: 16px; line-height: 24px;
}
.control input::placeholder { color: #a0a0a0; opacity: 1; }

.verification-control input { padding-right: 4px; }
.send-code-button {
  position: relative; flex: 0 0 112px; height: 44px;
  margin-right: 4px; padding: 0 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500; line-height: 20px;
  white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.send-code-button::before {
  content: ""; position: absolute; left: 0; top: 12px;
  height: 20px; border-left: 1px solid var(--control-line);
}
.send-code-button:hover:not(:disabled) { background: var(--soft-paper); }
.send-code-button:active:not(:disabled) { opacity: .7; }
.send-code-button:disabled { color: var(--quiet-ink); cursor: default; }

.password-control input { padding-right: 4px; }
.password-toggle {
  flex: 0 0 44px; width: 44px; height: 44px;
  margin-right: 4px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  color: var(--quiet-ink); background: transparent;
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.password-toggle:hover { color: var(--ink); background: var(--soft-paper); }
.password-toggle:active { transform: scale(.97); }
.password-toggle i { font-size: 16px; }

.field-error-text {
  color: var(--error-ink);
  font-size: 12px; line-height: 18px;
  margin: 8px 4px 0;
}

.forgot-password-row { display: flex; justify-content: flex-end; margin-top: 4px; }
.forgot-password-link {
  min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 4px; border-radius: 3px;
  color: var(--supporting-ink); font-size: 13px; line-height: 20px;
}
.forgot-password-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.forgot-password-link:active { opacity: .7; }
.forgot-password-row:not([hidden]) + .primary-button { margin-top: 4px; }

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px;
}
.checkbox-row label {
  font-size: 13px; color: var(--supporting-ink);
  line-height: 1.5; font-weight: 400;
}
.checkbox-row .hint-text { font-size: 11px; color: var(--quiet-ink); }

.bentoo-checkbox {
  accent-color: var(--brand-orange);
  width: 16px; height: 16px; flex-shrink: 0;
}

.auth-button {
  width: 100%; min-height: var(--control-height);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border: 0; border-radius: var(--pill-radius);
  font-size: 15px; font-weight: 500; line-height: 24px;
  transition: background-color 160ms var(--ease), transform 140ms var(--ease);
}
.auth-button:active { transform: scale(.98); }
.auth-button:disabled { opacity: .5; cursor: default; transform: none; }

.primary-button {
  margin-top: 16px;
  color: var(--paper);
  background: var(--ink);
}
.primary-button:hover { background: #303030; }

.google-button { color: var(--ink); background: var(--soft-paper); }
.google-button:hover { background: var(--soft-paper-hover); }
.google-logo { display: block; width: 20px; height: 20px; flex-shrink: 0; }

.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--quiet-ink);
  font-size: 12px; line-height: 20px;
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1; background: var(--divider-line);
}

.mode-prompt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px;
  margin: 20px 0 0;
  color: var(--supporting-ink); font-size: 13px; line-height: 24px;
}
.mode-link {
  min-height: 44px; display: inline-flex; align-items: center;
  color: var(--ink); font-weight: 500;
  text-decoration: underline; text-decoration-color: #c9c9c9;
  text-underline-offset: 4px; border-radius: 3px;
}
.mode-link:hover { text-decoration-color: var(--ink); }
.mode-link:active { opacity: .7; }

.success-state { text-align: center; }
.success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--success-green-bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--success-green);
  margin-bottom: 16px;
}
.success-state h3 {
  font-size: 18px; font-weight: 800;
  color: var(--ink); margin: 0 0 8px;
}
.success-state p {
  font-size: 14px; color: var(--supporting-ink);
  line-height: 1.6; margin: 0 0 24px;
}
.success-button {
  background: var(--success-green) !important;
  max-width: 240px; margin: 0 auto;
}

.legal-footer { padding: 32px 0 0; }
.legal-notice {
  max-width: 440px; margin: 0 auto;
  color: var(--supporting-ink); text-align: center;
  font-size: 13px; line-height: 18px; text-wrap: pretty;
}
.legal-name { text-decoration: underline; text-underline-offset: 2px; }
.legal-name:hover { color: var(--ink); }

.legal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.legal-overlay.open { display: flex; }
.legal-modal {
  background: var(--paper);
  border-radius: 20px;
  width: 100%; max-width: 640px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 48px rgba(0,0,0,.15);
}
.legal-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--divider-line);
}
.legal-modal-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.legal-modal-close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--supporting-ink);
  font-size: 16px;
  transition: background-color 160ms var(--ease);
}
.legal-modal-close:hover { background: var(--soft-paper); }
.legal-modal-body {
  padding: 24px; overflow-y: auto;
  font-size: 14px; line-height: 1.7;
  color: var(--supporting-ink);
}

@media (max-height: 800px) {
  .auth-shell { padding-top: 24px; padding-bottom: 24px; }
  .auth-intro { margin-bottom: 24px; }
  .auth-mark { margin-bottom: 20px; }
}
@media (max-width: 600px) {
  .site-header { flex-basis: 72px; padding-inline: 24px; }
  .auth-shell { padding: 24px 24px 32px; }
  h1 { font-size: 26px; line-height: 34px; }
  .auth-description { font-size: 15px; }
  .auth-mark { width: 64px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .auth-button:active, .password-toggle:active { transform: none; }
}

/* ── Turnstile ── */
.turnstile-wrap{margin-top:16px;display:flex;justify-content:center;width:100%}
