.pronunciation-line {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 0.45em;
  vertical-align: baseline;
}

.pronunciation-phonetic {
  font-family: var(--chodo-font-sans);
  font-size: var(--chodo-text-ui-sm-size);
  line-height: var(--chodo-leading-ui-sm);
  letter-spacing: var(--chodo-tracking-none);
  font-weight: 700;
}

.pronunciation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #000;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pronunciation-btn img {
  width: 20px;
  height: 20px;
  display: block;
  transition: filter 0.15s ease;
}

.pronunciation-btn:hover,
.pronunciation-btn:focus-visible {
  background: rgba(133, 203, 250, 0.18);
  outline: none;
}

.pronunciation-btn:hover img,
.pronunciation-btn:focus-visible img {
  filter: brightness(0) saturate(100%) invert(88%) sepia(22%) saturate(1802%) hue-rotate(179deg) brightness(100%) contrast(97%);
}

.pronunciation-btn.is-playing {
  background: #85cbfa;
}

.chodo-gallery-section {
  margin-top: 40px;
  max-width: none;
}

.chodo-gallery-section .detail-gallery {
  margin-top: 0;
}

.chodo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  width: 100%;
  align-items: start;
}

.chodo-gallery-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.chodo-gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
  text-align: left;
}

.chodo-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.22s ease;
}

.chodo-gallery-item:hover img,
.chodo-gallery-item:focus-visible img {
  filter: invert(1);
}

.chodo-gallery-item:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.image-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 56px 72px 32px;
}

.image-overlay.open {
  display: flex;
}

.overlay-content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.overlay-content img {
  pointer-events: auto;
  max-height: calc(100vh - 120px);
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
}

.overlay-caption {
  max-width: 560px;
  pointer-events: none;
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 0;
  z-index: 420;
}

.overlay-close img {
  width: 22px;
  height: 22px;
  display: block;
}

.overlay-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 420;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.overlay-nav:hover {
  opacity: 0.55;
}

.overlay-nav:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.overlay-nav img {
  width: auto;
  height: 22px;
  display: block;
}

.overlay-nav--prev {
  left: 8px;
}

.overlay-nav--next {
  right: 8px;
}

@media (max-width: 980px) {
  .chodo-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-overlay {
    padding: 52px 20px 28px;
  }
}

@media (max-width: 640px) {
  .chodo-gallery-section {
    margin-top: 28px;
  }

  .chodo-gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
