/* Доп. стили поверх Tailwind */
mark {
  background: #ffe49a;
  color: inherit;
  padding: 0 .12em;
  border-radius: .15em;
  box-shadow: inset 0 -2px 0 rgba(176, 138, 59, .35);
}
.result-card {
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.result-card:hover {
  transform: translateY(-1px);
  border-color: #b08a3b;
  box-shadow: 0 6px 16px -8px rgba(80, 40, 20, .25);
}
.snippet {
  font-family: 'PT Serif', Georgia, serif;
  color: #2a201a;
  line-height: 1.55;
}
.page-block {
  border-left: 3px solid #dec48a;
  padding: .6rem .9rem;
  margin: .8rem 0;
  background: #fdf9f1;
  border-radius: 0 .5rem .5rem 0;
  white-space: pre-wrap;
  font-family: 'PT Serif', Georgia, serif;
}
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .55rem; border-radius: 999px;
  font-size: 11px; line-height: 1.2;
  background: #f7eedd; color: #3a2c23; border: 1px solid #ecdcb5;
}
.badge-accent { background: #8a2a1d; color: #fdf9f1; border-color: #6e2017; }
.badge-gold   { background: #fff3d6; color: #6e4f12; border-color: #e9d28a; }

.pg-btn {
  min-width: 2.25rem; height: 2.25rem; padding: 0 .6rem;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid #ecdcb5; border-radius:.5rem; background:#fff;
  font-size:.875rem; color:#3a2c23;
}
.pg-btn:hover { background:#f7eedd; }
.pg-btn.active { background:#8a2a1d; color:#fdf9f1; border-color:#6e2017; }
.pg-btn[disabled] { opacity:.4; cursor:not-allowed; }

/* Шапка результатов с большими числами */
.results-header {
  background: linear-gradient(135deg, #fff 0%, #fdf9f1 100%);
  border: 1px solid #ecdcb5;
  border-radius: .9rem;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  box-shadow: 0 2px 8px -4px rgba(80,40,20,.08);
}
.stat-row { display:flex; gap: 1rem; flex-wrap: wrap; }
.stat-tile {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: .35rem .9rem;
  border-left: 4px solid #8a2a1d;
  background: rgba(247, 238, 221, .35);
  border-radius: 0 .5rem .5rem 0;
}
.stat-tile + .stat-tile { border-left-color: #b08a3b; }
.stat-num {
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1.85rem; line-height: 1; font-weight: 700; color: #2a201a;
  letter-spacing: -.02em;
}
.stat-lbl {
  font-size: .78rem; color: #5a4536; text-transform: lowercase;
  margin-top: .2rem;
}
.results-meta {
  margin-left: auto; font-size: .85rem; color: #5a4536;
}

/* Кнопки действий внутри карточек результатов */
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem; border-radius: .55rem;
  background: #8a2a1d; color: #fdf9f1; font-size: .875rem; font-weight: 500;
  border: 1px solid #6e2017;
  text-decoration: none; cursor: pointer;
  transition: background .12s ease, transform .12s ease;
  box-shadow: 0 1px 3px rgba(80,40,20,.18);
}
.btn-primary:hover { background: #6e2017; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem; border-radius: .55rem;
  background: #b08a3b; color: #fdf9f1; font-size: .875rem; font-weight: 500;
  border: 1px solid #8f6e2a;
  text-decoration: none; cursor: pointer;
  transition: background .12s ease, transform .12s ease;
  box-shadow: 0 1px 3px rgba(80,40,20,.18);
}
.btn-secondary:hover { background: #8f6e2a; transform: translateY(-1px); }
.btn-link {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .5rem .6rem; border-radius: .55rem;
  background: transparent; color: #5a4536; font-size: .875rem;
  border: 1px solid #ecdcb5;
  text-decoration: none;
}
.btn-link:hover { background: #f7eedd; color: #8a2a1d; }

body.dark .results-header { background:#2a201a; border-color:#5a4536; }
body.dark .stat-tile { background: rgba(58,44,35,.6); }
body.dark .stat-num { color: #f1e6d0; }
body.dark .stat-lbl, body.dark .results-meta { color: #c9b896; }
body.dark .btn-link { border-color:#5a4536; color:#f1e6d0; }
body.dark .btn-link:hover { background:#3a2c23; color:#ffd9a0; }

/* Чипы уточнений */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .55rem .3rem .4rem;
  background: #fff; border: 1px solid #ecdcb5; border-radius: 999px;
  font-size: .85rem; color: #2a201a;
  box-shadow: 0 1px 2px rgba(80,40,20,.06);
}
.chip-num {
  display:inline-flex; align-items:center; justify-content:center;
  width: 1.25rem; height: 1.25rem; border-radius: 999px;
  background:#8a2a1d; color:#fdf9f1; font-size:.7rem; font-weight:600;
}
.chip-text { font-family: 'PT Serif', Georgia, serif; }
.chip-x {
  appearance:none; border:none; background:transparent; color:#5a4536;
  font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 0 .15rem;
  border-radius: 999px;
}
.chip-x:hover { background:#f7eedd; color:#8a2a1d; }

body.dark .chip { background:#3a2c23; color:#f1e6d0; border-color:#5a4536; }
body.dark .chip-x { color:#c9b896; }
body.dark .chip-x:hover { background:#5a4536; color:#ffd9a0; }

/* Тёмная тема (опционально) */
body.dark { background: #1b1410; color: #f1e6d0; }
body.dark .bg-white, body.dark .bg-white\/70 { background:#2a201a !important; color:#f1e6d0; }
body.dark .bg-parchment-50, body.dark .bg-parchment-100, body.dark .bg-parchment-100\/80 { background:#2a201a !important; }
body.dark .border-parchment-200 { border-color:#3a2c23 !important; }
body.dark .text-ink-900, body.dark .text-ink-800, body.dark .text-ink-700 { color:#f1e6d0 !important; }
body.dark .text-ink-600 { color:#c9b896 !important; }
body.dark mark { background:#7a5a1c; color:#fff8e1; }
body.dark .page-block { background:#3a2c23; color:#f1e6d0; border-left-color:#b08a3b; }
body.dark .snippet { color:#f1e6d0; }
body.dark input, body.dark select { background:#3a2c23; color:#f1e6d0; border-color:#5a4536; }
body.dark .pg-btn { background:#3a2c23; color:#f1e6d0; border-color:#5a4536; }
body.dark .pg-btn:hover { background:#5a4536; }
body.dark .badge { background:#3a2c23; color:#f1e6d0; border-color:#5a4536; }
