/* Pickle web pages: same tokens as the app theme (ui/theme/Color.kt). */
@font-face {
  font-family: "Fredoka";
  src: url("fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --primary: #33802a;          /* Green600 */
  --primary-pressed: #2a6b22;  /* Green700 */
  --on-primary: #ffffff;
  --primary-container: #d4f2c1; /* Green100 */
  --secondary: #6d4ae0;        /* Violet600 */
  --secondary-container: #e9e1ff;
  --on-secondary-container: #2a1470;
  --bg: #ffffff;
  --bg-top: #d4f2c1;
  --surface: #ffffff;
  --text: #1a1d17;             /* Neutral10 */
  --text-muted: #4a5446;       /* Neutral40 */
  --outline: #c9d2c0;          /* Neutral80 */
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error-container: #410002;
  --focus: #6d4ae0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #9cd883;        /* Green300 */
    --primary-pressed: #b7e3a0;
    --on-primary: #0a2906;
    --primary-container: #1f5418;
    --secondary: #cbbeff;
    --secondary-container: #4a2bae;
    --on-secondary-container: #e9e1ff;
    --bg: #111410;
    --bg-top: #1f3a1a;
    --surface: #1d201b;
    --text: #e2e4dc;
    --text-muted: #c2c9b9;
    --outline: #454b41;
    --error: #ffb4ab;
    --error-container: #93000a;
    --on-error-container: #ffdad6;
    --focus: #cbbeff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 340px) var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 28px;
}
.brand svg { width: 34px; height: 34px; }

.mascot { display: block; width: 88px; height: 124px; margin: 8px 0 16px; }
.mascot.wobble { animation: wobble 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.mascot.sad { transform: rotate(-12deg); }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .mascot.wobble { animation: none; } }

h1 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 8px;
}

p { margin: 0 0 16px; color: var(--text-muted); }
p strong { color: var(--text); }

form { margin-top: 24px; display: grid; gap: 16px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 6px 4px;
}
.input-wrap { position: relative; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--outline);
  border-radius: 18px;
  padding: 15px 56px 15px 18px;
  outline: none;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.field.invalid input { border-color: var(--error); }
.field .hint { font-size: 13px; margin: 6px 0 0 18px; color: var(--text-muted); }
.field.invalid .hint { color: var(--error); }

.toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.toggle:focus-visible { outline: 2px solid var(--focus); }
.toggle svg { width: 22px; height: 22px; }

.button {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.button:hover { background: var(--primary-pressed); }
.button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.button[disabled] { opacity: .7; cursor: progress; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  border-radius: 18px;
  padding: 12px 16px;
  background: var(--error-container);
  color: var(--on-error-container);
  font-size: 15px;
}

.steps {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-radius: 24px;
  padding: 16px 20px 16px 40px;
  margin: 8px 0 0;
}
.steps li { margin: 4px 0; }

.footer { margin-top: 40px; font-size: 13px; color: var(--text-muted); }

/* Legal texts (privacy/, terms/): long reading pages, generated by scripts/generate_legal_web.py. */
main.legal { max-width: 720px; }
.legal .brand { margin-bottom: 12px; }
.lang-switch { margin-bottom: 24px; font-size: 15px; }
.legal article + article { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--outline); }
.legal h2 { font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 21px; color: var(--primary); margin: 32px 0 8px; }
.legal h3 { font-size: 17px; margin: 20px 0 6px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; color: var(--text-muted); }
.legal li { margin: 4px 0; }
.legal a, .footer a { color: var(--primary); }
.legal :target { scroll-margin-top: 16px; }

[hidden] { display: none !important; }
