/* Sign in / sign up (login.html only).
   Matches the landing story look (tokens copied from landing-story.css, not imported).
   Mode-specific copy is switched in CSS with :has() on the flags js/login.js already
   toggles (#name-field, #password-field, #auth-rules, #auth-prefs) — no JS hooks.
   Motion: transform/opacity only, plays once on load; off under reduced motion. */

body.auth-page {
  --ls-forest: #1f3d30;
  --ls-deep: #13251e;
  --ls-cream: #fbf6ec;
  --ls-paper: #fffdf8;
  --ls-gold: #e6c98e;
  --ls-gold-deep: #b8892f;
  --ls-gold-ink: #7a5c1c;
  --ls-ink: #1b2a23;
  --ls-soft: #44544a;
  --ls-line: #e3d8c2;
  --ls-sage: #e9eddf;
  --ls-clay: #c0643f;
  --ls-display: "Playfair Display", Georgia, serif;
  --ls-body: "DM Sans", system-ui, sans-serif;
  --ls-hand: "Caveat", "Segoe Print", cursive;
  --serif: var(--ls-display);
  --sans: var(--ls-body);
  --auth-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --auth-spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  color-scheme: light;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  font-family: var(--ls-body);
  color: var(--ls-ink);
  background:
    radial-gradient(40rem 26rem at 100% 0%, rgba(230, 201, 142, 0.26), transparent 70%),
    var(--ls-cream);
}

.auth-page :is(a, button, [tabindex]:not(input)):focus-visible {
  outline: 3px solid var(--ls-clay);
  outline-offset: 3px;
}

/* ── Nav (sits on the forest panel) ────────────────────────── */
.auth-page .lb-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--auth-story-w, 50%);
  z-index: 5;
  background: transparent;
  border-bottom: 0;
  padding: 1.4rem clamp(1.5rem, 4vw, 3.5rem);
  color: var(--ls-cream);
}

.auth-page .lb-mark {
  font-family: var(--ls-display);
  font-size: 1.3rem;
  font-weight: 600;
}

.auth-page .lb-beta-pill {
  border-radius: 999px;
  border-color: rgba(230, 201, 142, 0.5);
  color: var(--ls-gold);
  padding: 0.3rem 0.6rem;
}

/* ── Layout ────────────────────────────────────────────────── */
.auth-wrap {
  --auth-story-w: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100dvh;
}

@media (max-width: 1023.98px) {
  .auth-page .lb-nav,
  .auth-wrap {
    --auth-story-w: 44%;
  }

  .auth-wrap {
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  }
}

/* ── Story panel ───────────────────────────────────────────── */
.auth-story {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  min-height: 34rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 2.75rem);
  padding: 6rem clamp(1.5rem, 4vw, 3.5rem) 3rem;
  box-sizing: border-box;
  overflow: clip;
  color: var(--ls-cream);
  background:
    radial-gradient(30rem 22rem at 80% 12%, rgba(230, 201, 142, 0.18), transparent 70%),
    radial-gradient(26rem 20rem at 0% 100%, rgba(0, 0, 0, 0.22), transparent 70%),
    repeating-radial-gradient(circle at 78% 38%, transparent 0 22px, rgba(230, 201, 142, 0.05) 22px 23px),
    linear-gradient(165deg, var(--ls-forest), var(--ls-deep));
}

.auth-story-copy {
  max-width: 30rem;
  animation: auth-rise 0.7s 0.1s var(--auth-ease) both;
}

/* Desktop: the line + scene sit as one centred column in the panel (it's wide on big screens). */
@media (min-width: 760px) {
  .auth-story {
    align-items: center;
  }

  .auth-story > .auth-story-copy,
  .auth-story > .auth-scene {
    width: min(32rem, 100%);
    max-width: 32rem;
  }
}

@media (min-width: 1500px) {
  .auth-story > .auth-story-copy,
  .auth-story > .auth-scene {
    width: min(38rem, 100%);
    max-width: 38rem;
  }
}

