/* Login page (2026-11-05). Self-contained: does not load styles.css.
   Layout: Nottingham photo scene + sign-in panel. Motion is CSS-first,
   login-motion.js only adds the clock, title split, switch thumb, code
   slots and state reactions (busy / error / success). */

:root {
  --ink: #0f1728;
  --ink-2: #4b5567;
  --muted: #8a93a3;
  --paper: #f6f3ee;
  --card: #ffffff;
  --rule: #e4e0d8;
  --blue: #1f5fd6;
  --blue-deep: #143f91;
  --brass: #d7a54a;
  --bad: #c2412d;
  --good: #1f8a5b;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.lg-body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Outfit", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }

.lg {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
}

/* ---------- scene ---------- */
.lg-scene {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  overflow: hidden;
  background: #0d2a52;
}
.lg-photo {
  position: absolute;
  inset: -3%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 1.2s var(--ease);
}
.lg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 40%;
  animation: lg-photo-in 1.8s var(--ease) both, lg-drift 26s ease-in-out 1.8s infinite alternate;
}
@keyframes lg-photo-in {
  from { transform: scale(1.16); filter: blur(10px) saturate(.6); opacity: 0; }
  to { transform: scale(1.04); filter: none; opacity: 1; }
}
@keyframes lg-drift {
  from { transform: scale(1.04) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1%); }
}
.lg-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 22, 46, .45) 0%, rgba(8, 22, 46, 0) 30%),
    linear-gradient(0deg, rgba(8, 22, 46, .82) 0%, rgba(8, 22, 46, .2) 48%, rgba(8, 22, 46, 0) 70%);
  animation: lg-fade 1.4s ease .2s both;
}
@keyframes lg-fade { from { opacity: 0; } }

/* Flight path: a dashed route draws in, a small plane flies along it. */
.lg-route {
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  width: 100%;
  height: 34%;
  overflow: visible;
}
.lg-route-path {
  fill: none;
  stroke: rgba(255, 255, 255, .7);
  stroke-width: 1.4;
  stroke-dasharray: 5 7;
  vector-effect: non-scaling-stroke;
  mask: none;
  stroke-dashoffset: 0;
  clip-path: inset(0 100% 0 0);
  animation: lg-route 2.6s var(--ease) .9s forwards;
}
@keyframes lg-route { to { clip-path: inset(0 0 0 0); } }
.lg-plane {
  fill: #fff;
  offset-path: path("M-10 190 C 140 170, 220 40, 380 60 S 560 120, 610 30");
  offset-rotate: auto;
  offset-distance: 0%;
  opacity: 0;
  animation: lg-fly 2.6s var(--ease) .9s forwards;
}
@keyframes lg-fly {
  0% { offset-distance: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* ---------- top bar ---------- */
.lg-top {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  color: #fff;
  animation: lg-down .9s var(--ease) .3s both;
}
@keyframes lg-down { from { opacity: 0; transform: translateY(-12px); } }
.lg-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}
.lg-brand b { font-size: 22px; font-weight: 700; letter-spacing: .14em; }
.lg-brand span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.lg-lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
}
.lg-lang button {
  min-width: 38px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background .25s ease, color .25s ease;
}
.lg-lang button.is-active,
.lg-lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }

/* ---------- copy over the photo ---------- */
.lg-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  padding: 0 40px 56px;
  color: #fff;
  max-width: 640px;
}
.lg-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  animation: lg-up .8s var(--ease) 1s both;
}
.lg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 0 rgba(215, 165, 74, .6);
  animation: lg-ping 2.4s ease-out 2s infinite;
}
@keyframes lg-ping { 0% { box-shadow: 0 0 0 0 rgba(215, 165, 74, .6); } 80%, 100% { box-shadow: 0 0 0 10px rgba(215, 165, 74, 0); } }
.lg-clock { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.lg-clock .colon { animation: lg-blink 1s steps(2, start) infinite; }
@keyframes lg-blink { to { opacity: .2; } }

.lg-title {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(40px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.lg-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em) rotate(4deg);
  filter: blur(6px);
  animation: lg-char .9s var(--ease) forwards;
  animation-delay: calc(1.1s + var(--i) * 55ms);
}
.lg-title .w { display: inline-block; white-space: nowrap; }
.lg-title .ch.sp { width: .28em; }
@keyframes lg-char { to { opacity: 1; transform: none; filter: none; } }
.lg-lede {
  margin: 16px 0 0;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .86);
  animation: lg-up .9s var(--ease) 1.6s both;
}
@keyframes lg-up { from { opacity: 0; transform: translateY(16px); } }

