:root {
  color-scheme: dark;
  --bg: #15171a;
  --panel: #20242a;
  --panel-2: #252b32;
  --text: #f3f5f7;
  --muted: #a9b0ba;
  --border: rgba(255, 255, 255, 0.15);
  --accent: #4ec6d8;
  --accent-2: #9cdc7d;
  --error: #ff9b8e;
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.app {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  letter-spacing: 0;
}

.masthead p {
  margin-top: 5px;
  color: var(--muted);
}

button {
  min-height: 36px;
  border: 1px solid rgba(78, 198, 216, 0.55);
  border-radius: 6px;
  background: #193b43;
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #204d56;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
}

.status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
}

.status-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

code {
  color: var(--accent);
}

.template-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.template-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.template-panel h2 {
  margin-bottom: 12px;
  font-size: 15px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

input {
  width: 100%;
  min-height: 34px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 10px;
}

input:focus {
  border-color: var(--accent);
  outline: none;
}

.status {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
}

.status[data-tone="success"] {
  color: var(--accent-2);
}

.status[data-tone="error"] {
  color: var(--error);
}

@media (max-width: 780px) {
  .masthead,
  .status-row,
  .template-form {
    display: block;
  }

  .masthead button,
  .template-panel,
  .status-row > div + div {
    margin-top: 12px;
  }
}