.auth-story-eyebrow {
  margin: 0 0 0.35rem;
  font: 600 1.6rem/1 var(--ls-hand);
  color: var(--ls-gold);
  transform: rotate(-2deg);
  transform-origin: 0 50%;
}

.auth-story-line {
  margin: 0;
  font: 500 clamp(1.8rem, 1rem + 1.9vw, 2.75rem) / 1.12 var(--ls-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.auth-story-line em {
  font-style: italic;
  color: var(--ls-gold);
}

.auth-story-line .auth-say {
  animation: auth-fade 0.5s var(--auth-ease) both;
}

/* Which line / bubble / stamp shows, driven by the flags login.js flips. */
.auth-story .auth-say-up,
.auth-story .auth-say-key,
.auth-story .auth-say-prefs {
  display: none;
}

.auth-page:has(#name-field:not([hidden])) .auth-story .auth-say-in {
  display: none;
}

.auth-page:has(#name-field:not([hidden])) .auth-story .auth-say-up {
  display: inline;
}

.auth-page:has(#name-field:not([hidden])) .auth-story .auth-stamp.auth-say-up {
  display: inline-grid;
}

.auth-page:has(#password-field[hidden]) .auth-story-line .auth-say-in,
.auth-page:has(#auth-rules:not([hidden])):has(#name-field[hidden]) .auth-story-line .auth-say-in {
  display: none;
}

.auth-page:has(#password-field[hidden]) .auth-story-line .auth-say-key,
.auth-page:has(#auth-rules:not([hidden])):has(#name-field[hidden]) .auth-story-line .auth-say-key {
  display: inline;
}

.auth-page:has(#auth-prefs:not([hidden])) .auth-story-line .auth-say:not(.auth-say-prefs) {
  display: none;
}

.auth-page:has(#auth-prefs:not([hidden])) .auth-story-line .auth-say-prefs {
  display: inline;
}

/* A new account's screens — "Check your email", the link's result, "Email confirmed" (login.js .is-new-account) and
   the travel prefs that follow —
   are not a sign-in: the "Welcome back" bubble / stamp / line gave way to the sign-up ones (China sim 2026-10-12).
   App twin: 01-start.js auth hero for the sent view. */
.auth-page.is-new-account .auth-story .auth-say-in,
.auth-page.is-new-account .auth-story .auth-say-key,
.auth-page:has(#auth-prefs:not([hidden])) .auth-story .auth-say-in {
  display: none;
}

.auth-page.is-new-account .auth-story .auth-say-up,
.auth-page:has(#auth-prefs:not([hidden])) .auth-lakbi .auth-say-up {
  display: inline;
}

.auth-page.is-new-account .auth-story .auth-stamp.auth-say-up,
.auth-page:has(#auth-prefs:not([hidden])) .auth-story .auth-stamp.auth-say-up {
  display: inline-grid;
}

/* The scene scales as one piece (container units). */
.auth-scene {
  position: relative;
  width: 100%;
  max-width: 32rem;
  aspect-ratio: 1 / 0.8;
  container-type: inline-size;
  font-size: max(10px, 2.6cqi);
}

.auth-route {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 200;
  overflow: visible;
}

.auth-route-line {
  fill: none;
  stroke: var(--ls-gold);
  stroke-width: 2.4;
  stroke-dasharray: 7 9;
  stroke-linecap: round;
  opacity: 0.85;
}

.auth-route-reveal {
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: auth-sweep 2.3s 0.45s cubic-bezier(0.45, 0, 0.25, 1) both;
}

.auth-pin circle {
  fill: var(--ls-gold);
  stroke: var(--ls-deep);
  stroke-width: 2;
}

.auth-pin .auth-pin-core {
  fill: var(--ls-deep);
  stroke: none;
}

.auth-pin.is-end {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: auth-pop 0.5s 2.6s var(--auth-spring) both;
}

.auth-route-label {
  font: 600 15px var(--ls-body);
  fill: rgba(251, 246, 236, 0.72);
  letter-spacing: 0.02em;
}

.auth-plane path,
.auth-plane-still {
  fill: var(--ls-cream);
}

.auth-plane-still {
  display: none;
}

/* Lakbi peeks over the boarding pass. */
.auth-lakbi {
  position: absolute;
  right: 7%;
  top: 17%;
  width: 24%;
  z-index: 1;
  animation: auth-bob 6s 4.2s ease-in-out infinite;
}

.auth-lakbi::before {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(230, 201, 142, 0.45), transparent);
}

.auth-lakbi img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 90%;
  animation:
    auth-peek 0.9s 1s var(--auth-spring) both,
    auth-wave 2.4s 2s ease-in-out 2;
}

.auth-bubble {
  position: absolute;
  right: 92%;
  top: 4%;
  z-index: 2;
  margin: 0;
  padding: 0.35em 0.8em 0.4em;
  border-radius: 1em 1em 0.2em 1em;
  background: var(--ls-cream);
  color: var(--ls-forest);
  font: 600 max(15px, 4.4cqi) / 1.1 var(--ls-hand);
  white-space: nowrap;
  transform-origin: 100% 100%;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  animation: auth-pop 0.5s 1.6s var(--auth-spring) both;
}

/* Boarding pass */
.auth-pass {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 42%;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26%;
  border-radius: 2.6cqi;
  background: var(--ls-paper);
  color: var(--ls-ink);
  box-shadow: 0 3cqi 6cqi -2.5cqi rgba(0, 0, 0, 0.55);
  transform: rotate(-3deg);
  animation: auth-pass-in 0.9s 0.25s var(--auth-ease) both;
}

.auth-pass-main {
  padding: 3.4cqi 3.8cqi 3.2cqi;
  min-width: 0;
}

.auth-pass-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin: 0 0 2.2cqi;
  padding-bottom: 1.6cqi;
  border-bottom: 1px solid var(--ls-line);
  font-size: max(9px, 2.2cqi);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ls-gold-ink);
}