/* ---------- sign-in panel ---------- */
.lg-card {
  position: relative;
  z-index: 4;
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  width: min(100%, 460px);
  justify-self: center;
  padding: 48px 44px 36px;
  animation: lg-card-in 1s var(--ease) .45s both;
}
@keyframes lg-card-in { from { opacity: 0; transform: translateY(36px); } }
.lg-card > *, .lg-form > *, .lg-auth .auth-form > * { animation: lg-up .7s var(--ease) both; }
/* After the entrance, fields shown later (password, captcha) appear at once. */
.lg.is-settled .lg-card > *, .lg.is-settled .lg-form > *, .lg.is-settled .auth-form > * { animation: none; }
.lg-card > :nth-child(1) { animation-delay: .6s; }
.lg-card > :nth-child(2) { animation-delay: .68s; }
.lg-card > :nth-child(3) { animation-delay: .76s; }
.lg-form > :nth-child(1) { animation-delay: .84s; }
.lg-form > :nth-child(2) { animation-delay: .92s; }
.lg-form > :nth-child(3) { animation-delay: 1s; }
.lg-form > :nth-child(n+4) { animation-delay: 1.08s; }
.lg-card > :nth-child(n+5) { animation-delay: 1.16s; }

.lg-card-head h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.lg-card-head p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }

.lg-browser-tip {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff4e5;
  color: #8a4b0f;
  font-size: 13px;
  line-height: 1.5;
}

/* mode switch with a sliding thumb */
.lg-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 26px 0 24px;
  padding: 4px;
  border-radius: 14px;
  background: #ebe7df;
}
.lg-switch-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 40, .08), 0 4px 12px rgba(15, 23, 40, .06);
  transform: translateX(var(--thumb, 0%));
  transition: transform .45s var(--spring);
}
.lg-switch button {
  position: relative;
  z-index: 1;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color .3s ease;
}
.lg-switch button.is-current { color: var(--ink); }

/* fields with floating labels */
.lg-form { display: grid; gap: 16px; }
.lg-field {
  position: relative;
  display: block;
}
.lg-input {
  display: block;
  width: 100%;
  height: 58px;
  padding: 22px 16px 8px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--ease);
}
.lg-input:hover { border-color: #cfc9be; }
.lg-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 214, .12); }
.lg-label {
  position: absolute;
  left: 17px;
  top: 19px;
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .3s var(--ease), color .3s ease;
}
.lg-input:focus + .lg-label,
.lg-input:not(:placeholder-shown) + .lg-label {
  transform: translateY(-11px) scale(.76);
  color: var(--blue);
}
.lg-input:not(:focus):not(:placeholder-shown) + .lg-label { color: var(--ink-2); }
.lg-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform .45s var(--ease);
}
.lg-input:focus ~ .lg-line { transform: scaleX(1); }

