/* CamikaLabs — standalone /login page (independent of desktop.css).
 * Two-column layout: auth card (left) + marketing (right). Stacks on mobile.
 * Theme tokens duplicated so this page works without desktop.css. Same P5 names
 * for muscle memory; if desktop.css is also loaded the page-scoped selectors win
 * because everything here is namespaced under .lg-* / [data-page="login"].
 */
:root[data-page="login"] {
  --p5-red: #e63946;
  --p5-red-2: #ff6b6b;
  --p5-red-gradient: linear-gradient(135deg, #e63946, #ff6b6b);
  --lg-bg: #faf7f2;
  --lg-bg-2: #f2eee6;
  --lg-bg-3: #ebe5d7;
  --lg-card-bg: #ffffff;
  --lg-text: #171615;
  --lg-text-2: #403d38;
  --lg-muted: #7a756d;
  --lg-border: #e5dfd3;
  --lg-border-2: #d8d1c2;
  --lg-input-bg: #ffffff;
  --lg-input-border: #d8d1c2;
  --lg-input-focus: #e63946;
  --lg-divider: #e5dfd3;
  --lg-disabled-bg: #c8c8c8;
  --lg-disabled-text: #ffffff;
  --lg-google-bg: #ffffff;
  --lg-google-border: #d8d1c2;
  --lg-google-hover-bg: #fffdf8;
  --lg-right-bg: linear-gradient(160deg, var(--lg-bg-2) 0%, var(--lg-bg-3) 100%);
  --lg-right-deco: rgba(230, 57, 70, 0.08);
  --lg-shadow-sm: 0 1px 0 rgba(23, 22, 21, 0.04), 0 1px 2px rgba(23, 22, 21, 0.04);
  --lg-shadow-md: 0 1px 0 rgba(23, 22, 21, 0.05), 0 12px 30px -18px rgba(23, 22, 21, 0.24);
}
:root[data-page="login"][data-theme="dark"] {
  --lg-bg: #0f0f14;
  --lg-bg-2: #15151c;
  --lg-bg-3: #1b1820;
  --lg-card-bg: #16161d;
  --lg-text: #f2f0ed;
  --lg-text-2: #c4beb6;
  --lg-muted: #847c74;
  --lg-border: #2b292d;
  --lg-border-2: #363139;
  --lg-input-bg: #15151b;
  --lg-input-border: #363139;
  --lg-divider: #2b292d;
  --lg-disabled-bg: #3a3a42;
  --lg-disabled-text: #888;
  --lg-google-bg: #181820;
  --lg-google-border: #363139;
  --lg-google-hover-bg: #20202a;
  --lg-right-bg: linear-gradient(160deg, var(--lg-bg-2) 0%, var(--lg-bg-3) 100%);
  --lg-right-deco: rgba(230, 57, 70, 0.2);
  --lg-shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.2);
  --lg-shadow-md: 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 36px -24px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--lg-bg); color: var(--lg-text); line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-y: hidden;
}
a { color: var(--p5-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Page shell ───────────────────────────────────────── */
.lg-page { position: relative; height: 100vh; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.lg-topbar {
  position: absolute; top: 28px; right: 56px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
}
.lg-lang {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--lg-text-2);
  border: 1px solid var(--lg-border-2); background: var(--lg-card-bg);
  padding: 6px 10px 6px 12px; box-shadow: var(--lg-shadow-sm);
}
.lg-lang select {
  background: transparent; border: none; color: var(--lg-text-2);
  font-size: 12.5px; cursor: pointer; outline: none; padding: 0 2px;
}
.lg-lang select option { background: var(--lg-card-bg); color: var(--lg-text); }

/* ── Two-column grid ──────────────────────────────────── */
.lg-grid {
  flex: 1; display: grid; grid-template-columns: minmax(390px, 1fr) minmax(0, 1fr);
  gap: 0; padding: 0;
  height: 100%;
  min-height: 0;
}
@media (max-width: 960px) {
  .lg-grid { grid-template-columns: 1fr; padding: 12px; }
  .lg-right { display: none; }
}

/* Mobile: release the desktop's overflow:hidden + 100vh clamp. iOS Safari doesn't
 * shrink 100vh when the soft keyboard opens, so the password field can land under
 * the keyboard with no way to scroll. Allow natural document scroll on small screens. */
@media (max-width: 768px) {
  html, body { overflow-y: auto; height: auto; }
  .lg-page { height: auto; min-height: 100vh; overflow: visible; }
}

/* ── LEFT: auth card ──────────────────────────────────── */
/* Center the card vertically in the column — otherwise it sticks to the top and
 * leaves a tall empty band below on big viewports (looks like the form is
 * positioned wrong). Card sizes to content; spare space splits evenly above/below. */
.lg-left {
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  padding: 28px 56px 36px; background: var(--lg-bg);
}
.lg-card {
  width: 100%; max-width: 420px;
  background: transparent; border: none;
  padding: 0; border-radius: 0;
}
@media (max-width: 600px) { .lg-card { padding: 22px 22px; } }

.lg-logo {
  display: inline-flex; align-items: center;
  letter-spacing: 0; margin-bottom: 36px;
}
.lg-logo:hover { text-decoration: none; opacity: 0.85; }
.lg-logo-img { display: block; width: 128px; height: auto; }
.lg-logo-img-dark { display: none; }
:root[data-page="login"][data-theme="dark"] .lg-logo-img-light { display: none; }
:root[data-page="login"][data-theme="dark"] .lg-logo-img-dark { display: block; }

.lg-h1 {
  font-size: 34px; font-weight: 900; color: var(--lg-text);
  margin: 0 0 8px; text-align: left; line-height: 1.05; letter-spacing: 0;
}
.lg-sub {
  font-size: 15px; color: var(--lg-text-2);
  margin: 0 0 24px; text-align: left; line-height: 1.65;
}

/* Google button */
.lg-btn-google {
  width: 100%; padding: 13px 16px; background: var(--lg-google-bg);
  border: 1px solid var(--lg-google-border); color: var(--lg-text);
  font-size: 14.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  border-radius: 0;
}
.lg-btn-google:hover { background: var(--lg-google-hover-bg); border-color: var(--lg-text); transform: translateY(-1px); }

/* "or continue with email" divider */
.lg-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px; color: var(--lg-muted); font-size: 11px;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.lg-divider::before, .lg-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--lg-divider);
}