.auth-pass-head b {
  font: 600 max(11px, 3cqi) / 1 var(--ls-display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ls-forest);
}

.auth-pass-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqi;
}

.auth-pass-route small,
.auth-pass-meta small,
.auth-pass-stub small {
  display: block;
  font-size: max(8px, 1.9cqi);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8672;
}

.auth-pass-route strong {
  display: block;
  font: 700 max(14px, 5.6cqi) / 1.05 var(--ls-display);
  letter-spacing: 0.02em;
  color: var(--ls-ink);
}

.auth-pass-route > div:last-child {
  text-align: right;
}

.auth-pass-plane {
  flex: 1;
  text-align: center;
  font-size: max(12px, 4cqi);
  color: var(--ls-gold-deep);
  background: linear-gradient(90deg, transparent 0 8%, var(--ls-line) 8% 38%, transparent 38% 62%, var(--ls-line) 62% 92%, transparent 92%) center / 100% 1px no-repeat;
}

.auth-pass-meta {
  display: flex;
  gap: 4cqi;
  margin-top: 2.6cqi;
}

.auth-pass-meta b {
  font-size: max(10px, 2.6cqi);
  font-weight: 600;
}

.auth-pass-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4cqi;
  padding: 3cqi 3cqi;
  border-left: 2px dashed var(--ls-line);
  border-radius: 0 2.6cqi 2.6cqi 0;
  background: #fbf3de;
}

.auth-pass-stub::before,
.auth-pass-stub::after {
  content: "";
  position: absolute;
  left: -2.3cqi;
  width: 4.6cqi;
  height: 4.6cqi;
  border-radius: 50%;
  background: #1a342a;
}

.auth-pass-stub::before {
  top: -2.3cqi;
}

.auth-pass-stub::after {
  bottom: -2.3cqi;
}

.auth-pass-stub b {
  font: 700 max(13px, 4.4cqi) / 1 var(--ls-display);
  color: var(--ls-forest);
}

.auth-barcode {
  display: block;
  height: 6cqi;
  margin-top: 1.6cqi;
  background: repeating-linear-gradient(90deg, var(--ls-ink) 0 1px, transparent 1px 3px, var(--ls-ink) 3px 5px, transparent 5px 6px, var(--ls-ink) 6px 7px, transparent 7px 10px);
  opacity: 0.8;
}

