:root {
  --bg: #faf8f6;
  --card: #ffffff;
  --text: #2b2523;
  --muted: #776d69;
  --line: #e8e1dd;
  --accent: #b0766f;
  --accent-dark: #8e5a54;
  --ok: #2f8a5b;
  --warn: #b7791f;
  --bad: #c0392b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1817;
    --card: #252120;
    --text: #f1ebe8;
    --muted: #a99e99;
    --line: #3a3432;
    --accent: #d39a92;
    --accent-dark: #e7b3ac;
    --ok: #5cc28b;
    --warn: #e0a84a;
    --bad: #ef7464;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  font-weight: 650;
  color: var(--accent-dark);
}
.who {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}
h1 {
  font-size: 20px;
  margin: 4px 0 12px;
}
h2 {
  font-size: 16px;
  margin: 0 0 6px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin: 0 0 14px;
}
.narrow {
  max-width: 440px;
  margin: 24px auto;
}
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
label {
  display: block;
  font-size: 13px;
  font-weight: 550;
  margin: 10px 0 4px;
}
.hint {
  font-weight: 400;
  color: var(--muted);
}
input,
select {
  width: 100%;
  font: inherit;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}
.suffix {
  display: flex;
  align-items: center;
  gap: 6px;
}
.suffix span {
  color: var(--muted);
  white-space: nowrap;
}
button {
  font: inherit;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 7px 14px;
  cursor: pointer;
}
button:hover {
  border-color: var(--accent);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
button.danger {
  color: var(--bad);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.between {
  justify-content: space-between;
}
.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 15%, transparent);
  color: var(--muted);
}
.pill.ok {
  background: color-mix(in srgb, var(--ok) 15%, transparent);
  color: var(--ok);
}
.pill.warn {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
}
.pill.bad {
  background: color-mix(in srgb, var(--bad) 15%, transparent);
  color: var(--bad);
}
dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  margin: 10px 0 0;
  font-size: 13px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
a {
  color: var(--accent-dark);
}
.error {
  color: var(--bad);
  font-size: 13.5px;
  margin-top: 10px;
}
.note {
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 6px;
  font-size: 13.5px;
  margin: 10px 0;
}
.banner {
  border-color: var(--warn);
}
pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  max-height: 380px;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.qr {
  width: 200px;
  max-width: 100%;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.key {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
  user-select: all;
  background: var(--bg);
  border: 1px dashed var(--line);
  padding: 8px;
  border-radius: 8px;
}
ol {
  padding-left: 20px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow-y: auto;
  z-index: 10;
}
.dialog {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  width: 100%;
  max-width: 560px;
}