/* code: six slots drawn under a transparent input */
.lg-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.lg-field-code .lg-input {
  position: relative;
  z-index: 2;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  border-color: transparent;
  box-shadow: none;
}
/* The six slots already say "code"; the label stays for screen readers only. */
.lg-field-code .lg-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lg-slots {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.lg-slots i {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-style: normal;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, transform .3s var(--spring), background .2s ease;
}
.lg-slots i.is-filled { border-color: #b9c6dd; animation: lg-pop .35s var(--spring); }
@keyframes lg-pop { 0% { transform: scale(.82); } 100% { transform: none; } }
.lg-field-code.is-focus .lg-slots i.is-active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 95, 214, .12); }
.lg-field-code.is-focus .lg-slots i.is-active::after {
  content: "";
  width: 2px;
  height: 24px;
  border-radius: 2px;
  background: var(--blue);
  animation: lg-blink .9s steps(2, start) infinite;
}
.lg-field-code.is-done .lg-slots i { border-color: var(--good); background: #f1faf5; }

.lg-send {
  position: relative;
  overflow: hidden;
  min-width: 112px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .2s var(--ease), background .25s ease, color .25s ease, border-color .25s ease;
}
.lg-send:hover:not(:disabled) { transform: translateY(-1px); background: #1f2a40; }
.lg-send:active:not(:disabled) { transform: scale(.97); }
.lg-send:disabled { background: #f0ede7; border-color: var(--rule); color: var(--ink-2); cursor: default; }
/* countdown bar drains under the label while the resend timer runs */
.lg-send::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(0);
}
.lg-send.is-counting::after { animation: lg-drain var(--count, 60s) linear forwards; }
@keyframes lg-drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* turnstile */
.lg-turnstile { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--rule); border-radius: 14px; }
.lg-turnstile-label { font-size: 13px; color: var(--ink-2); }
.lg-turnstile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lg-ghost { height: 38px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.lg-turnstile-status { font-size: 12px; color: var(--muted); }

/* message */
.lg-msg {
  margin: 0;
  min-height: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.lg-msg:empty { display: none; }
.lg-msg.is-error, .lg-msg.is-success {
  padding: 10px 12px;
  border-radius: 10px;
  animation: lg-msg-in .45s var(--spring) both;
}
.lg-msg.is-error { background: #fdeeea; color: var(--bad); }
.lg-msg.is-success { background: #eaf6ef; color: var(--good); }
@keyframes lg-msg-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* submit */
:is(.lg-submit, .lg-auth .auth-submit) {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 10px 24px -10px rgba(31, 95, 214, .7);
  transition: transform .25s var(--ease), box-shadow .25s ease, background .25s ease;
}
:is(.lg-submit, .lg-auth .auth-submit)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
}
:is(.lg-submit, .lg-auth .auth-submit):hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(31, 95, 214, .8); background: #2668e2; }
:is(.lg-submit, .lg-auth .auth-submit):hover:not(:disabled)::before { animation: lg-sheen .9s var(--ease); }
:is(.lg-submit, .lg-auth .auth-submit):active:not(:disabled) { transform: scale(.985); }
@keyframes lg-sheen { to { transform: translateX(120%); } }
:is(.lg-submit, .lg-auth .auth-submit)::after { content: "→"; display: inline-block; transition: transform .35s var(--spring); }
:is(.lg-submit, .lg-auth .auth-submit):hover::after { transform: translateX(5px); }
:is(.lg-submit, .lg-auth .auth-submit):disabled { cursor: default; background: var(--blue-deep); }
:is(.lg-submit, .lg-auth .auth-submit).is-busy::before { animation: lg-sheen 1.1s linear infinite; }
:is(.lg-submit, .lg-auth .auth-submit).is-busy::after { content: "◌"; animation: lg-spin .8s linear infinite; }
@keyframes lg-spin { to { transform: rotate(360deg); } }
:is(.lg-submit, .lg-auth .auth-submit).is-ready { animation: lg-breathe 2.2s ease-in-out infinite; }
@keyframes lg-breathe { 50% { box-shadow: 0 10px 24px -10px rgba(31, 95, 214, .7), 0 0 0 6px rgba(31, 95, 214, .12); } }

.lg-links { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.lg-links a { color: var(--blue); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.lg-links a:hover { background-size: 100% 1px; }

.lg-note { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.lg-foot { display: flex; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.lg-foot a { color: var(--ink-2); text-decoration: none; }
.lg-foot a:hover { color: var(--ink); }

/* error shake on the whole card */
.lg-card.is-shake { animation: lg-shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes lg-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* success: the panel lifts away and a check draws in before redirect */
.lg-done {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(246, 243, 238, .9);
  animation: lg-fade .35s ease both;
}
.lg-done svg { width: 84px; height: 84px; }
.lg-done circle { fill: none; stroke: var(--good); stroke-width: 3; stroke-dasharray: 240; stroke-dashoffset: 240; animation: lg-draw .6s var(--ease) forwards; }
.lg-done path { fill: none; stroke: var(--good); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: lg-draw .4s var(--ease) .45s forwards; }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }

/* ---------- register / reset password ----------
   Those pages keep their original form markup (register.js and
   reset-password.js rely on it); these rules give it the login look. */
.lg-auth .auth-card-header .eyebrow { display: none; }
.lg-auth .auth-card-header h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.lg-auth .auth-card-header p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.lg-auth .auth-form { display: grid; gap: 14px; margin-top: 24px; }
.lg-auth .auth-step-two,
.lg-auth .auth-step-three { display: grid; gap: 14px; animation: lg-up .6s var(--ease) both; }
.lg-auth .auth-field-group { display: grid; gap: 6px; }
.lg-auth .auth-field-group > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lg-auth .transport-form-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.lg-auth .transport-form-input:hover { border-color: #cfc9be; }
.lg-auth .transport-form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 214, .12); }
.lg-auth select.transport-form-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.lg-auth input[data-register-code]:not(:placeholder-shown) { letter-spacing: .4em; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; }

/* register: three-step progress drawn above the step name */
.lg-auth .auth-step-indicator {
  position: relative;
  padding-top: 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}
.lg-auth .auth-step-indicator::before,
.lg-auth .auth-step-indicator::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  border-radius: 4px;
}
.lg-auth .auth-step-indicator::before { right: 0; background: #e6e1d8; }
.lg-auth .auth-step-indicator::after { width: var(--step, 33.3%); background: var(--blue); transition: width .7s var(--spring); }
[data-auth-step="code"] .auth-step-indicator { --step: 66.6%; }
[data-auth-step="password"] .auth-step-indicator { --step: 100%; }

.lg-auth .auth-turnstile-block { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--rule); border-radius: 14px; }
.lg-auth .auth-turnstile-label { font-size: 13px; color: var(--ink-2); }
.lg-auth .auth-turnstile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lg-auth .auth-turnstile-status { font-size: 12px; color: var(--muted); }
.lg-auth .auth-turnstile-status.is-success { color: var(--good); }
.lg-auth .auth-turnstile-status.is-error { color: var(--bad); }
.lg-auth :is(.auth-verify-button, .auth-resend-button) {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s ease, transform .2s var(--ease);
}
.lg-auth :is(.auth-verify-button, .auth-resend-button):hover { border-color: var(--ink); transform: translateY(-1px); }
.lg-auth .auth-resend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 0; }
.lg-auth .auth-resend-note { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.lg-auth .transport-form-message { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lg-auth .transport-form-message:empty { display: none; }
.lg-auth .transport-form-message.is-error,
.lg-auth .transport-form-message.is-success { padding: 10px 12px; border-radius: 10px; animation: lg-msg-in .45s var(--spring) both; }
.lg-auth .transport-form-message.is-error { background: #fdeeea; color: var(--bad); }
.lg-auth .transport-form-message.is-success { background: #eaf6ef; color: var(--good); }

.lg-auth .auth-legal-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.lg-auth .auth-legal-note a { color: var(--ink-2); }
.lg-auth .auth-link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.lg-auth .auth-inline-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.lg-auth .auth-inline-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-auth .auth-back-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.lg-auth .auth-back-link:hover { color: var(--ink); }
.lg-auth .auth-policy-row { font-size: 13px; }
.lg-auth .auth-policy-row a { color: var(--muted); font-weight: 500; }
.lg-auth .auth-state-card { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.lg-auth .auth-state-card h3 { display: none; }
.lg-auth .auth-state-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .lg {
    display: block;
    min-height: 100dvh;
  }
  .lg-scene {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 40svh;
    min-height: 300px;
  }
  .lg-top { position: relative; padding: calc(16px + env(safe-area-inset-top)) 18px 0; }
  .lg-brand span { display: none; }
  .lg-copy { position: relative; padding: 0 20px; margin-top: max(70px, calc(40svh - 210px)); min-height: 150px; }
  .lg-route { top: 10%; height: 30%; }
  .lg-shade {
    background:
      linear-gradient(180deg, rgba(8, 22, 46, .5) 0%, rgba(8, 22, 46, 0) 26%),
      linear-gradient(0deg, rgba(8, 22, 46, .9) 0%, rgba(8, 22, 46, .55) 45%, rgba(8, 22, 46, .1) 75%);
  }
  .lg-kicker { margin-bottom: 12px; font-size: 12px; }
  .lg-title { font-size: 34px; }
  .lg-lede { margin-top: 10px; font-size: 15px; }
  .lg-card {
    width: 100%;
    margin-top: 22px;
    padding: 26px 20px calc(28px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    background: var(--paper);
    box-shadow: 0 -18px 40px -24px rgba(8, 22, 46, .5);
  }
  .lg-card-head h2, .lg-auth .auth-card-header h2 { font-size: 28px; }
  .lg-switch { margin: 20px 0 18px; }
  .lg-send { min-width: 100px; padding: 0 12px; font-size: 13px; }
  .lg-slots { gap: 5px; }
  .lg-slots i { font-size: 20px; border-radius: 10px; }
}
@media (max-width: 360px) {
  .lg-code-row { grid-template-columns: 1fr; }
  .lg-send { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .lg-title .ch { opacity: 1; transform: none; filter: none; }
}
