:root {
  --ink: #0a0908;
  --paper: #faf6ed;
  --card: #ffffff;
  --line: #e4dccb;
  --muted: #6b6558;
  --accent: #d97757;
  --accent-ink: #ffffff;
  --err: #b3261e;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  overflow-x: clip;
}
html { -webkit-text-size-adjust: 100%; }
body {
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }

.top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 12px 16px;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  text-decoration: none;
  margin-right: auto;
}
.brand span { color: var(--muted); font-family: system-ui, sans-serif; font-size: 14px; }
.acct { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.inline { margin: 0; }

.page {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
}
h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(22px, 6vw, 28px);
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lead { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: var(--err);
}
.form { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 14px; color: var(--muted); }
input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* >=16px: iOS does not zoom on focus */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input.code { font-size: 24px; letter-spacing: 0.3em; text-align: center; }
.btn {
  min-height: 48px;
  min-width: 44px;
  margin-top: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.95); }
.btn-ghost {
  margin: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  font-weight: 400;
}
.alt { margin: 16px 0 0; font-size: 14px; }
.alt a { display: inline-block; padding: 12px 0; color: var(--muted); }

.foot { padding: 16px; text-align: center; }
.badge {
  display: inline-block;
  padding: 12px 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.badge:hover { color: var(--ink); border-color: var(--muted); }

/* connect / branches */
a.btn { display: block; text-align: center; text-decoration: none; line-height: 28px; }
.btn-block { width: 100%; margin-top: 16px; }
.err-line { margin: 0; }
.err-list { margin: 8px 0 0; padding-left: 20px; overflow-wrap: anywhere; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.check input { width: 22px; min-height: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.check-text { min-width: 0; overflow-wrap: anywhere; }
.check small { display: block; color: var(--muted); font-size: 13px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row { padding: 12px; border: 1px solid var(--line); border-radius: 10px; overflow-wrap: anywhere; }
.row-name { display: block; font-weight: 600; }
.row-meta { display: block; color: var(--muted); font-size: 14px; }
.row-warn { display: block; margin-top: 4px; color: var(--err); font-size: 14px; }
.btn-link { display: inline-block; padding: 12px 0; color: var(--ink); }
