:root {
  color-scheme: light;
  --ink: #1c1b1a;
  --muted: #5a5856;
  --paper: #f9f4ee;
  --paper-deep: #efe2d5;
  --accent: #c25b3a;
  --accent-soft: #f4c7b5;
  --highlight: #f9e7a3;
  --shadow: 0 18px 50px rgba(28, 27, 26, 0.16);
  font-family: "Nunito", "M PLUS Rounded 1c", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #fff4e3 0%, #f5efe7 40%, #f2e6db 100%);
  color: var(--ink);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero {
  padding: 32px 24px 24px;
  background: linear-gradient(135deg, #fff9f0 0%, #f6e7d7 100%);
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.eyebrow {
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.hero h1 {
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
}

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

.panel {
  display: grid;
  gap: 24px;
}

.input-area {
  background: var(--paper);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #e3d6c6;
  font-size: 16px;
  line-height: 1.6;
  background: #fffefc;
  resize: vertical;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin-top: 16px;
}

.control {
  display: grid;
  gap: 6px;
}

input[type="number"] {
  width: 120px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #dcc9b6;
  font-size: 14px;
}

button {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(194, 91, 58, 0.24);
}

button:hover {
  transform: translateY(-1px) scale(1.01);
}

.output-area {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
}

.output {
  background: #fffefb;
  border-radius: 20px;
  padding: 24px;
  min-height: 260px;
  box-shadow: var(--shadow);
  white-space: pre-wrap;
  line-height: 1.7;
}

.placeholder {
  color: var(--muted);
}

.summary {
  background: var(--paper);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.summary h2 {
  margin: 0 0 8px;
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
}

.summary-block {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fffaf4;
  border: 1px solid #ecdcc9;
  font-size: 14px;
}

.summary-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.summary-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  margin-right: 6px;
  background: var(--accent-soft);
  color: var(--ink);
}

.highlight {
  background: var(--highlight);
  border-radius: 6px;
  padding: 1px 2px;
}

.highlight.emphasis {
  background: #ffd6c8;
}

.highlight.repeat {
  background: #d7f0c2;
}

.highlight.context {
  background: #d9e9ff;
}

@media (max-width: 960px) {
  .output-area {
    grid-template-columns: 1fr;
  }
}
