:root {
  --bg: #1a1b1e;
  --surface: #25262b;
  --border: #373a40;
  --text: #f1f3f5;
  --muted: #adb5bd;
  --primary: #e7b846;
  --primary-dim: rgba(231, 184, 70, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
}

h1 {
  font-size: 1.35rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
}

.lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.lead code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.88em;
}

.lbl {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.inp,
.ta {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0.55rem 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ta {
  resize: vertical;
  min-height: 200px;
  font-family: ui-monospace, monospace;
  line-height: 1.4;
}

.inp-sm {
  width: 5rem;
  margin-bottom: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-hint {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 36rem;
}

.chk {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.chk input {
  accent-color: var(--primary);
}

.btn {
  width: 100%;
  margin: 0.5rem 0 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 650;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #1a1508;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.log h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

#log {
  margin: 0;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 120px;
  max-height: 220px;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
