:root {
  --bg: #f2f0ea;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #d96c3b;
  --accent-soft: #ffe2d6;
  --good: #1f7a45;
  --bad: #b02f2f;
  --shadow: 0 18px 40px rgba(26, 26, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #ffffff 0%, #f6efe6 35%, #eadfce 100%);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  text-align: left;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: clamp(32px, 4vw, 44px);
  margin: 0 0 8px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.start-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.start-row .checkbox {
  margin-right: 9px;
}

label.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

label.checkbox input {
  width: 18px;
  height: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

input[type="number"],
input[type="text"] {
  font-size: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ded6ca;
  background: #fffdf9;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: #f0e6d8;
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button.secondary {
  background: #2b2b2b;
  color: #fff;
}

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

.note {
  margin: 12px 0 0;
  color: var(--muted);
}

.display {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  font-size: clamp(24px, 4vw, 40px);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.stage-label {
  color: var(--muted);
}

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

.input-row input {
  flex: 1;
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--muted);
}

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

.results {
  display: grid;
  gap: 16px;
}

.result-headline {
  font-size: 20px;
  font-weight: 700;
}

.result-headline.good {
  color: var(--good);
}

.result-headline.bad {
  color: var(--bad);
}

.result-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.word-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.word-list li {
  background: #f7f3ed;
  border-radius: 8px;
  padding: 6px 10px;
}

.result-details {
  color: var(--muted);
}

@media (max-width: 600px) {
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .input-meta {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .action-row {
    width: 100%;
    justify-content: space-between;
  }
}
