:root {
  --color-paper: #f4f1e8;
  --color-paper-deep: #ece7d9;
  --color-ink: #1c1b18;
  --color-ink-soft: #6b665b;
  --color-line: #d9d3c3;
  --color-accent: #d8442a;
  --color-accent-deep: #b0331d;
  --color-mark: #e0a92e;
  --font-display: Inter, Noto Sans TC, sans-serif;
  --font-body: Inter, Noto Sans TC, sans-serif;
  --font-mono: Inter, Noto Sans TC, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tool-intro {
  max-width: 64ch;
  margin-block: 24px 40px;
  color: #6b665b;
}

.editor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #ece7d9;
  border: 1px solid #d9d3c3;
  border-radius: 2px;
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.control-block.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.control-label {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b665b;
}

.control-label-value {
  font-variant-numeric: tabular-nums;
  color: #1c1b18;
  text-transform: none;
}

.control-note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #6b665b;
}

.text-input {
  width: 100%;
  min-width: 0;
  padding: 8px 16px;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #1c1b18;
  background: #f4f1e8;
  border: 1.5px solid #1c1b18;
  border-radius: 2px;
  transition: border-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.text-input:focus {
  outline: none;
  border-color: #d8442a;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 4px 16px;
  border: 1px solid #d9d3c3;
  border-radius: 2px;
  color: #6b665b;
  background: #f4f1e8;
  cursor: pointer;
  transition: color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), background-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.chip:hover {
  color: #1c1b18;
  border-color: #1c1b18;
}
.chip.is-active {
  color: #f4f1e8;
  background: #d8442a;
  border-color: #d8442a;
}

.control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid #d9d3c3;
}

.output {
  min-width: 0;
}
.output .section-rule:first-child {
  margin-top: 0;
}

.lorem-stat {
  margin: 0 0 16px;
  min-height: 1.4em;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: #6b665b;
  font-variant-numeric: tabular-nums;
}

.lorem-output {
  padding: 40px;
  min-height: 240px;
  background: #f4f1e8;
  border: 1.5px solid #1c1b18;
  border-radius: 2px;
  box-shadow: 6px 6px 0 rgba(28, 27, 24, 0.12);
}

.lorem-para {
  margin: 0;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  color: #1c1b18;
  word-break: break-word;
}
.lorem-para + .lorem-para {
  margin-top: 24px;
}
.lorem-para.is-en {
  text-align: justify;
}

.copy-hint {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  font-size: 1rem;
  color: #d8442a;
}

@media (max-width: 720px) {
  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .lorem-output {
    padding: 24px;
  }
}
