/* Auth screens deliberately do not load the prototype theme/repainting code. */
:root {
  color-scheme: light;
  --auth-bg: #f4f8fb; --auth-card: #fff; --auth-text: #12323f;
  --auth-muted: #516674; --auth-accent: #08758c; --auth-line: #dbe6ec;
  --auth-soft: #edf6f8; --auth-shadow: 0 24px 80px #193e5312, 0 2px 8px #193e5305;
  --auth-art: url('bg/day-v4-wide-1672.webp'); --auth-art-opacity: .27;
}
html[data-ml-theme="dark"] {
  color-scheme: dark;
  --auth-bg: #081421; --auth-card: #112130; --auth-text: #f1f6fb;
  --auth-muted: #b3c4d0; --auth-accent: #85dcf1; --auth-line: #304654;
  --auth-soft: #182e3c; --auth-shadow: 0 24px 80px #0004, 0 2px 8px #0002;
  --auth-art: url('bg/night-v4-wide-1672.webp'); --auth-art-opacity: .23;
}
@media (prefers-color-scheme: dark) {
  html:not([data-ml-theme]) { color-scheme: dark; --auth-bg: #081421; --auth-card: #112130; --auth-text: #f1f6fb; --auth-muted: #b3c4d0; --auth-accent: #85dcf1; --auth-line: #304654; --auth-soft: #182e3c; --auth-shadow: 0 24px 80px #0004; --auth-art: url('bg/night-v4-wide-1672.webp'); --auth-art-opacity: .23; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; background: var(--auth-bg); scroll-padding-top: 24px; }
body.ml-auth { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; font-family: Assistant, Arial, sans-serif; color: var(--auth-text); font-size: 16px; line-height: 1.65; position: relative; isolation: isolate; }
body.ml-auth::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--auth-art) center / cover no-repeat; opacity: var(--auth-art-opacity); }
a { color: var(--auth-accent); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--auth-accent); outline-offset: 5px; border-radius: 5px; }
.auth-skip { position: fixed; inset-block-start: -100px; inset-inline-start: 16px; z-index: 10; background: var(--auth-card); padding: 12px 20px; }
.auth-skip:focus { inset-block-start: 12px; }
.auth-header { width: min(1200px, 100%); margin-inline: auto; padding: 28px 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--auth-text); text-decoration: none; font-size: 27px; font-weight: 800; line-height: 1.1; letter-spacing: -.7px; }
.auth-brand-sub { display: block; font-size: 10px; letter-spacing: 4.5px; font-weight: 700; margin-top: 6px; }
.auth-brand-mark { background: #fff; border: 1px solid #dbe6ec; border-radius: 16px; width: 58px; height: 62px; display: grid; place-items: center; }
.auth-brand img { display: block; width: 44px; height: 50px; object-fit: contain; }
.auth-header-actions { display: flex; align-items: center; gap: 22px; }
.auth-header-actions a { color: var(--auth-muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.auth-theme { width: 44px; height: 44px; border: 1px solid var(--auth-line); border-radius: 50%; background: var(--auth-card); font-size: 24px; display: grid; place-items: center; }
.auth-theme:hover { background: var(--auth-soft); }
.auth-main { flex: 1; width: min(1120px, 100%); margin: auto; padding: 36px 40px 54px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); grid-template-areas: 'story card'; gap: clamp(40px, 6vw, 90px); align-items: center; }
.auth-card { grid-area: card; min-width: 0; position: relative; overflow: hidden; padding: 44px 34px 26px; border: 1px solid var(--auth-line); border-radius: 28px; background: var(--auth-card); box-shadow: var(--auth-shadow); }
.auth-card::before { content: ''; position: absolute; top: 0; inset-inline: 34px; height: 3px; border-radius: 0 0 5px 5px; background: linear-gradient(90deg, #9a73d8, #28a9c5, #60b89b); }
.auth-eyebrow { color: var(--auth-accent); font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.auth-card h1 { margin: 0; font-size: clamp(27px, 2.5vw, 33px); line-height: 1.2; font-weight: 800; letter-spacing: -.6px; text-wrap: balance; }
.auth-intro { margin: 14px 0 28px; color: var(--auth-muted); font-size: 17px; line-height: 1.7; }
.auth-access { min-height: 56px; position: relative; display: grid; place-items: center; }
.auth-google { min-width: 0; max-width: 100%; direction: ltr; display: flex; justify-content: center; }
.auth-google:empty { display: none; }
.auth-access[aria-busy="true"] .auth-google { visibility: hidden; pointer-events: none; }
.auth-loading { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; color: var(--auth-muted); }
.auth-spinner { width: 18px; height: 18px; border: 2px solid var(--auth-line); border-top-color: var(--auth-accent); border-radius: 50%; animation: auth-spin 1s linear infinite; flex: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-google-note { color: var(--auth-muted); text-align: center; font-size: 14px; margin: 14px 0 0; }
.auth-status { margin: 16px 0 0; border-radius: 12px; background: var(--auth-soft); padding: 12px 14px; font-size: 15px; overflow-wrap: anywhere; }
.auth-status:empty { display: none; }
.auth-status.is-error { border-inline-start: 3px solid #d45454; }
.auth-retry { width: 100%; min-height: 44px; border: 1px solid var(--auth-line); border-radius: 12px; background: var(--auth-soft); margin-top: 10px; font-weight: 700; }
.auth-terms { font-size: 13px; line-height: 1.9; color: var(--auth-muted); margin: 24px 0; text-align: center; }
.auth-switch { padding-top: 22px; border-top: 1px solid var(--auth-line); text-align: center; font-size: 15px; }
.auth-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; margin-inline-start: 4px; }
.auth-help { border-top: 1px solid var(--auth-line); margin-top: 16px; padding-top: 8px; font-size: 14px; color: var(--auth-muted); }
.auth-help summary { cursor: pointer; padding-block: 12px; min-height: 44px; }
.auth-help p { margin: 2px 0 8px; }
.auth-help a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-primary { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 54px; padding: 12px; border-radius: 13px; background: #08758c; color: #fff; font-weight: 700; text-decoration: none; }
.auth-story { grid-area: story; padding-block: 20px; min-width: 0; }
.auth-kicker { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--auth-accent); font-weight: 700; margin: 0 0 18px; }
.auth-kicker span { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-accent); box-shadow: 0 0 0 5px var(--auth-soft); }
.auth-story h2 { font-size: clamp(36px, 4.2vw, 56px); font-weight: 800; line-height: 1.12; letter-spacing: -1.4px; margin: 0; text-wrap: balance; }
.auth-story em { font-style: normal; color: var(--auth-accent); }
.auth-story-intro { margin: 22px 0 30px; color: var(--auth-muted); font-size: 19px; line-height: 1.7; }
.auth-features { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.auth-features li { display: flex; gap: 15px; align-items: center; }
.auth-feature-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--auth-line); border-radius: 14px; color: var(--auth-accent); background: var(--auth-card); font-size: 13px; font-weight: 700; }
.auth-features strong { display: block; font-size: 17px; }
.auth-features div > span { display: block; font-size: 15px; color: var(--auth-muted); }
.auth-signature { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--auth-line); font-size: 14px; color: var(--auth-muted); }
.auth-signature span { white-space: nowrap; }
.auth-plans { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; margin-top: 24px; font-weight: 700; }
.auth-footer { width: min(1200px, 100%); margin-inline: auto; padding: 22px 40px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; align-items: center; color: var(--auth-muted); font-size: 13px; }
.auth-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.auth-footer a { color: var(--auth-muted); display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 800px) {
  .auth-header { padding: 20px 24px; }
  .auth-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'card' 'story'; gap: 36px; max-width: 540px; padding: 18px 24px 24px; }
  .auth-story { padding: 0 10px; }
  .auth-story h2 { font-size: 36px; }
  .auth-story-intro { font-size: 17px; margin-block: 16px 24px; }
  .auth-footer { padding: 16px 24px; justify-content: center; text-align: center; }
  .auth-card { padding: 34px 28px 22px; border-radius: 24px; }
  :root { --auth-art: url('bg/day-v4-portrait-941.webp'); }
  html[data-ml-theme="dark"] { --auth-art: url('bg/night-v4-portrait-941.webp'); }
}
@media (max-width: 380px) {
  .auth-header { padding: 16px; gap: 10px; }
  .auth-brand { font-size: 22px; gap: 8px; }
  .auth-brand-mark { width: 44px; height: 50px; border-radius: 12px; }
  .auth-brand img { width: 34px; height: 42px; }
  .auth-header-actions { gap: 8px; }
  .auth-header-actions a { font-size: 13px; }
  .auth-main { padding-inline: 12px; }
  .auth-card { padding-inline: 20px; }
  .auth-card h1 { font-size: 27px; }
}
@media (max-width: 800px) and (prefers-color-scheme: dark) {
  html:not([data-ml-theme]) { --auth-art: url('bg/night-v4-portrait-941.webp'); }
}
@media (prefers-reduced-motion: reduce) { .auth-spinner { animation: none; } }
@media (prefers-reduced-transparency: reduce) { body.ml-auth::before { display: none; } }
@media (forced-colors: active) { body.ml-auth::before { display: none; } .auth-card, .auth-feature-icon, .auth-theme { border: 1px solid CanvasText; } }
