
body {
  font-family: -apple-system, BlinkMacSystemFont, "GenSeki Gothic", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #f5f2ec;
  margin: 0;
  color: #2f3437;
}
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
h1 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  color: #263238;
}
.card {
  background: #fffdfa;
  border: 1px solid #e4ddd3;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(55, 48, 42, 0.08);
  padding: 18px;
  margin-top: 14px;
}
.field + .field {
  margin-top: 18px;
}
label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 650;
  color: #344044;
}
.hint {
  margin: -2px 0 8px;
  font-size: 13px;
  color: #6f777b;
}
textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 13px;
  font-size: 16px;
  line-height: 1.6;
  font-family: inherit;
  color: #2f3437;
  background: #fbfaf7;
  border: 1px solid #d8d1c7;
  border-radius: 8px;
  resize: vertical;
  outline: none;
}
textarea:focus {
  background: #ffffff;
  border-color: #8fa99b;
  box-shadow: 0 0 0 3px rgba(143, 169, 155, 0.18);
}
#result {
  min-height: 96px;
  font-size: 16px;
  line-height: 1.7;
  color: #2f3437;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  background: #f8f6f1;
  border: 1px solid #e7e0d6;
  border-radius: 8px;
}
.stat-item span {
  font-size: 14px;
  color: #687174;
}
.stat-item strong {
  font-size: 24px;
  line-height: 1;
  color: #263238;
}
.stat-total {
  background: #edf4ef;
  border-color: #d4e2d9;
}
.common-words {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e4ddd3;
}
.common-words h2 {
  margin: 0 0 12px;
  font-size: 17px;
  letter-spacing: 0;
  color: #344044;
}
.word-list {
  display: grid;
  gap: 8px;
}
.word-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fbfaf7;
  border: 1px solid #e7e0d6;
  border-radius: 8px;
}
.word-stat span {
  color: #3a4245;
}
.word-stat strong {
  color: #52645b;
  font-size: 15px;
}
.empty-state {
  margin: 0;
  padding: 12px;
  color: #7a8285;
  background: #fbfaf7;
  border: 1px dashed #d8d1c7;
  border-radius: 8px;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.file-input {
  display: none;
}
button {
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  background-color: #eef1ee;
  color: #485350;
  border: 1px solid #d5ddd8;
  border-radius: 8px;
}
button:hover {
  background-color: #e3e9e5;
}

@media (min-width: 640px) {
  .container {
    padding-top: 42px;
  }
  h1 {
    font-size: 32px;
  }
  .card {
    padding: 24px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-total {
    grid-column: span 2;
  }
}
