:root {
  --bg: #f4efe7;
  --panel: #fffaf4;
  --ink: #1f1b16;
  --accent: #cc5a2a;
  --line: #e7d9c8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #f8f2ea 0%, #efe3d3 45%, #ead9c4 100%);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1, h2, h3 {
  margin: 0 0 10px;
}

.lead {
  margin-top: 6px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.small-gap {
  gap: 8px;
}

label {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

input, select, textarea, button {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  background: #fff;
}

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

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.94);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.actions button {
  width: 220px;
}

#status {
  font-size: 14px;
}

#result {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fcf8f2;
  border-radius: 10px;
  padding: 12px;
  min-height: 120px;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: #6d6256;
}

@media (max-width: 860px) {
  .grid2 {
    grid-template-columns: 1fr;
  }

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

  .actions button {
    width: 100%;
  }
}