/* Email input with icon */
.lg-input-wrap {
  position: relative; display: flex; align-items: center;
  border: 1px solid var(--lg-input-border); background: var(--lg-input-bg);
  margin-bottom: 4px; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.lg-input-wrap:focus-within { border-color: var(--lg-text); box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.08); }
.lg-input-wrap.lg-input-disabled { background: var(--lg-bg); opacity: 0.7; }
.lg-input-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  margin: 0 12px; color: var(--lg-muted);
}
.lg-input-wrap input {
  flex: 1; padding: 13px 14px 13px 0; background: transparent;
  border: none; outline: none; font-size: 14px; color: var(--lg-text);
  font-family: inherit;
}
.lg-input-wrap input:disabled { color: var(--lg-text-2); cursor: not-allowed; }
.lg-input-wrap input::placeholder { color: var(--lg-muted); }
/* Inputs without leading icon (referral code, send-code row) get their own padding */
.lg-input-wrap > input:first-child { padding-left: 14px; }

/* Verification code row: input + send button */
.lg-code-row { display: flex; gap: 8px; margin-bottom: 4px; }
.lg-btn-send-code {
  flex-shrink: 0; padding: 13px 16px; background: transparent;
  border: 1px solid var(--p5-red); color: var(--p5-red);
  font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity 0.2s, background 0.2s;
  border-radius: 0; font-family: inherit;
}
.lg-btn-send-code:hover { background: rgba(230, 57, 70, 0.08); opacity: 1; }
.lg-btn-send-code:disabled { opacity: 0.4; cursor: not-allowed; }