/* Passport stamp that lands on the pass once the plane arrives. */
.auth-stamp {
  --r: -11deg;
  position: absolute;
  right: 37%;
  bottom: -5cqi;
  z-index: 3;
  display: inline-grid;
  justify-items: center;
  gap: 0.15em;
  padding: 0.5em 0.85em;
  border: 3px double var(--ls-clay);
  border-radius: 8px;
  color: var(--ls-clay);
  background: rgba(255, 253, 248, 0.55);
  font: 700 max(11px, 3cqi) / 1 var(--ls-display);
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0.92;
  transform: rotate(var(--r));
  animation: auth-press 0.7s 2.7s var(--auth-spring) both;
}

.auth-stamp small {
  font: 600 0.55em/1.1 var(--ls-body);
  letter-spacing: 0.1em;
}

/* ── Form card ─────────────────────────────────────────────── */
.auth-card {
  position: relative;
  align-self: center;
  justify-self: center;
  box-sizing: border-box;
  width: min(28rem, calc(100% - 3rem));
  margin: 6rem 0 3rem;
  padding: 2.4rem 2.2rem 2rem;
  border: 1px solid var(--ls-line);
  border-radius: 22px;
  background: var(--ls-paper);
  color: var(--ls-ink);
  box-shadow:
    0 30px 60px -32px rgba(19, 37, 30, 0.45),
    0 2px 0 rgba(19, 37, 30, 0.03);
  animation: auth-rise 0.7s 0.15s var(--auth-ease) both;
}

/* A strip of washi tape holding the page down. */
.auth-card::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 50%;
  width: 6.5rem;
  height: 1.4rem;
  background: rgba(230, 201, 142, 0.72);
  transform: translateX(-50%) rotate(-3deg);
  pointer-events: none;
}

.auth-card.is-prefs {
  width: min(38rem, calc(100% - 3rem));
}

.auth-card .lb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(230, 201, 142, 0.3);
  color: var(--ls-gold-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-card .lb-kicker::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #3e8a5f;
}

.auth-card h1 {
  margin: 0 0 0.45rem;
  font: 500 clamp(2rem, 1.4rem + 1.6vw, 2.6rem) / 1.05 var(--ls-display);
  letter-spacing: -0.025em;
  color: var(--ls-ink);
}

.auth-lede {
  margin: 0 0 1.5rem;
  color: var(--ls-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.auth-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ls-ink);
}

.auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid #d9ccb2;
  border-radius: 12px;
  background: var(--ls-cream);
  color: var(--ls-ink);
  font: 400 1rem/1.3 var(--ls-body);
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.auth-field input::placeholder {
  color: #9a9582;
}

.auth-field input:focus,
.auth-field input:focus-visible {
  outline: none;
  border-color: var(--ls-forest);
  background: var(--ls-paper);
  box-shadow: 0 0 0 4px rgba(230, 201, 142, 0.5);
}

#auth-email.is-locked,
#auth-email[readonly] {
  background: var(--ls-sage);
  color: var(--ls-soft);
  cursor: default;
  pointer-events: none;
}

.auth-forgot {
  margin: -0.5rem 0 0.75rem;
  text-align: right;
}

.auth-link,
.auth-switch button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.2rem;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.auth-link {
  color: var(--ls-forest);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Password rules as chips that tick as they pass. */
.auth-rules {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: -0.15rem 0 1.1rem;
  padding: 0;
  font-size: 0.82rem;
  color: var(--ls-soft);
}

.auth-rules li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  border: 1px dashed #d4c7ab;
  border-radius: 999px;
  background: var(--ls-paper);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.auth-rules input[type="checkbox"] {
  appearance: none;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border: 1.5px solid #cbbd9f;
  border-radius: 50%;
  background: var(--ls-cream);
  pointer-events: none;
}

.auth-rules li.is-met {
  border-style: solid;
  border-color: rgba(31, 61, 48, 0.25);
  background: var(--ls-sage);
  color: var(--ls-forest);
  font-weight: 600;
}

.auth-rules li.is-met input[type="checkbox"] {
  border-color: var(--ls-forest);
  background: var(--ls-forest)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fbf6ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.6 6.3l2.3 2.3L9.6 3.6'/%3E%3C/svg%3E")
    center / 0.72rem no-repeat;
  animation: auth-tick 0.4s var(--auth-spring);
}

.auth-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--ls-clay);
  border-radius: 0 10px 10px 0;
  background: #f8e6dc;
  color: #8a3a1e;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Buttons */
