:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #dcefe6;
  --card: #ffffff;
  --ink: #17283f;
  --muted: #51627a;
  --line: #b9cfc4;
  --accent: #17283f;
  --accent-text: #ffffff;
  --sun: #f2b134;
  --focus: #0b7a5a;
  --error: #b3261e;
  --ok: #0b7a5a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1c2b; --card: #172a40; --ink: #eaf3ee; --muted: #9db2c6; --line: #2e4660;
    --accent: #f2b134; --accent-text: #17283f; --focus: #7fe0b8; --error: #ff8a80; --ok: #7fe0b8;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1c2b; --card: #172a40; --ink: #eaf3ee; --muted: #9db2c6; --line: #2e4660;
  --accent: #f2b134; --accent-text: #17283f; --focus: #7fe0b8; --error: #ff8a80; --ok: #7fe0b8;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 24px 16px;
}
h1, h2, .display {
  font-family: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
}
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
input, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
select option { color: #17283f; background: #fff; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.invalid { border-color: var(--error); }
.error { color: var(--error); font-size: 0.9rem; margin: 6px 0 0; }
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  min-height: 46px;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
[hidden] { display: none !important; }
