:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --page-bg: #1b1d21;
  --page-top: #2d3036;
  --text: #f2f3f5;
  --surface: #23262b;
  --surface-raised: #2d3036;
  --border: #5c6373bc;
  --muted: #9ca3ad;
  --accent: #8fcfd4;
  --accent-text: #13171c;
  --danger: #f0636e;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --page-bg: #ddd9d2;
    --page-top: #cdc9c1;
    --text: #25211b;
    --surface: #ece9e2;
    --surface-raised: #cdc9c1;
    --border: #6e6659a8;
    --muted: #584f44;
    --accent: #8fcfd4;
    --accent-text: #13171c;
    --danger: #b82e33;
  }
}
* { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: radial-gradient(circle at top, var(--page-top), var(--page-bg) 60%); }
main {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding:
    max(8vh, calc(1.5rem + env(safe-area-inset-top, 0px)))
    calc(1rem + env(safe-area-inset-right, 0px))
    calc(2rem + env(safe-area-inset-bottom, 0px))
    calc(1rem + env(safe-area-inset-left, 0px));
}
section { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 1.2rem; box-shadow: 0 10px 35px #0004; }
h1 { margin: 0 0 .6rem; font-size: clamp(1.25rem, 6vw, 1.5rem); }
p { color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
label { display: grid; gap: .35rem; color: var(--text); font-size: .85rem; margin-top: 1rem; }
input, button { font-family: inherit; font-size: max(1rem, 16px); }
input { width: 100%; min-height: 2.75rem; border: 1px solid var(--border); border-radius: 9px; padding: .65rem .7rem; color: var(--text); background: var(--surface-raised); }
button { width: 100%; margin-top: 1.1rem; min-height: 2.75rem; border: 0; border-radius: 10px; padding: .7rem 1rem; color: var(--accent-text); background: var(--accent); font-weight: 700; cursor: pointer; touch-action: manipulation; }
.message { min-height: 1.3rem; color: var(--accent); overflow-wrap: anywhere; }
.error { color: var(--danger); }
small { color: var(--muted); }