/* Inline field error */
.lg-err { display: block; min-height: 16px; font-size: 12px; color: #ef4444; margin: 2px 0 8px; }
.lg-err:empty { min-height: 0; margin: 0 0 12px; }

/* Primary CTA */
.lg-btn-primary {
  width: 100%; padding: 14px 16px; background: var(--p5-red);
  border: none; color: #fff; font-size: 15px; font-weight: 800;
  cursor: pointer; margin: 8px 0 4px; transition: opacity 0.2s, background 0.2s, transform 0.2s;
  border-radius: 0; font-family: inherit;
}
.lg-btn-primary:hover { opacity: 0.95; transform: translateY(-1px); }
.lg-btn-primary:disabled, .lg-btn-primary[disabled] {
  background: var(--lg-disabled-bg); color: var(--lg-disabled-text);
  cursor: not-allowed; opacity: 1;
}

/* Text-only back button */
.lg-btn-text {
  width: 100%; padding: 8px; background: transparent; border: none;
  color: var(--lg-text-2); font-size: 13px; cursor: pointer;
  transition: color 0.2s; font-family: inherit;
}
.lg-btn-text:hover { color: var(--lg-text); }

/* "New users will create a password..." hint */
.lg-hint {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 0 0; font-size: 12px; color: var(--lg-muted);
  justify-content: flex-start;
}
.lg-hint svg { color: var(--p5-red); flex-shrink: 0; }

.lg-rule { border: none; border-top: 1px solid var(--lg-divider); margin: 14px 0 10px; }

/* Top-of-page maintenance banner */
.lg-maintenance {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; font-size: 13px;
  background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d;
}
[data-theme="dark"] .lg-maintenance { background: #3a2a14; color: #fbbf24; border-bottom-color: #5a3a1a; }

/* Small helper text under code inputs ("check your spam folder", etc.) */
.lg-helper-text {
  margin: 4px 0 8px; font-size: 11px; color: var(--lg-muted);
  line-height: 1.4;
}

/* Inline informational banner — used for persistent Google-only hint etc. */
.lg-banner {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; margin: 8px 0 4px;
  font-size: 13px; line-height: 1.45;
  border-left: 3px solid var(--p5-red);
  background: rgba(230, 57, 70, 0.06);
  color: var(--lg-text);
}
.lg-banner svg { flex-shrink: 0; color: var(--p5-red); margin-top: 2px; }
.lg-banner-info { border-left-color: #f59e0b; background: rgba(245, 158, 11, 0.08); }
.lg-banner-info svg { color: #f59e0b; }

/* "Forgot password?" — small centered link below Sign In */
.lg-forgot { font-size: 13px; color: var(--lg-text-2); margin: 4px 0 0; text-align: center; }
.lg-forgot a { color: var(--p5-red); font-weight: 500; }

/* Click-through ToS line */
.lg-fineprint {
  font-size: 12px; color: var(--lg-text-2);
  margin: 0 0 8px; text-align: left; line-height: 1.6;
}
.lg-fineprint a { color: var(--lg-text-2); text-decoration: underline; }
.lg-fineprint a:hover { color: var(--p5-red); }

/* ── RIGHT: marketing column ──────────────────────────── */
.lg-right {
  position: relative; overflow: hidden;
  background: var(--lg-right-bg);
  display: flex; align-items: flex-start;
  padding: 88px 56px 24px;
  border-left: 1px solid var(--lg-border);
}
/* Decorative swooshes — pure CSS, no asset dependency */
.lg-right::before {
  content: ''; position: absolute; top: -10%; right: -20%;
  width: 80%; height: 60%;
  background: radial-gradient(ellipse at center, var(--lg-right-deco), transparent 70%);
  pointer-events: none;
}
.lg-right::after {
  content: ''; position: absolute; bottom: -20%; left: -10%;
  width: 70%; height: 50%;
  background: radial-gradient(ellipse at center, var(--lg-right-deco), transparent 70%);
  pointer-events: none;
}
.lg-side-kicker {
  position: absolute; left: 56px; top: 28px; z-index: 2;
  color: var(--lg-text-2); font-size: 15px; line-height: 1.4;
}
.lg-right-inner {
  position: relative; z-index: 1; width: 100%; max-width: 840px; margin: 0 auto;
  display: grid; grid-template-columns: 1.18fr 1fr;
  grid-template-areas: "eyebrow eyebrow" "tagline tagline" "sub sub" "cards cards" "features features";
  gap: 12px 22px; align-items: stretch;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(300px, 1fr) auto;
}
.lg-right-inner > .lg-side-eyebrow { grid-area: eyebrow; }
.lg-right-inner > .lg-tagline { grid-area: tagline; }
.lg-right-inner > .lg-tagline-sub { grid-area: sub; }
.lg-right-inner > .lg-features { grid-area: features; align-self: start; }
.lg-right-inner > .lg-cards { grid-area: cards; }
@media (max-width: 1280px) {
  .lg-right-inner { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "tagline" "sub" "cards" "features"; }
  .lg-right-inner > .lg-cards { display: grid; }
}
.lg-side-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--lg-muted); font-size: 14px; font-weight: 600;
}
.lg-side-dot { width: 10px; height: 10px; background: var(--p5-red); flex-shrink: 0; }

.lg-tagline {
  font-size: 64px; font-weight: 900; color: var(--lg-text);
  margin: 0; line-height: 1.12; letter-spacing: 0;
}
.lg-tagline span { display: inline; }
.lg-tagline > span:first-child { display: block; margin-bottom: 4px; }
.lg-tagline-accent { color: var(--p5-red); }
.lg-tagline-punct { color: var(--lg-muted); }
.lg-tagline-sub {
  font-size: 20px; color: var(--lg-text-2);
  margin: 0 0 12px; max-width: 700px; line-height: 1.55;
}

.lg-features { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.lg-features > li {
  /* Center icon vertically with the entire (title + description) block — was
   * flex-start which left the icon hovering above multi-line descriptions. */
  display: flex; align-items: flex-start; gap: 16px;
  padding: 0;
}
.lg-features > li:nth-child(4) { display: none; }
.lg-feat-icon {
  flex-shrink: 0; width: 42px; height: 42px;
  background: var(--lg-card-bg); color: var(--p5-red);
  border: 1px solid var(--lg-border); box-shadow: var(--lg-shadow-sm);
  display: flex; align-items: center; justify-content: center;
}
.lg-feat-icon svg { width: 20px; height: 20px; }
.lg-features h4 {
  font-size: 17px; font-weight: 900; color: var(--lg-text);
  margin: 0 0 2px; letter-spacing: 0;
}
.lg-features p {
  font-size: 14px; color: var(--lg-muted);
  margin: 0; line-height: 1.45;
}

/* Decorative card stack — gradient placeholders. Lives in its own grid track so it
 * never overlaps the marketing copy. Replace with real CDN screenshots later. */
.lg-cards {
  position: relative; width: 100%; min-height: 0; pointer-events: none;
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px; margin: 0;
  min-height: 300px;
}
.lg-stack-card {
  position: relative; border-radius: 0; overflow: hidden;
  border: 1px solid var(--lg-border); box-shadow: var(--lg-shadow-md);
  background: var(--lg-card-bg);
  display: flex; flex-direction: column; align-items: stretch; padding: 0;
  min-height: 0;
  transform: none;
}
/* Each card declares the gradient as background-color (fallback) AND a
 * background-image; if the image file is missing the gradient still shows so
 * the layout never breaks. Drop the 3 files at /img/login/{ai,comic,video}.webp
 * (any size, will be `cover`-sized into the card). */
.lg-stack-1 {
  grid-row: 1 / 3; width: auto; height: auto; min-height: 0;
}
.lg-stack-2 {
  width: auto; height: auto;
}
.lg-stack-3 {
  width: auto; height: auto;
}
.lg-stack-thumb {
  position: relative; overflow: hidden; min-height: 96px; flex: 1 1 140px;
  border-bottom: 1px solid var(--lg-border);
}
.lg-stack-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
.lg-stack-thumb::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.34));
  pointer-events: none;
}
.lg-stack-1 .lg-stack-thumb {
  min-height: 140px;
  background: linear-gradient(180deg, #7c1009 0%, #b8291f 42%, #250604 100%);
  border: 22px solid #351b17;
}
.lg-stack-1 .lg-stack-img { object-position: center top; }
.lg-stack-1 .lg-stack-thumb::after {
  display: none;
}
.lg-stack-2 .lg-stack-thumb {
  background: linear-gradient(180deg, #092044 0%, #16396f 58%, #0b142b 100%);
  border: 18px solid #bfb2e8;
}
.lg-stack-2 .lg-stack-img { object-position: center center; }
.lg-stack-2 .lg-stack-thumb::after {
  display: none;
}
.lg-stack-3 .lg-stack-thumb {
  background: linear-gradient(180deg, #f3ead2, #d7b662);
  border: 18px solid #f2e6bc;
}
.lg-stack-3 .lg-stack-img { object-position: center top; }
.lg-stack-3 .lg-stack-thumb::after {
  display: none;
}
.lg-stack-badge {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  background: rgba(0, 0, 0, 0.5); color: #fff;
  padding: 5px 10px; font-size: 11px; font-weight: 800;
  display: inline-block; letter-spacing: 0.02em;
}
.lg-stack-badge-light {
  background: rgba(255, 255, 255, 0.76); color: var(--lg-text);
}
.lg-stack-body {
  background: var(--lg-card-bg);
  padding: 14px 18px 16px;
  min-height: 76px;
}
.lg-stack-body span {
  display: block; color: var(--lg-muted); font-size: 12px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
}
.lg-stack-body strong {
  display: block; color: var(--lg-text); font-size: 17px; line-height: 1.25;
}

/* ── Footer ───────────────────────────────────────────── */
.lg-footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; justify-content: flex-start; gap: 12px;
  padding: 0 24px 10px; font-size: 12px; color: var(--lg-text-2);
  border-top: none; background: transparent;
  pointer-events: none;
}
.lg-footer a { color: var(--lg-text-2); }
.lg-footer a:hover { color: var(--p5-red); }
.lg-foot-sep { color: var(--lg-muted); }

/* ── Toast (copied from desktop pattern, scoped) ──────── */
.lg-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--lg-card-bg); border: 1px solid var(--lg-border);
  color: var(--lg-text); padding: 12px 20px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 100; max-width: 400px;
}
.lg-toast.lg-toast-error { border-color: #ef4444; color: #ef4444; }
.lg-toast.lg-toast-success { border-color: #10b981; color: #10b981; }

@media (max-width: 1680px), (max-height: 900px) {
  .lg-right { padding: 70px 40px 18px; }
  .lg-side-kicker { left: 40px; top: 24px; font-size: 14px; }
  .lg-right-inner {
    max-width: 760px;
    gap: 9px 14px;
    grid-template-rows: auto auto auto minmax(250px, 1fr) auto;
  }
  .lg-tagline { font-size: 52px; line-height: 1.12; }
  .lg-tagline > span:first-child { margin-bottom: 3px; }
  .lg-tagline-sub { font-size: 17px; line-height: 1.45; margin-bottom: 6px; max-width: 640px; }
  .lg-cards { min-height: 250px; gap: 12px; }
  .lg-stack-thumb { min-height: 86px; flex-basis: 112px; }
  .lg-stack-1 .lg-stack-thumb { min-height: 112px; border-width: 16px; }
  .lg-stack-2 .lg-stack-thumb,
  .lg-stack-3 .lg-stack-thumb { border-width: 12px; }
  .lg-stack-body { min-height: 60px; padding: 10px 14px 12px; }
  .lg-stack-body span { font-size: 10.5px; margin-bottom: 4px; }
  .lg-stack-body strong { font-size: 15px; }
  .lg-features { gap: 8px; margin-top: 8px; }
  .lg-feat-icon { width: 36px; height: 36px; }
  .lg-feat-icon svg { width: 18px; height: 18px; }
  .lg-features h4 { font-size: 15px; }
  .lg-features p { font-size: 12.5px; line-height: 1.35; }
}

@media (max-width: 1360px), (max-height: 780px) {
  .lg-right { padding: 56px 30px 16px; }
  .lg-side-kicker { left: 30px; top: 18px; font-size: 13px; }
  .lg-side-eyebrow { font-size: 13px; gap: 10px; }
  .lg-side-dot { width: 8px; height: 8px; }
  .lg-right-inner {
    max-width: 680px;
    gap: 7px 10px;
    grid-template-rows: auto auto auto minmax(210px, 1fr) auto;
  }
  .lg-tagline { font-size: 42px; line-height: 1.13; }
  .lg-tagline > span:first-child { margin-bottom: 2px; }
  .lg-tagline-sub { font-size: 15px; line-height: 1.35; margin-bottom: 4px; }
  .lg-cards { min-height: 210px; gap: 10px; }
  .lg-stack-thumb { min-height: 74px; flex-basis: 92px; }
  .lg-stack-1 .lg-stack-thumb { min-height: 92px; border-width: 12px; }
  .lg-stack-2 .lg-stack-thumb,
  .lg-stack-3 .lg-stack-thumb { border-width: 8px; }
  .lg-stack-badge { left: 10px; bottom: 8px; padding: 4px 8px; font-size: 10px; }
  .lg-stack-body { min-height: 50px; padding: 8px 12px 10px; }
  .lg-stack-body span { font-size: 10px; margin-bottom: 3px; }
  .lg-stack-body strong { font-size: 14px; }
  .lg-features { gap: 6px; margin-top: 8px; }
  .lg-features > li { gap: 12px; }
  .lg-feat-icon { width: 34px; height: 34px; }
  .lg-feat-icon svg { width: 17px; height: 17px; }
  .lg-features h4 { font-size: 14px; }
  .lg-features p { display: none; }
}

@media (max-width: 1180px) {
  .lg-right { padding: 52px 24px 14px; }
  .lg-side-kicker { left: 24px; top: 16px; }
  .lg-right-inner {
    max-width: 560px;
    grid-template-rows: auto auto auto minmax(190px, 1fr) auto;
  }
  .lg-tagline { font-size: 36px; line-height: 1.13; }
  .lg-tagline-sub { font-size: 14px; }
  .lg-cards { min-height: 190px; }
  .lg-stack-body strong { font-size: 13px; }
}

/* ================================================================
   H5 LOGIN POLISH (≤768px) — append-only overrides
   Goal: kill marketing column on phones, center auth card to first
   screen, trim density, fix touch targets. Desktop untouched.
   ================================================================ */
@media (max-width: 768px) {
  /* Force-hide marketing column. Some mobile browsers (e.g. vivo desktop
     mode) ignore the existing 960px rule, so `!important` here is belt+
     suspenders. Also collapse grid to single column unconditionally. */
  .lg-right,
  .lg-cards,
  .lg-stack-card { display: none !important; }
  .lg-grid {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }

  /* Center auth card in viewport — no empty band below the form. */
  .lg-left {
    min-height: calc(100vh - 80px);
    padding: 16px 12px;
  }
  .lg-card {
    width: 100%; max-width: 420px;
    padding: 24px 18px !important;
    border: none;
  }

  /* Top-bar safe inset. */
  .lg-topbar { top: 12px !important; right: 12px !important; }

  /* Logo + title hierarchy: smaller logo, tighter title. */
  .lg-logo { margin-bottom: 18px; }
  .lg-logo-img { width: 116px; }
  .lg-h1 { font-size: 22px; margin-bottom: 4px; }
  .lg-sub { font-size: 13px; margin-bottom: 16px; }

  /* Density: drop the legacy <hr> separator (it's just visual noise here). */
  .lg-rule { display: none; }

  /* Grow primary buttons to comfortable touch height (≥44px). */
  .lg-btn-google,
  .lg-btn-primary { padding: 14px !important; font-size: 14px; }

  /* Hint line: lighter, less prominent — let it breathe but stay readable. */
  .lg-hint { font-size: 12px; margin: 8px 0; opacity: 0.85; }

  /* Legal fineprint links: enlarge tap target without disturbing flow. */
  .lg-fineprint { font-size: 12px; line-height: 1.7; }
  .lg-fineprint a { display: inline-block; padding: 4px 2px; }

  /* Footer copyright — keep but compact. */
  .lg-footer { position: static; font-size: 11px; padding: 12px 0; }
}
