:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-soft: #efefe9;
  --text: #20201d;
  --muted: #6d6b63;
  --line: #d9d8cf;
  --accent: #8d2f2f;
  --accent-2: #2f6f63;
  --shadow: 0 16px 40px rgba(31, 31, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 247, 244, 0.95)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 18px);
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
  line-height: 1.65;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

button {
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 28px 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
  min-width: 300px;
}

.stats div {
  border-top: 2px solid var(--text);
  padding-top: 8px;
}

.stats strong {
  display: block;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 24px;
  line-height: 1.1;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  color: var(--muted);
}

.summary-row p {
  margin: 0;
}

.summary-row strong {
  color: var(--text);
}

.layout {
  width: 100%;
}

.quote-list {
  display: grid;
  gap: 12px;
}

.quote-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.quote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: "Inter", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.quote-id {
  color: var(--accent);
}

.quote-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.72;
}

.quote-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  color: var(--muted);
  font-size: 14px;
}

.quote-detail div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quote-detail span {
  color: var(--text);
}

.quote-summary,
.quote-notes {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.quote-actions {
  display: flex;
  justify-content: flex-end;
}

.copy-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent-2);
  font-size: 13px;
}

.empty {
  padding: 48px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.pagination span {
  min-width: 120px;
  color: var(--muted);
  font-family: "Inter", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  text-align: center;
}

.pagination button {
  min-width: 96px;
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.pagination button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination button:disabled {
  cursor: not-allowed;
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}

@media (max-width: 980px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .stats {
    min-width: 0;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-box {
    grid-column: 1 / -1;
  }

}

@media (max-width: 620px) {
  .site-header,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 28px;
  }

  .stats,
  .toolbar,
  .quote-detail {
    grid-template-columns: 1fr;
  }

  .summary-row,
  .quote-meta,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination span,
  .pagination button {
    width: 100%;
  }

  .quote-text {
    font-size: 18px;
  }
}
