/* TỨ PHỦ — Festival Heritage Profile */

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

.fd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 12% 18%, rgba(196, 154, 89, 0.14), transparent 55%),
    radial-gradient(ellipse 48% 42% at 90% 75%, rgba(116, 43, 50, 0.22), transparent 52%);
  pointer-events: none;
}

.fd-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1100px) {
  .fd-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}

.fd-toc {
  display: none;
}

@media (min-width: 1100px) {
  .fd-toc {
    display: block;
  }
}

.fd-toc-sticky {
  position: sticky;
  top: calc(var(--header-h, 64px) + 1rem);
  border-radius: 0.75rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.92);
  padding: 0.9rem;
}

.fd-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.fd-toc-link {
  display: block;
  border-radius: 0.4rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
  color: #d5ba99;
  text-decoration: none;
}

.fd-toc-link:hover,
.fd-toc-link:focus-visible {
  color: #e4c58c;
  background: rgba(53, 35, 38, 0.9);
  outline: none;
}

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

.fd-meta-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(42, 26, 28, 0.85);
}

.fd-meta-table th,
.fd-meta-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(98, 68, 60, 0.45);
  vertical-align: top;
}

.fd-meta-table th {
  width: 38%;
  background: rgba(53, 35, 38, 0.65);
  color: #d5ba99;
  font-weight: 500;
}

.fd-meta-table td {
  color: #f4e6d1;
}

.fd-meta-table tr:last-child th,
.fd-meta-table tr:last-child td {
  border-bottom: 0;
}

.fd-section {
  scroll-margin-top: calc(var(--header-h, 64px) + 1.25rem);
}

.fd-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;
}

.fd-empty-paper {
  border-color: rgba(98, 68, 60, 0.35);
  background: rgba(255, 255, 255, 0.35);
}

.fd-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .fd-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .fd-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

.fd-card-btn {
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s ease;
}

.fd-card-btn:hover,
.fd-card-btn:focus-visible {
  border-color: #c49a59;
  outline: none;
}

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

.fd-schedule-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .fd-schedule-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fd-panel {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.88);
  padding: 1.1rem;
}

.fd-timeline {
  display: grid;
  gap: 0.85rem;
}

.fd-timeline-item {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  border-left: 3px solid rgba(196, 154, 89, 0.65);
  background: rgba(42, 26, 28, 0.85);
  padding: 1rem;
}

.fd-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fd-filter-btn {
  border-radius: 0.5rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: transparent;
  color: #d5ba99;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
}

.fd-filter-btn.is-active,
.fd-filter-btn:hover,
.fd-filter-btn:focus-visible {
  border-color: #c49a59;
  color: #e4c58c;
  background: rgba(53, 35, 38, 0.9);
  outline: none;
}

.fd-compare {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .fd-compare {
    grid-template-columns: 1fr 1fr;
  }

  .fd-variant-tabs-mobile {
    display: none;
  }
}

@media (max-width: 767px) {
  .fd-compare-desktop {
    display: none;
  }
}

.fd-variant-pane {
  border-radius: 0.75rem;
  border: 1px dashed rgba(196, 154, 89, 0.4);
  background: rgba(42, 26, 28, 0.7);
  padding: 1rem;
}

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

.fd-source-item + .fd-source-item {
  margin-top: 0.55rem;
}

.fd-editorial-note {
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.75);
  padding: 1rem 1.1rem;
}

.fd-map-shell {
  position: relative;
  min-height: 240px;
  border-radius: 0.85rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  overflow: hidden;
  background: rgba(42, 26, 28, 0.9);
}

.fd-map {
  width: 100%;
  height: 280px;
}

.fd-map-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.fd-map-shell.is-fallback .fd-map {
  display: none;
}

.fd-map-shell.is-fallback .fd-map-fallback {
  display: flex;
}

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

.fd-toc-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

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

.fd-toc-drawer.is-open .fd-toc-drawer-overlay {
  opacity: 1;
}

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

.fd-toc-drawer.is-open .fd-toc-drawer-panel {
  transform: translateX(0);
}

.fd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(25, 15, 18, 0.9);
}

.fd-lightbox.is-open {
  display: flex;
}

.fd-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 860px);
  overflow-y: auto;
  border-radius: 0.85rem;
  border: 1px solid #62443c;
  background: #2a1a1c;
  color: #f4e6d1;
  padding: 1rem;
}

.fd-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 95;
  border-radius: 999px;
  border: 1px solid #62443c;
  background: #352326;
  color: #f4e6d1;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.fd-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fd-toolbar {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 40;
  border-bottom: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(25, 15, 18, 0.92);
  backdrop-filter: blur(10px);
}

.fd-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  min-width: 2rem;
  padding: 0 0.65rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(42, 26, 28, 0.75);
  color: #d5ba99;
  font-size: 0.75rem;
}

.fd-tool-btn:hover,
.fd-tool-btn:focus-visible {
  border-color: #c49a59;
  color: #e4c58c;
  outline: none;
}

.fd-year-select {
  min-height: 2.25rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(98, 68, 60, 0.55);
  background: rgba(53, 35, 38, 0.9);
  color: #f4e6d1;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.fd-year-select:focus {
  outline: none;
  border-color: #c49a59;
}

@media (prefers-reduced-motion: reduce) {
  .fd-toc-drawer-overlay,
  .fd-toc-drawer-panel,
  .fd-toast,
  .fd-card-btn {
    transition: none !important;
  }
}
