:root {
  --paper: #f4f3ef;
  --ink: #171917;
  --muted: #6b6c66;
  --line: #dfded8;
  --black: #1a1b19;
  --orange: #ff6147;
  --orange-deep: #e94b34;
  --yellow: #d7ef46;
  --red: #b42318;
  --shadow: 0 24px 70px rgba(25, 27, 24, .12);
  --display: "Arial Rounded MT Bold", "Avenir Next", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 0 0, #e7efc7 0, transparent 30%), var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--body);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.auth-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 24px; }
.auth-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 25, 23, .1);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.brand-mark-image { display: block; object-fit: contain; background: transparent; }
.brand-copy strong { display: block; font: 800 18px/1 var(--display); letter-spacing: -.03em; }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.back-link { color: #64655f; font-size: 13px; font-weight: 700; }
.back-link:hover { color: var(--ink); }
.locale-toggle {
  min-width: 45px; height: 34px; border: 1px solid #c6c6bf; border-radius: 9px;
  background: transparent; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer;
}
.locale-toggle:hover { background: #fff; }

.auth-layout {
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: start;
  gap: clamp(48px, 8vw, 104px);
  padding: clamp(48px, 7vh, 78px) 42px 64px;
}
.intro-panel { max-width: 560px; }
.kicker { display: flex; align-items: center; margin: 0 0 18px; color: #666861; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.spark { display: grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--yellow); color: var(--black); font-size: 12px; }
.intro-panel h1 { margin: 0; font: 800 clamp(48px, 5.4vw, 72px)/.98 var(--display); letter-spacing: -.065em; }
.intro-panel h1 em { color: var(--orange); font-style: normal; }
.intro-copy { max-width: 420px; margin: 24px 0 0; color: #62635d; font-size: 16px; line-height: 1.65; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; }
.intro-chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .5); color: #5f605a; font-size: 11px; font-weight: 700; cursor: pointer; transition: border-color .18s, background .18s, color .18s, transform .18s; }
.intro-chip:hover { transform: translateY(-1px); border-color: #bfc0b9; background: #fff; }
.intro-chip.active { border-color: var(--black); background: var(--black); color: #fff; }
.intro-hint { min-height: 22px; margin: 13px 0 0; color: #85867f; font-size: 12px; }

.auth-card {
  width: 100%;
  padding: 27px 30px 23px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 26px; border-radius: 10px; background: #f0f0eb; }
.switch-button { height: 37px; border: 0; border-radius: 7px; background: transparent; color: #777870; font-size: 13px; font-weight: 800; cursor: pointer; }
.switch-button.active { background: var(--black); color: #fff; box-shadow: 0 4px 12px rgba(24, 25, 23, .15); }
.form-heading { margin-bottom: 21px; }
.eyebrow { margin: 0 0 7px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.form-heading h2, .session-view h2 { margin: 0; font: 800 31px/1.08 var(--display); letter-spacing: -.05em; }
.form-heading > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.form-view form { display: grid; gap: 15px; }
.form-view label:not(.check-row) { display: grid; gap: 6px; color: #565851; font-size: 12px; font-weight: 700; }
.form-view input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d5d6d0; border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s; }
.form-view input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 97, 71, .12); }
.form-view input::placeholder { color: #a5a69f; }
.check-row { display: flex; align-items: flex-start; gap: 9px; color: #696a63; font-size: 11px; line-height: 1.45; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--orange); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.button:hover { transform: translateY(-1px); }
.button.full { width: 100%; margin-top: 3px; }
.button.primary { background: var(--black); color: #fff; }
.button.primary:hover { background: #30312e; box-shadow: 0 10px 20px rgba(25, 27, 24, .16); }
.button.orange { background: var(--orange); color: #fff; box-shadow: 0 9px 18px rgba(255, 97, 71, .18); }
.button.orange:hover { background: var(--orange-deep); }
.button.ghost { border-color: #d3d4ce; background: #fff; color: var(--ink); }
.button.ghost:hover { background: #f7f7f4; }
.form-foot { margin: 18px 0 0; color: #85867f; font-size: 11px; line-height: 1.5; }
.notice, .error { padding: 10px 12px; margin-bottom: 15px; border-radius: 9px; font-size: 12px; }
.notice { border: 1px solid #c8ecd6; background: #edf9f1; color: #226d47; }
.error { border: 1px solid #ffd5d2; background: #fff1f0; color: var(--red); }
.session-view { padding: 20px 6px 14px; text-align: center; }
.session-icon { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%; background: #e4f6eb; color: #20915b; font-size: 22px; font-weight: 900; }
.session-summary { min-height: 22px; margin: 10px 0 22px; color: var(--muted); font-size: 13px; }
.session-actions { display: grid; gap: 9px; }
.security-note { display: flex; align-items: flex-start; gap: 7px; padding-top: 19px; margin: 20px 0 0; border-top: 1px solid #e4e3dc; color: #888981; font-size: 10px; line-height: 1.5; }
.security-note > span:first-child { color: var(--orange); font-size: 15px; line-height: 1; }
.auth-footer { display: flex; justify-content: space-between; padding: 0 42px 15px; color: #92938c; font-size: 10px; }
.auth-footer span:last-child { text-align: right; }

@media (max-width: 820px) {
  .auth-shell { width: min(620px, calc(100% - 32px)); }
  .auth-layout { grid-template-columns: 1fr; gap: 35px; padding: 42px 0 48px; }
  .intro-panel { max-width: none; }
  .auth-card { max-width: 460px; margin: 0 auto; }
  .auth-footer { padding: 0 0 15px; }
}
@media (max-width: 520px) {
  .auth-header { height: 70px; }
  .back-link { font-size: 11px; }
  .header-actions { gap: 10px; }
  .intro-panel h1 { font-size: 46px; }
  .intro-copy { font-size: 15px; }
  .auth-card { padding: 23px 19px 20px; border-radius: 17px; }
  .form-heading h2, .session-view h2 { font-size: 29px; }
  .auth-footer { display: grid; gap: 4px; }
  .auth-footer span:last-child { text-align: left; }
}

[hidden] { display: none !important; }
