/* TỨ PHỦ — Digital Heritage Library */

.dl-hero {
  position: relative;
  overflow: hidden;
}

.dl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 48% at 10% 18%, rgba(196, 154, 89, 0.14), transparent 55%),
    radial-gradient(ellipse 46% 40% at 92% 78%, rgba(116, 43, 50, 0.2), transparent 52%),
    repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 14px,
      rgba(196, 154, 89, 0.03) 14px,
      rgba(196, 154, 89, 0.03) 15px
    );
  pointer-events: none;
}

.dl-search {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  max-width: 40rem;
}

.dl-search input {
  flex: 1;
  min-height: 3rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(53, 35, 38, 0.92);
  color: #f4e6d1;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
}

.dl-search input:focus {
  outline: none;
  border-color: #c49a59;
}

.dl-search button {
  border-radius: 0.65rem;
  border: 0;
  background: #742b32;
  color: #f4e6d1;
  padding: 0 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.dl-search button:hover,
.dl-search button:focus-visible {
  background: #913c43;
  outline: none;
}

.dl-stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 768px) {
  .dl-stat-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.dl-stat-card {
  border-radius: 0.75rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.85);
  padding: 1rem;
}

.dl-stat-value {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 1.75rem;
  color: #e4c58c;
  line-height: 1.1;
}

.dl-cat-grid,
.dl-card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .dl-cat-grid,
  .dl-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dl-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dl-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dl-card-grid.is-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dl-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  overflow: hidden;
  text-align: left;
  color: inherit;
}

.dl-card a.dl-stretch {
  display: block;
  color: inherit;
  text-decoration: none;
}

.dl-card:hover,
.dl-card:focus-within {
  border-color: #c49a59;
}

.dl-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  padding: 0.12rem 0.5rem;
  font-size: 0.65rem;
  color: #d5ba99;
}

.dl-empty {
  border-radius: 0.85rem;
  border: 1px dashed rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.55);
  padding: 1.5rem 1.1rem;
  text-align: center;
}

.dl-workspace {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .dl-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
  }
}

.dl-filters {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.9);
  padding: 1rem;
}

.dl-filters-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .dl-filters-desktop {
    display: block;
    position: sticky;
    top: calc(var(--header-h, 64px) + 1rem);
  }
}

.dl-field + .dl-field {
  margin-top: 0.85rem;
}

.dl-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d5ba99;
}

.dl-field input,
.dl-field select {
  width: 100%;
  min-height: 2.35rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(53, 35, 38, 0.9);
  color: #f4e6d1;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.dl-field input:focus,
.dl-field select:focus {
  outline: none;
  border-color: #c49a59;
}

.dl-year-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.dl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.dl-view-tabs {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.2rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.75);
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(98, 68, 60, 0.6);
  background: rgba(42, 26, 28, 0.85);
  color: #d5ba99;
  font-size: 0.78rem;
}

.dl-btn:hover,
.dl-btn:focus-visible,
.dl-btn.is-active {
  border-color: #c49a59;
  color: #e4c58c;
  outline: none;
}

.dl-btn.is-active {
  background: rgba(116, 43, 50, 0.45);
  color: #f4e6d1;
}

.dl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(53, 35, 38, 0.85);
  color: #d5ba99;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
}

.dl-chip button {
  border: 0;
  background: transparent;
  color: #e4c58c;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.dl-list {
  display: grid;
  gap: 0.65rem;
}

.dl-list-item {
  display: grid;
  gap: 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 0.85rem;
}

@media (min-width: 640px) {
  .dl-list-item {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: start;
  }
}

.dl-cover {
  aspect-ratio: 3 / 4;
  width: 100%;
  object-fit: cover;
  background: rgba(53, 35, 38, 0.9);
}

.dl-cover-sm {
  width: 88px;
  height: 118px;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid rgba(98, 68, 60, 0.45);
}

.dl-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}

.dl-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.dl-paper {
  border-radius: 0.9rem;
  border: 1px solid rgba(98, 68, 60, 0.28);
  background: #f5ebdd;
  color: #33241f;
  padding: 1.25rem;
}

.dl-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
  visibility: hidden;
}

.dl-filter-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.dl-filter-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 15, 18, 0.72);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dl-filter-drawer.is-open .dl-filter-drawer-overlay {
  opacity: 1;
}

.dl-filter-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(100%, 360px);
  height: 100%;
  background: #2a1a1c;
  border-left: 1px solid #62443c;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}

.dl-filter-drawer.is-open .dl-filter-drawer-panel {
  transform: translateX(0);
}

.dl-filter-drawer-body {
  overflow-y: auto;
  padding: 1rem;
}

.dl-mark {
  background: rgba(196, 154, 89, 0.28);
  color: inherit;
  border-radius: 0.15rem;
  padding: 0 0.1rem;
}

@media (prefers-reduced-motion: reduce) {
  .dl-filter-drawer-overlay,
  .dl-filter-drawer-panel {
    transition: none !important;
  }
}
