:root {
  --bg: #f6f1e7;
  --fg: #2b2620;
  --muted: #7a7064;
  --field: #fffdf8;
  --border: #d8cfc1;
  --honey: #c98a2b;
  --honey-pressed: #a8711f;
  --on-honey: #ffffff;
  --danger: #a3221b;
  --body-size: 17px;
  --send-height: 128px;
  --send-text: 24px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1b16;
    --fg: #f1e9dc;
    --muted: #b3a795;
    --field: #2a251f;
    --border: #4a4238;
    --honey: #d79a3c;
    --honey-pressed: #b9822e;
    --on-honey: #1f1b16;
    --danger: #ff8a7f;
  }
}
body.large {
  --body-size: 21px;
  --send-height: 160px;
  --send-text: 30px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--body-size);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  min-height: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}
[hidden] { display: none !important; }   /* #home sets display:flex, which would beat [hidden] */

/* Home */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.to {
  margin: 0;
  text-align: center;
  color: var(--muted);
}
.send {
  width: 100%;
  min-height: var(--send-height);
  border: none;
  border-radius: 28px;
  background: var(--honey);
  color: var(--on-honey);
  font: inherit;
  font-size: var(--send-text);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.send:active { background: var(--honey-pressed); }
.send:disabled { opacity: 0.55; }
.line {
  min-height: 3em;
  margin: 0;
  text-align: center;
}

/* Setup */
h1 { font-size: 1.4em; margin: 0 0 4px; }
.hint { color: var(--muted); margin: 0 0 16px; }
label { display: block; margin: 14px 0 4px; }
input:not([type=checkbox]) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
}
label.check { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 18px; }
label.check input { width: 24px; height: 24px; }
.primary {
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border: none;
  border-radius: 14px;
  background: var(--honey);
  color: var(--on-honey);
  font: inherit;
  font-weight: 600;
}
.link {
  display: block;
  margin: 18px auto 0;
  min-height: 48px;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: underline;
}
#home .link { margin-top: 0; }
.link.danger { color: var(--danger); }
.diag { margin-top: 24px; color: var(--muted); font-size: 0.8em; text-align: center; }
