:root {
  color-scheme: light;
  --bg: #f5f6f1;
  --panel: #ffffff;
  --text: #20252b;
  --muted: #66707a;
  --line: #d6dde2;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
}

.page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 820px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.header,
.form,
.archive {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.lead,
.message {
  color: var(--muted);
}

.form,
.archive {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
}

input {
  min-height: 44px;
  padding: 9px 11px;
}

textarea {
  min-height: 300px;
  padding: 12px;
  resize: vertical;
}

button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

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

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.message {
  min-height: 1.5em;
  margin-bottom: 0;
}

.error {
  color: var(--danger);
}

@media (max-width: 640px) {
  .page {
    padding: 12px;
  }

  .panel {
    padding: 18px;
  }

  .input-row,
  .output-header {
    grid-template-columns: 1fr;
  }

  .input-row {
    display: grid;
  }

  .output-header {
    align-items: stretch;
    flex-direction: column;
  }
}
