/* card.css — one clean default, light and dark. Change the look here. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #16181d;
  --muted: #5b606b;
  --line: #e2ded5;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --surface: #20232a;
    --ink: #eceae4;
    --muted: #a3a7b0;
    --line: #333740;
    --accent: #7cb7e0;
    --accent-ink: #0d1b26;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
#app { max-width: 440px; margin: 0 auto; }
a { color: var(--accent); }

/* ---- card ---- */
.card header { margin: 8px 0 16px; }
.name { font-size: 2rem; line-height: 1.1; margin: 0; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sub { margin: 6px 0 0; font-size: 1.05rem; color: var(--muted); }
.note { margin: 6px 0 0; font-size: 1rem; }

.rows { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; min-height: 48px; text-decoration: none; color: var(--ink); }
.rows .k { flex: 0 0 3.5em; font-size: 0.85rem; color: var(--muted); }
.rows .v { font-size: 1.1rem; color: var(--accent); overflow-wrap: anywhere; }
.rows:empty { display: none; }

.qr-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: 999px; background: var(--line); }
.qr-tabs button { flex: 1; border: 0; border-radius: 999px; padding: 8px; font: inherit; font-size: 0.95rem; background: transparent; color: var(--muted); cursor: pointer; }
.qr-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }

.qr-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: var(--radius); }
.qr-track::-webkit-scrollbar { display: none; }
.qr-panel { flex: 0 0 100%; scroll-snap-align: center; margin: 0; }
/* Always a white ground behind the code, dark mode included: scanners need it. */
.qr-box { background: #fff; border-radius: var(--radius); padding: 0; overflow: hidden; border: 1px solid var(--line); }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-panel figcaption { text-align: center; padding: 8px 0 0; font-size: 1rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.actions > * { flex: 1 1 140px; }
button, .button {
  font: inherit; font-size: 1rem; text-align: center; text-decoration: none;
  padding: 12px 16px; min-height: 48px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button:disabled, .button[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }

.foot { margin-top: 24px; font-size: 0.9rem; color: var(--muted); text-align: center; }
.foot p { margin: 4px 0; overflow-wrap: anywhere; }

/* ---- top bar: the site's own hostname is the home link, and it stays legible in a photo ---- */
.top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.95rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand:hover, .brand:focus-visible { color: var(--accent); }
.brand .home { font-size: 1.2rem; line-height: 1; }

/* ---- generator ---- */
.gen h1 { font-size: 1.8rem; margin: 8px 0 4px; }
.gen h2 { font-size: 1.1rem; margin: 24px 0 8px; }
.lede { margin: 0 0 12px; color: var(--muted); }
.privacy { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-size: 0.95rem; }
.notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--accent); }
.gen-form { display: grid; gap: 12px; }
.field label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 4px; }
.field input:not([type="checkbox"]) {
  width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.field .qr-only { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.85rem; }
.preview { padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); }
.preview .name { font-size: 1.6rem; }
.link-out { display: block; margin-top: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.hint { color: var(--muted); margin: 0; }
.howto p { margin: 4px 0; }
