:root {
  --bg: #f6f6f4;
  --fg: #1a1a18;
  --muted: #6b6b66;
  --line: #d2d2cc;
  --card: #fff;
  --accent: #1b3a5c;
  --accent-fg: #fff;
  --err: #a32020;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --fg: #e9e9e6;
    --muted: #9a9a94;
    --line: #34363b;
    --card: #1f2126;
    --accent: #6ea8dc;
    --accent-fg: #10161d;
    --err: #ff9b8f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 system-ui, sans-serif;
}

#app {
  max-width: 34rem;
  margin: 0 auto;
  padding: 1.5rem 1rem calc(2rem + env(safe-area-inset-bottom));
}

h1 { font-size: 1.35rem; line-height: 1.3; margin: .2rem 0 1rem; }
p { margin: .5rem 0; }

.nr { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.hint { color: var(--muted); font-size: .9rem; }
.lbl { font-weight: 600; margin: 0 0 .4rem; }

.ctl { margin: 0 0 1.5rem; }
.opts { display: flex; flex-direction: column; gap: .5rem; }

button, input, textarea {
  font: inherit;
  color: inherit;
  border-radius: .5rem;
  border: 1px solid var(--line);
  background: var(--card);
  padding: .75rem;
  min-height: 3rem;
}

input, textarea { width: 100%; }
textarea { resize: vertical; }

.opt { text-align: left; cursor: pointer; }
.opt.on { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); font-weight: 600; }

.row { display: flex; gap: .5rem; }
.now { flex: 0 0 auto; cursor: pointer; }

.nav { display: flex; gap: .75rem; margin-top: 1.5rem; }
.nav.col { flex-direction: column; margin-top: 2rem; }
.nav button { flex: 1; cursor: pointer; }
.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }

.link {
  background: none; border: none; padding: 0; min-height: 0;
  color: var(--muted); text-decoration: underline; cursor: pointer;
}

.notice, .error, .pending {
  padding: .6rem .75rem;
  border-radius: .5rem;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: .95rem;
}
.error { border-color: var(--err); color: var(--err); }

pre { white-space: pre-wrap; font-size: .85rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
