:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  /* Day: Apple iPhone 18 Pro Glacier (#e8f2ff, read from apple.com swatch) ground and tonal buttons. */
  --bg: #e8f2ff;
  --surface: #ffffff;
  --field: #ffffff;
  --text: #13202e;
  --muted: #5b6675;
  --border: #d3e1f2;
  --border-strong: #b3c9e4;
  --hover: #f3f8ff;
  --accent: #e8f2ff;
  --accent-hover: #dceaff;
  --accent-border: #b3c9e4;
  --on-accent: #1f4e7a;
  --link: #2f5f8f;
  --focus: #2f5f8f;
  --disabled-bg: #eef2f7;
  --disabled-text: #8a8f96;
  --danger: #b42318;
  color: var(--text);
  background: var(--bg);
  color-scheme: light dark;
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Night: Classic Blue deepened to navy, with a light tint of the same hue as accent. */
    --bg: #0a111c;
    --surface: #101a29;
    --field: #0c1522;
    --text: #ecf1f7;
    --muted: #a3b1c2;
    --border: #24344a;
    --border-strong: #3d5574;
    --hover: #172538;
    --accent: #8db8e8;
    --accent-hover: #a9cbf0;
    --accent-border: #8db8e8;
    --on-accent: #0a1f38;
    --link: #8db8e8;
    --focus: #8db8e8;
    --disabled-bg: #152132;
    --disabled-text: #7d8b9c;
    --danger: #ffb4ab;
  }
}
body { background: var(--bg); }
* { box-sizing: border-box; min-width: 0; }
body { margin: 0; min-height: 100svh; padding: 72px 24px 40px; }
main { width: min(440px, 100%); margin: 0 auto; padding: 32px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.brand { font-size: 14px; line-height: 1.5; color: var(--muted); font-weight: 600; margin: 0 0 28px; }
h1 { margin: 0 0 24px; font-size: 26px; letter-spacing: -.025em; line-height: 1.35; font-weight: 650; }
p { line-height: 1.65; color: var(--muted); font-size: 14px; }
.lead { margin: 12px 0 24px; }
h1 + .lead { margin-top: -12px; }
.lead + .destination { margin: -16px 0 24px; font-size: 13px; }
.destination strong { color: var(--text); font-weight: 600; }
.login-actions { display: grid; gap: 12px; }
.button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 11px 16px; margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); color: var(--text); text-decoration: none; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.5; cursor: pointer; transition: background .15s, border-color .15s; }
.login-actions .button { margin: 0; }
.button svg { flex: none; width: 21px; height: 21px; }
.button:hover { background: var(--hover); border-color: var(--border-strong); }
.apple { background: var(--accent); color: var(--on-accent); border-color: var(--accent-border); }
.apple:hover { background: var(--accent-hover); border-color: var(--accent-border); }
.disabled, .button:disabled, .button:disabled:hover { cursor: not-allowed; background: var(--disabled-bg); color: var(--disabled-text); border-color: var(--border); }
.login-status { font-size: 14px; margin: 16px 0 0; min-height: 24px; overflow-wrap: anywhere; }
.login-status:empty { margin: 0; min-height: 0; }
a { color: var(--link); }
.login-status a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; text-underline-offset: 4px; }
.hint { font-size: 13px; line-height: 1.75; margin: 24px 0 0; color: var(--muted); }
.secondary-actions { margin: 24px 0 -10px; padding-top: 10px; border-top: 1px solid var(--border); text-align: center; }
.secondary-actions p { margin: 0; font-size: 14px; line-height: 1.5; }
.secondary-actions a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--link); font-weight: 600; text-decoration: none; }
.secondary-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.recovery { margin: 12px 0 -8px; font-size: 13px; }
.recovery a { display: inline-flex; align-items: center; min-height: 48px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.recovery a:hover { color: var(--text); }
:is(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
@media (max-width: 540px) {
  body { padding: 40px 20px 28px; }
  main { padding: 24px; border-radius: 16px; }
  .brand { margin-bottom: 24px; }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
