@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600;700&display=swap');

.jca-directory {
  --jca-accent: #176b75;
  --jca-columns: 3;
  --jca-ink: #152236;
  --jca-muted: #667085;
  --jca-line: #dfe7e7;
  --jca-soft: #f3f7f7;
  --jca-gold: #c7a463;
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(50px, 7vw, 90px) 0;
  color: var(--jca-ink);
  font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  line-height: 1.8;
  isolation: isolate;
}

.jca-directory *,
.jca-directory *::before,
.jca-directory *::after {
  box-sizing: border-box;
  font-family: inherit;
}

.jca-directory .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.jca-directory__hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 52px;
  padding: clamp(60px, 9vw, 100px) clamp(24px, 6vw, 74px);
  border: 1px solid rgba(23, 107, 117, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 12%, rgba(199, 164, 99, 0.18), transparent 28%),
    radial-gradient(circle at 6% 100%, rgba(23, 107, 117, 0.13), transparent 32%),
    linear-gradient(135deg, #fbfdfd 0%, #f1f7f7 100%);
  text-align: center;
}

.jca-directory__hero::before,
.jca-directory__hero::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(23, 107, 117, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.jca-directory__hero::before {
  top: -120px;
  right: -80px;
  width: 300px;
  height: 300px;
}

.jca-directory__hero::after {
  right: -28px;
  bottom: -102px;
  width: 210px;
  height: 210px;
}

.jca-directory__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  color: var(--jca-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.5;
}

.jca-directory__eyebrow::before,
.jca-directory__eyebrow::after {
  display: inline-block;
  width: 28px;
  height: 1px;
  margin: 0 12px 4px;
  background: var(--jca-gold);
  content: "";
}

.jca-directory__title {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--jca-ink);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.jca-directory__lead {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 26px auto 0;
  color: var(--jca-muted);
  font-size: clamp(14px, 1.6vw, 17px);
}

.jca-directory__total {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 32px 0 0;
  padding: 8px 18px;
  border: 1px solid rgba(23, 107, 117, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--jca-muted);
  font-size: 12px;
  font-weight: 600;
}

.jca-directory__total span {
  color: var(--jca-accent);
  font-size: 17px;
  font-weight: 700;
}

.jca-directory__controls {
  display: grid;
  gap: 24px;
  margin-bottom: 48px;
  padding: 32px clamp(20px, 4vw, 36px);
  border: 1px solid var(--jca-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(19, 42, 61, 0.055);
}

.jca-directory__search {
  position: relative;
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.jca-directory__search svg {
  position: absolute;
  top: 50%;
  left: 17px;
  color: var(--jca-accent);
  transform: translateY(-50%);
  pointer-events: none;
}

.jca-directory__search input[type="search"] {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 12px 18px 12px 49px;
  border: 1px solid var(--jca-line);
  border-radius: 14px;
  outline: none;
  background: var(--jca-soft);
  color: var(--jca-ink);
  font-size: 15px;
  box-shadow: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.jca-directory__search input[type="search"]::placeholder {
  color: #9099a6;
}

.jca-directory__search input[type="search"]:focus {
  border-color: var(--jca-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 107, 117, 0.12);
}

.jca-directory__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.jca-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid var(--jca-line);
  border-radius: 999px;
  outline: none;
  background: #fff;
  color: #526171;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.jca-filter:hover {
  border-color: var(--jca-accent);
  color: var(--jca-accent);
  transform: translateY(-1px);
}

.jca-filter:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 107, 117, 0.15);
}

.jca-filter.is-active {
  border-color: var(--jca-accent);
  background: var(--jca-accent);
  color: #fff;
}

.jca-directory__grid {
  display: grid;
  grid-template-columns: repeat(var(--jca-columns), minmax(0, 1fr));
  gap: clamp(24px, 3vw, 36px);
  align-items: stretch;
}

.jca-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--jca-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 13px 30px rgba(19, 42, 61, 0.065);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.jca-card::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--jca-accent), var(--jca-gold));
  content: "";
  opacity: 0.85;
}

.jca-card:hover {
  border-color: rgba(23, 107, 117, 0.28);
  box-shadow: 0 20px 44px rgba(19, 42, 61, 0.12);
  transform: translateY(-5px);
}

.jca-card[hidden] {
  display: none !important;
}

.jca-card__image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 176px;
  padding: 38px 28px 18px;
  background:
    radial-gradient(circle at center, rgba(23, 107, 117, 0.08), transparent 62%),
    linear-gradient(180deg, #f9fbfb, #fff);
}

.jca-card__image,
.jca-card__initial {
  width: 116px;
  height: 116px;
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(19, 42, 61, 0.15), 0 0 0 1px rgba(23, 107, 117, 0.09);
}

.jca-card__image {
  display: block;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

.jca-card__initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--jca-accent), #113c55);
  color: #fff;
  font-size: 42px;
  font-weight: 600;
}

.jca-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 20px clamp(20px, 3vw, 30px) 34px;
  text-align: center;
}

.jca-card__genres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  margin-bottom: 14px;
}

.jca-card__genres span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--jca-accent) 9%, white);
  color: var(--jca-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

@supports not (background: color-mix(in srgb, black 10%, white)) {
  .jca-card__genres span {
    background: #edf5f5;
  }
}

.jca-card__name {
  margin: 0;
  color: var(--jca-ink);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.jca-card__description {
  display: -webkit-box;
  overflow: hidden;
  margin: 16px 0 0;
  color: var(--jca-muted);
  font-size: 13px;
  line-height: 1.9;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.jca-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin: auto 0 0;
  padding: 12px 20px;
  border: 1px solid var(--jca-accent);
  border-radius: 12px;
  background: var(--jca-accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  box-shadow: 0 8px 18px rgba(23, 107, 117, 0.16);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.jca-card__description + .jca-card__link,
.jca-card__name + .jca-card__link {
  margin-top: 26px;
}

.jca-card__link:hover {
  color: #fff !important;
  filter: brightness(0.9);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 107, 117, 0.23);
}

.jca-card__link:focus-visible {
  outline: 3px solid rgba(23, 107, 117, 0.22);
  outline-offset: 3px;
}

.jca-card__link svg {
  flex: 0 0 auto;
}

.jca-directory__empty {
  margin: 32px 0 0;
  padding: 42px 24px;
  border: 1px dashed #cfdada;
  border-radius: 16px;
  background: var(--jca-soft);
  color: var(--jca-muted);
  text-align: center;
}

.jca-directory__empty[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .jca-directory__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 620px) {
  .jca-directory {
    padding: 36px 0;
  }

  .jca-directory__hero {
    margin-bottom: 28px;
    padding: 48px 20px;
    border-radius: 19px;
  }

  .jca-directory__eyebrow::before,
  .jca-directory__eyebrow::after {
    width: 18px;
    margin-right: 8px;
    margin-left: 8px;
  }

  .jca-directory__title {
    letter-spacing: 0.05em;
  }

  .jca-directory__controls {
    margin-bottom: 28px;
    padding: 24px 16px;
    border-radius: 16px;
  }

  .jca-directory__filters {
    justify-content: flex-start;
  }

  .jca-filter {
    min-height: 38px;
    padding: 7px 14px;
  }

  .jca-directory__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .jca-card {
    border-radius: 17px;
  }

  .jca-card__image-wrap {
    min-height: 154px;
    padding: 30px 20px 14px;
  }

  .jca-card__body {
    padding: 16px 20px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jca-directory *,
  .jca-directory *::before,
  .jca-directory *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}