.paldex-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 175px;
  align-items: center;
  gap: 28px;
  margin-bottom: 0;
  padding: 36px;
  border: 1px solid rgba(102, 79, 48, 0.24);
  border-radius: 3px 10px 4px 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 36px, rgba(87, 78, 59, 0.055) 37px),
    linear-gradient(145deg, #f0e6c5, #d9caa4);
  box-shadow: var(--shadow);
}
.paldex-intro::before {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 98px;
  height: 24px;
  background: rgba(226, 208, 164, 0.82);
  clip-path: polygon(0 12%, 9% 0, 22% 8%, 36% 1%, 52% 9%, 67% 0, 83% 8%, 100% 2%, 97% 88%, 82% 100%, 64% 91%, 48% 100%, 29% 92%, 12% 100%, 2% 87%);
  content: "";
  transform: translateX(-50%) rotate(-1deg);
}
.paldex-intro h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.paldex-intro p:not(.eyebrow) { max-width: 700px; margin: 12px 0 0; color: #645744; font: italic 0.95rem/1.55 Georgia, serif; }
.paldex-intro aside {
  position: relative;
  display: grid;
  min-height: 125px;
  padding: 28px 16px 16px;
  color: #3e563f;
  background: linear-gradient(145deg, #dce1ad, #bdc88f);
  box-shadow: 4px 6px 0 rgba(55, 31, 16, 0.13);
  text-align: center;
  transform: rotate(1.2deg);
  place-content: center;
}
.paldex-intro aside .pin { position: absolute; top: 9px; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c6dcad, #66864f 65%, #3e5a34); transform: translateX(-50%); }
.paldex-intro aside strong { font: 700 2.15rem Georgia, serif; }
.paldex-intro aside small { font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }

.index-tabs { display: flex; align-items: end; gap: 5px; margin: 0 18px; overflow-x: auto; }
.index-tabs a, .index-tabs span { flex: 0 0 auto; padding: 10px 16px 8px; border-radius: 0 0 5px 5px; color: #ede0c1; background: #51402e; font-size: 0.68rem; font-weight: 900; text-decoration: none; text-transform: uppercase; transform: translateY(0); }
.index-tabs .active { padding-bottom: 13px; color: #304d37; background: #cbd69a; }
.index-tabs a:nth-child(2) { background: #70533b; }
.index-tabs a:nth-child(3) { background: #566d61; }
.index-tabs a:nth-child(4) { background: #80633d; }

.pal-index-filters {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(145px, 0.55fr) minmax(180px, 0.65fr) auto;
  align-items: end;
  gap: 9px;
  margin: 22px 0 12px;
  padding: 22px 18px 42px;
  border: 1px solid rgba(102, 79, 48, 0.28);
  border-radius: 3px 9px 4px 8px;
  background: linear-gradient(145deg, #f2e8c8, #d7c699);
  box-shadow: 5px 7px 0 rgba(55, 31, 16, 0.14);
}
.pal-index-filters label > span { display: block; margin-bottom: 6px; color: #6f5f47; font-size: 0.61rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.pal-index-filters input, .pal-index-filters select { min-height: 44px; }
.icon-filter { grid-column: 1 / -1; min-width: 0; margin: 3px 0 0; padding: 10px 0 0; border: 0; border-top: 1px dashed rgba(99, 76, 47, 0.28); }
.icon-filter legend { padding: 0 9px 0 0; color: #6f5f47; font-size: 0.61rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.icon-filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 45px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(91, 72, 45, 0.27);
  border-radius: 3px 8px 4px 7px;
  color: #5d513f;
  background: rgba(255, 250, 228, 0.48);
  font-size: 0.62rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.icon-filter-button:hover { border-color: rgba(61, 100, 71, 0.52); transform: translateY(-1px) rotate(-0.2deg); }
.icon-filter-button.active { border-color: #466c50; color: #fff7df; background: linear-gradient(#65876b, #466c50); box-shadow: 2px 3px 0 rgba(52, 76, 53, 0.17); }
.icon-filter-button img { width: 31px; height: 31px; object-fit: contain; }
.work-icon-filter .icon-filter-button img { width: 29px; height: 29px; }
.all-filter { min-width: 55px; justify-content: center; padding-inline: 10px; }
.filter-margin-note { position: absolute; right: 20px; bottom: 8px; margin: 0; color: #796444; font: italic 0.7rem Georgia, serif; transform: rotate(-0.35deg); }
.paldex-result-bar { display: flex; justify-content: space-between; gap: 18px; color: #ead8b6; }
.paldex-result-bar p { margin: 2px 0 9px; font-size: 0.7rem; }
.paldex-result-bar p:last-child { font: italic 0.7rem Georgia, serif; }
.paldex-count { font-weight: 850; }

.pal-index-table-wrap {
  max-height: min(70vh, 820px);
  overflow: auto;
  border: 1px solid rgba(91, 70, 44, 0.36);
  border-radius: 3px 9px 4px 8px;
  background: #f3e9c9;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #87633f rgba(88, 60, 36, 0.12);
}
.pal-index-table { width: 100%; border-collapse: collapse; }
.pal-index-table th { position: sticky; z-index: 3; top: 0; padding: 12px 10px; color: #f2e4c6; background: #3b3023; font-size: 0.62rem; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; }
.pal-index-table td { padding: 8px 10px; border-bottom: 1px dashed rgba(97, 75, 46, 0.27); color: #574a39; font-size: 0.72rem; vertical-align: middle; }
.pal-index-table tbody tr:nth-child(even) { background: rgba(127, 101, 60, 0.045); }
.pal-index-table tbody tr:nth-child(5n + 2) { background: rgba(205, 222, 190, 0.16); }
.pal-index-table tbody tr:nth-child(5n + 3) { background: rgba(191, 215, 220, 0.15); }
.pal-index-table tbody tr:nth-child(5n + 4) { background: rgba(225, 199, 211, 0.14); }
.pal-index-table tbody tr:nth-child(5n) { background: rgba(211, 201, 224, 0.14); }
.pal-index-table tbody tr:hover { background: rgba(91, 130, 88, 0.12); }
.pal-record-link { display: flex; align-items: center; gap: 9px; min-width: 190px; color: #375d43; text-decoration: none; }
.pal-record-link img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(63, 43, 24, 0.12)); }
.pal-record-link span { display: grid; }
.pal-record-link small { color: #7a694f; font-size: 0.59rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.pal-record-link strong { margin-top: 3px; font: 700 0.93rem Georgia, serif; }
.pal-record-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.index-chip-list, .work-note-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 130px; }
.work-note-list { min-width: 230px; gap: 6px; }
.work-index-stamp { position: relative; display: grid; width: 42px; height: 42px; padding: 4px; border: 1px solid rgba(100, 78, 48, 0.18); border-radius: 3px 8px 4px 7px; background: rgba(255, 250, 226, 0.54); place-items: center; transform: rotate(-0.35deg); }
.work-index-stamp:nth-child(even) { transform: rotate(0.4deg); }
.work-index-stamp img { width: 29px; height: 29px; object-fit: contain; }
.work-index-stamp strong { position: absolute; right: -3px; bottom: -3px; min-width: 25px; padding: 1px 4px; border-radius: 999px; color: #fff3d8; background: #4a7054; font-size: 0.49rem; text-align: center; }
.index-empty { color: #887a64; font: italic 0.66rem Georgia, serif; }
.number-cell { color: #3e5843 !important; font: 700 0.8rem Georgia, serif; text-align: center; }
.paldex-empty { margin: 18px 0; padding: 24px; color: #ead8b6; text-align: center; }

@media (max-width: 1080px) {
  .pal-index-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .paldex-search { grid-column: span 2; }
}
@media (max-width: 720px) {
  .paldex-intro { grid-template-columns: 1fr; padding: 29px 22px; }
  .paldex-intro aside { min-height: 90px; }
  .pal-index-filters { grid-template-columns: 1fr 1fr; padding: 20px 13px 48px; }
  .paldex-search { grid-column: 1 / -1; }
  .icon-filter-options { flex-wrap: nowrap; padding-bottom: 7px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #87633f rgba(88, 60, 36, 0.12); }
  .icon-filter-button { flex: 0 0 auto; }
  .paldex-result-bar { display: block; }
  .pal-index-table-wrap { max-height: 72vh; }
}
@media (max-width: 480px) {
  .pal-index-filters { grid-template-columns: 1fr; }
  .paldex-search { grid-column: 1; }
  .filter-margin-note { left: 14px; right: auto; }
}