body.auth-page .auth-card :is(.btn-solid, .btn-quiet),
body.auth-page .auth-card .btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  font: 600 1rem/1.2 var(--ls-body);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

body.auth-page .auth-card .btn-solid {
  background: var(--ls-forest);
  border: 1px solid var(--ls-forest);
  color: var(--ls-cream);
}

#auth-submit::after {
  content: "→";
  transition: transform 0.2s var(--auth-ease);
}

body.auth-page .auth-card .btn-solid:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.auth-page .auth-card .btn-quiet {
  background: transparent;
  border: 1px solid #c9c4ae;
  color: var(--ls-ink);
}

body.auth-page .auth-card .btn-google {
  background: var(--ls-paper);
  border: 1px solid #d9ccb2;
  color: var(--ls-ink);
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  body.auth-page .auth-card .btn-solid:not(:disabled):hover {
    background: var(--ls-deep);
    border-color: var(--ls-deep);
    transform: translateY(-2px);
  }

  #auth-submit:not(:disabled):hover::after {
    transform: translateX(3px);
  }

  body.auth-page .auth-card :is(.btn-quiet, .btn-google):hover {
    background: #f4eddc;
    border-color: var(--ls-gold-deep);
    transform: translateY(-2px);
  }
}

body.auth-page .auth-card :is(.btn-solid, .btn-quiet, .btn-google):not(:disabled):active {
  transform: scale(0.98);
}

.auth-switch {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ls-soft);
}

.auth-switch button {
  color: var(--ls-clay);
  font-weight: 700;
}

.auth-open-app {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 0.92rem;
}

.auth-open-app a {
  color: var(--ls-forest);
  font-weight: 600;
}

.auth-legal {
  margin: 0.2rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #6b7266;
}

.auth-legal a {
  color: var(--ls-forest);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0 0.9rem;
  color: #8a8672;
  font: 600 1.25rem/1 var(--ls-hand);
}

.auth-or::before,
.auth-or::after {
  content: "";
  border-top: 1.5px dashed var(--ls-line);
}

/* Modal (shared auth dialog, if shown on this page) */
.auth-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(22rem, calc(100vw - 2rem));
  border: 1px solid var(--ls-line);
  border-radius: 18px;
  background: var(--ls-paper);
  color: var(--ls-ink);
  padding: 1.4rem 1.3rem 1.3rem;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.4);
}

.auth-modal::backdrop {
  background: rgba(19, 37, 30, 0.55);
}

.auth-modal h2 {
  font: 500 1.5rem/1.15 var(--ls-display);
  margin: 0.2rem 0 0.45rem;
}

.auth-modal p {
  color: var(--ls-soft);
  margin-bottom: 1rem;
}

.auth-modal .btn-solid {
  width: 100%;
  border-radius: 999px;
  background: var(--ls-forest);
  color: var(--ls-cream);
  border-color: var(--ls-forest);
}

/* ── Travel preferences step ───────────────────────────────── */
.auth-prefs {
  display: grid;
  gap: 1.15rem;
}

.auth-prefs-note {
  margin: -0.4rem 0 0;
  font: 600 1.35rem/1.2 var(--ls-hand);
  color: var(--ls-forest);
}

.auth-chip-set {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.auth-chip-set legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ls-gold-ink);
}

.auth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.auth-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border: 1px solid #d9ccb2;
  border-radius: 999px;
  background: var(--ls-cream);
  color: var(--ls-ink);
  font: 500 0.93rem/1.2 var(--ls-body);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.auth-chip::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: rgba(230, 201, 142, 0.45);
  color: var(--ls-gold-ink);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

