/* lapoty-auth login page. Tokens copied from each app's Lapoty theme:
   cosy (Books, Recipes) follows the phone's light/dark setting, cool (Gym) is dark only.
   No web fonts: the apps' font files sit behind the login. */
:root {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --line: #e2d8c9;
  --ink: #2a241e;
  --muted: #6f6357;
  --accent: #d9963f;
  --accent-ink: #1a1410;
  --danger: #b3261e;
  --radius: 14px;
  --head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}
[data-app="recipes"] { --accent: #c0532f; --accent-ink: #fff; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #1c1815;
    --line: #302a24;
    --ink: #f0e9e0;
    --muted: #a89c8d;
    --accent: #e0a45c;
    --accent-ink: #1a1410;
    --danger: #e8796b;
    color-scheme: dark;
  }
  [data-app="recipes"] { --accent: #e0754f; --accent-ink: #1b1815; }
}

[data-mood="cool"] {
  --bg: #0d0f0d;
  --surface: #16181a;
  --line: #2b2f33;
  --ink: #f2f4f0;
  --muted: #8a9088;
  --accent: #d4ff3f;
  --accent-ink: #0c0e08;
  --danger: #ff5d5d;
  --radius: 16px;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
}

.wordmark {
  margin: 0;
  font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 6px 0 20px;
  font: 600 30px/1.1 var(--head);
}
[data-mood="cool"] h1 { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input {
  width: 100%;
  font: inherit;
  font-size: 17px;               /* >= 16px so iOS doesn't zoom on focus */
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

button {
  width: 100%;
  margin-top: 22px;
  font: 600 17px/1 system-ui, -apple-system, sans-serif;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 15px;
  cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.error {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 15px;
}
