/* ============================================================
   Health page — tables, notices, and page-specific components
   ============================================================ */

/* Data tables */
.health-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  border: 1px solid var(--border);
}

.health-table th,
.health-table td {
  padding: 14px 16px;
  border: 1px solid var(--border);
  vertical-align: middle;
}

.health-table thead th {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}

.health-table tbody th {
  background: #F7F7F7;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  font-size: 13px;
}

.health-table tbody td {
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.health-table--left {
  text-align: left !important;
}

/* Caption / footnotes */
.health-caption {
  margin-top: 16px;
  padding-left: 0;
}

.health-caption p {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 4px;
}

/* Notice block (certification news) */
.health-notice__body {
  min-width: 0;
}

.health-notice__title {
  margin-bottom: 20px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
}

.health-notice__badge {
  float: right;
  width: 200px;
  margin: 0 0 16px 28px;
}

.health-notice__badge img {
  width: 100%;
  height: auto;
}

.health-notice::after {
  content: "";
  display: table;
  clear: both;
}

.health-notice__date {
  margin-top: 20px;
  text-align: right;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}

/* Signature */
.health-signature {
  margin-top: 24px;
  text-align: right;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}

/* Full-width images */
.health-img {
  margin-top: 24px;
}

.health-img picture {
  display: block;
  width: 100%;
}

.health-img img {
  width: 100%;
  height: auto;
  display: block;
}

.health-img--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.health-img__trigger,
.health-img__link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  position: relative;
  cursor: zoom-in;
  text-decoration: none;
}

.health-img__trigger:hover img,
.health-img__link:hover img {
  opacity: 0.95;
}

.health-img__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

.health-img__hint svg {
  flex-shrink: 0;
}

/* 白背景拡大モーダル */
.health-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.health-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.health-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.health-modal__dialog {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.health-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.health-modal__close:hover {
  background: var(--red);
  color: #fff;
}

.health-modal__body {
  overflow: auto;
  padding: 44px 24px 24px;
  background: #ffffff;
}

.health-modal__body img {
  display: block;
  width: 100%;
  max-width: 1800px;
  height: auto;
  margin: 0 auto;
  background: #ffffff;
}

@media screen and (max-width: 767px) {
  .health-img__trigger,
  .health-img__link {
    pointer-events: none;
    cursor: default;
  }

  .health-img__hint,
  .health-modal {
    display: none !important;
  }

  .health-notice__badge {
    float: none;
    width: 160px;
    margin: 0 0 16px 0;
  }

  .health-notice__title {
    font-size: 18px;
  }

  .health-table {
    font-size: 12px;
    min-width: 640px;
  }

  .health-table th,
  .health-table td {
    padding: 10px 12px;
  }

  .health-img--scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .health-img--scroll .health-img__trigger,
  .health-img--scroll picture {
    display: block;
    width: max-content;
  }

  .health-img--scroll img {
    width: 720px;
    min-width: 720px;
    max-width: none;
  }
}

.health-modal[aria-hidden="true"] {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.health-modal[aria-hidden="false"] {
    display: flex;
    opacity: 1;
    visibility: visible;;
}