.auth-chip.is-on {
  background: var(--ls-forest);
  border-color: var(--ls-forest);
  color: var(--ls-cream);
  animation: auth-chip-pop 0.35s var(--auth-spring);
}

.auth-chip.is-on::before {
  content: "✓";
  background: var(--ls-gold);
  color: var(--ls-deep);
}

@media (hover: hover) and (pointer: fine) {
  .auth-chip:not(.is-on):hover {
    border-color: var(--ls-gold-deep);
    background: #f4eddc;
  }
}

.auth-chip:active {
  transform: scale(0.96);
}

.auth-prefs-actions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

/* ── Phone: story collapses to a header strip ──────────────── */
@media (max-width: 759.98px) {
  .auth-page .lb-nav {
    position: relative;
    width: auto;
    padding: 0.8rem 16px 0.4rem;
    padding-top: max(0.8rem, env(safe-area-inset-top));
    background: var(--ls-forest);
  }

  .auth-wrap {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .auth-story {
    position: relative;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 16px 2.4rem;
    background:
      radial-gradient(16rem 10rem at 90% 0%, rgba(230, 201, 142, 0.18), transparent 70%),
      linear-gradient(180deg, var(--ls-forest), var(--ls-deep));
  }

  .auth-story-copy {
    order: 2;
  }

  .auth-story-eyebrow {
    font-size: 1.15rem;
    margin-bottom: 0.15rem;
  }

  .auth-story-line {
    font-size: clamp(1.1rem, 4.6vw, 1.35rem);
    line-height: 1.2;
  }

  .auth-scene {
    order: 1;
    width: 3.75rem;
    aspect-ratio: 1;
    container-type: normal;
  }

  .auth-route,
  .auth-pass,
  .auth-bubble {
    display: none;
  }

  .auth-lakbi {
    position: absolute;
    inset: 0;
    width: auto;
    animation: none;
  }

  .auth-lakbi::before {
    inset: 4%;
    background: rgba(251, 246, 236, 0.16);
  }

  .auth-lakbi img {
    animation:
      auth-peek 0.8s 0.25s var(--auth-spring) both,
      auth-wave 2.4s 1.1s ease-in-out 1;
  }

  .auth-card,
  .auth-card.is-prefs {
    width: auto;
    margin: -1.1rem 16px 2rem;
    padding: 1.6rem 1.15rem 1.35rem;
    border-radius: 18px;
  }

  .auth-card h1 {
    font-size: clamp(1.75rem, 8vw, 2.1rem);
  }

  .auth-chip {
    min-height: 2.75rem;
  }
}

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes auth-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes auth-sweep {
  from {
    transform: scaleX(0);
  }
}

@keyframes auth-pop {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
}

@keyframes auth-pass-in {
  from {
    opacity: 0;
    transform: translateY(14cqi) rotate(-9deg);
  }
}

@keyframes auth-peek {
  from {
    opacity: 0;
    transform: translateY(45%) scale(0.85);
  }
}

@keyframes auth-wave {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-7deg); }
  40% { transform: rotate(6deg); }
  60% { transform: rotate(-3deg); }
}

@keyframes auth-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes auth-press {
  0% {
    opacity: 0;
    transform: rotate(calc(var(--r) - 12deg)) scale(2.2);
  }
  55% {
    opacity: 0.95;
    transform: rotate(var(--r)) scale(0.9);
  }
  78% {
    transform: rotate(var(--r)) scale(1.05);
  }
  100% {
    opacity: 0.92;
    transform: rotate(var(--r)) scale(1);
  }
}

@keyframes auth-tick {
  0% { transform: scale(0.4); }
  100% { transform: scale(1); }
}

@keyframes auth-chip-pop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ── Reduced motion: everything still, plane parked at the destination ── */
@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    animation: none !important;
    transition: none !important;
  }

  .auth-plane {
    display: none;
  }

  .auth-plane-still {
    display: inline;
  }
}
