:root {
  --bg: #0f1419;
  --card: #182028;
  --border: #2a3542;
  --text: #e7edf4;
  --muted: #98a6b5;
  --accent: #3b82f6;
  --danger: #dc2626;
  --warn-bg: #2a1f0d;
  --warn-border: #d97706;
  --ok: #16a34a;
}

* { box-sizing: border-box; }

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

.container {
  max-width: 680px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 600;
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

label {
  display: block;
  margin: 10px 0 4px;
  font-size: 0.92rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b0f14;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  margin-top: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: #334155;
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.banner-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  font-size: 0.92rem;
}

.banner-err {
  background: #2b1215;
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  color: #fecaca;
}

.banner-ok {
  background: #0f291a;
  border: 1px solid var(--ok);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  color: #bbf7d0;
}

.plaintext-box {
  background: #0b0f14;
  border: 1px solid var(--ok);
  border-radius: 8px;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  user-select: text;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.msg-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

code.inline {
  background: #0b0f14;
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}
