:root {
  color-scheme: dark;
  --bg: #14161a;
  --panel: #1c1f26;
  --line: #2c313b;
  --text: #e6e8ec;
  --dim: #939aa8;
  --accent: #6ea8fe;
  --warn: #e8b339;
  --bad: #f0736a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  justify-content: center;
  padding: 3rem 1rem;
}

main { width: 100%; max-width: 34rem; }

h1 { font-size: 1.6rem; margin: 0; letter-spacing: -0.02em; }
.sub { color: var(--dim); margin: 0.25rem 0 1.5rem; }

label { display: block; font-size: 0.8rem; color: var(--dim); margin-bottom: 0.35rem; }

.field { margin-bottom: 1rem; }
.field.collapsed { opacity: 0.45; }
.row { display: flex; gap: 1rem; }
.row .field { flex: 1; }

input, textarea, select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

button {
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #10131a;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
button.secondary { background: transparent; color: var(--dim); border: 1px solid var(--line); }

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tab {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  font-weight: 400;
  padding: 0.35rem 0.9rem;
}
.tab.active { color: var(--text); border-color: var(--accent); }

.linkbox { display: flex; gap: 0.5rem; align-items: flex-start; }
.linkbox input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.hint { color: var(--dim); font-size: 0.8rem; margin: 0.4rem 0 0; }
.hint.warn { color: var(--warn); }
.hint code { color: var(--text); }

.error { color: var(--bad); margin-top: 1rem; }
.tombstone { font-size: 1.05rem; margin: 2rem 0 0.25rem; }

.proto { color: var(--line); font-size: 0.75rem; margin-top: 3rem; }
.proto a { color: var(--dim); }

.hidden { display: none; }

/* White backing is not decoration - scanners need the light quiet zone. */
#qr { margin-top: 1rem; }
#qr svg { background: #fff; border-radius: 6px; display: block; }

#result label, #secret label { margin-top: 1rem; }
#copy, #download, #again { margin-top: 0.75rem; }
