/* ========================================
   個人情報保護規程：樹型メニュー
======================================== */

body.privacy-modal-open {
  overflow: hidden;
}

/* ========================================
   ページタイトル
======================================== */

.privacy-page-title {
  padding: 42px 20px 34px;
  text-align: center;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(132, 185, 92, 0.17),
      transparent 25%
    ),
    radial-gradient(
      circle at 85% 72%,
      rgba(102, 163, 113, 0.15),
      transparent 27%
    ),
    #f2f8ee;
}

.privacy-page-title__en {
  margin: 0 0 8px;
  color: #719b4e;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.2em;
}

.privacy-page-title h1 {
  margin: 0;
}

.privacy-page-title > p:last-child {
  max-width: 720px;
  margin: 14px auto 0;
  color: #5f6b61;
  font-size: 15px;
  line-height: 1.8;
}

/* ========================================
   樹型メニュー
======================================== */

.privacy-tree-section {
  padding: 38px 14px 74px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(166, 205, 124, 0.12),
      transparent 35%
    ),
    linear-gradient(
      180deg,
      #fffef9 0%,
      #f5f9ef 100%
    );
}

.privacy-tree-section__inner {
  width: min(1122px, 100%);
  margin: 0 auto;
}

.privacy-tree-map {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.privacy-tree-map__image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* ========================================
   葉っぱ上の透明ボタン
======================================== */

.privacy-hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.privacy-hotspot::after {
  content: "";
  position: absolute;
  inset: 3%;
  border: 4px solid transparent;
  border-radius: inherit;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .privacy-hotspot:hover::after {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.75);
    transform: scale(1.03);
  }
}

.privacy-hotspot:focus-visible {
  outline: none;
}

.privacy-hotspot:focus-visible::after {
  background: rgba(255, 255, 255, 0.16);
  border-color: #f1bd55;
  box-shadow:
    0 0 0 5px rgba(241, 189, 85, 0.3);
}

/* ========================================
   葉っぱのクリック位置
======================================== */

.privacy-hotspot--1 {
  left: 39.3%;
  top: 10.5%;
  width: 21.5%;
  height: 18.5%;
}

.privacy-hotspot--2 {
  left: 16.7%;
  top: 19%;
  width: 23.5%;
  height: 17.5%;
}

.privacy-hotspot--3 {
  left: 59.6%;
  top: 19%;
  width: 23.5%;
  height: 18%;
}

.privacy-hotspot--4 {
  left: 5.8%;
  top: 34.1%;
  width: 27.5%;
  height: 17.5%;
}

.privacy-hotspot--5 {
  left: 67%;
  top: 34.2%;
  width: 27.5%;
  height: 17.5%;
}

.privacy-hotspot--6 {
  left: 5.8%;
  top: 50%;
  width: 28%;
  height: 17.5%;
}

.privacy-hotspot--7 {
  left: 66.3%;
  top: 50%;
  width: 28%;
  height: 17.5%;
}

.privacy-hotspot--8 {
  left: 15.6%;
  top: 66.1%;
  width: 22.5%;
  height: 15%;
}

.privacy-hotspot--9 {
  left: 40.7%;
  top: 66.5%;
  width: 18.8%;
  height: 17%;
}

.privacy-hotspot--10 {
  left: 63.4%;
  top: 66.2%;
  width: 22.5%;
  height: 15%;
}

.privacy-tree-section__hint {
  margin: 18px 0 0;
  color: #5c7653;
  font-size: 14px;
  text-align: center;
}

/* ========================================
   内容量に合わせて変化するモーダル
======================================== */

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.privacy-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.privacy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 47, 27, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.privacy-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  height: auto;
  max-height: calc(100dvh - 24px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fffefb;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.36);
  transform: scale(0.96) translateY(18px);
  transition:
    width 0.22s ease,
    transform 0.28s ease;
}

/* 条文数が多い章 */
.privacy-modal__panel.is-wide {
  width: min(980px, 100%);
}

/* 長い章 */
.privacy-modal__panel.is-tall {
  height: min(90dvh, 900px);
}

/* 手数料表 */
.privacy-modal__panel.is-table {
  width: min(900px, 100%);
}

.privacy-modal.open .privacy-modal__panel {
  transform: scale(1) translateY(0);
}

/* ========================================
   モーダルヘッダー
======================================== */

.privacy-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 18px 20px 16px;
  color: #fff;
  background:
    radial-gradient(
      circle at 90% 18%,
      rgba(255, 255, 255, 0.16),
      transparent 26%
    ),
    #2f7437;
}

.privacy-modal__header > div {
  min-width: 0;
}

.privacy-modal__label {
  margin: 0 0 5px;
  color: #ddefd9;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.16em;
}

.privacy-modal__header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.privacy-modal__close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0 0 2px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  font-family: inherit;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.privacy-modal__close:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(5deg);
}

.privacy-modal__close:active {
  transform: scale(0.96);
}

.privacy-modal__close:focus-visible,
.privacy-modal__close-button:focus-visible {
  outline: 4px solid #f1bd55;
  outline-offset: 3px;
}

/* ========================================
   モーダル本文
======================================== */

.privacy-modal__body {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: calc(100dvh - 168px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 42px);
  color: #354239;
  font-size: 16px;
  line-height: 1.95;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.privacy-modal__panel.is-tall .privacy-modal__body {
  flex: 1 1 auto;
  max-height: none;
}

.privacy-modal__body > section {
  width: min(900px, 100%);
  margin: 0 auto;
}

.privacy-source-title {
  margin: 0 0 24px;
  padding: 0 0 13px;
  color: #2f7437;
  border-bottom: 3px solid #dcebd8;
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1.5;
}

.privacy-modal__body h3:not(.privacy-source-title) {
  margin: 30px 0 11px;
  padding-left: 12px;
  color: #376f3c;
  border-left: 5px solid #86b66b;
  font-size: 19px;
  line-height: 1.6;
}

.privacy-modal__body section > p {
  margin: 0 0 18px;
  text-indent: 1em;
}

.privacy-modal__body ol {
  margin: 0 0 22px;
  padding-left: 1.6em;
}

.privacy-modal__body li {
  margin-bottom: 11px;
}

.privacy-modal__body ol ol {
  margin-top: 9px;
  margin-bottom: 9px;
  padding-left: 1.45em;
}

.privacy-modal__body strong {
  color: #2f7437;
}

/* ========================================
   手数料表
======================================== */

.privacy-fee-table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: 13px;
  -webkit-overflow-scrolling: touch;
}

.privacy-modal .fee-table {
  width: 100%;
  min-width: 560px;
  margin: 18px 0 0;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
}

.privacy-modal .fee-table th,
.privacy-modal .fee-table td {
  display: table-cell;
  width: auto;
  padding: 14px 15px;
  border: 1px solid #d6e3d5;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}

.privacy-modal .fee-table th {
  color: #2f7437;
  background: #edf6ea;
  font-weight: 700;
}

.privacy-modal .fee-table td {
  background: #fff;
}

.privacy-modal .fee-table th:last-child,
.privacy-modal .fee-table td:last-child {
  width: 130px;
  white-space: nowrap;
}

/* ========================================
   モーダルフッター
======================================== */

.privacy-modal__footer {
  flex: 0 0 auto;
  padding:
    11px
    20px
    calc(14px + env(safe-area-inset-bottom));
  background: #fffefb;
  border-top: 1px solid #e2ebe0;
  text-align: center;
}

.privacy-modal__close-button {
  min-width: 150px;
  min-height: 46px;
  padding: 10px 26px;
  color: #fff;
  background: #2f7437;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.privacy-modal__close-button:hover {
  background: #235d2a;
}

.privacy-modal__close-button:active {
  transform: scale(0.98);
}

/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 767px) {
  .privacy-page-title {
    padding: 31px 16px 27px;
  }

  .privacy-page-title__en {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .privacy-page-title h1 {
    font-size: 24px;
  }

  .privacy-page-title > p:last-child {
    margin-top: 11px;
    font-size: 13px;
    text-align: left;
  }

  .privacy-tree-section {
    padding: 20px 0 48px;
    overflow: hidden;
  }

  .privacy-tree-section__inner {
    width: 100%;
  }

  .privacy-tree-map {
    width: 100%;
  }

  .privacy-tree-map__image {
    width: 100%;
  }

  .privacy-hotspot::after {
    inset: 1%;
    border-width: 2px;
  }

  .privacy-tree-section__hint {
    margin-top: 8px;
    padding: 0 15px;
    font-size: 12px;
  }

  .privacy-modal {
    align-items: center;
    padding:
      max(5px, env(safe-area-inset-top))
      max(5px, env(safe-area-inset-right))
      max(5px, env(safe-area-inset-bottom))
      max(5px, env(safe-area-inset-left));
  }

  .privacy-modal__panel,
  .privacy-modal__panel.is-wide,
  .privacy-modal__panel.is-table {
    width: 100%;
    max-height: calc(100dvh - 10px);
    border-radius: 14px;
  }

  .privacy-modal__panel.is-tall {
    width: 100%;
    height: calc(100dvh - 10px);
  }

  .privacy-modal__header {
    gap: 12px;
    padding: 15px 13px 13px;
  }

  .privacy-modal__label {
    font-size: 9px;
  }

  .privacy-modal__header h2 {
    font-size: 17px;
  }

  .privacy-modal__close {
    width: 38px;
    height: 38px;
    font-size: 25px;
  }

  .privacy-modal__body {
    padding: 20px 15px 28px;
    font-size: 15px;
    line-height: 1.9;
    scrollbar-gutter: auto;
  }

  .privacy-source-title {
    margin-bottom: 20px;
    font-size: 21px;
  }

  .privacy-modal__body
  h3:not(.privacy-source-title) {
    margin-top: 28px;
    font-size: 18px;
  }

  .privacy-modal__body ol {
    padding-left: 1.35em;
  }

  .privacy-modal__footer {
    padding: 10px 15px 14px;
  }

  .privacy-modal .fee-table th,
  .privacy-modal .fee-table td {
    display: table-cell;
    padding: 10px 9px;
    font-size: 13px;
    line-height: 1.6;
  }

  .privacy-modal
  .fee-table th:last-child,
  .privacy-modal
  .fee-table td:last-child {
    width: 82px;
  }

  .privacy-modal__body {
    max-height: calc(100dvh - 150px);
    padding: 18px 14px 20px;
    font-size: 15px;
    line-height: 1.85;
  }

  .privacy-source-title {
    margin-bottom: 20px;
    font-size: 21px;
  }

  .privacy-modal__body h3:not(.privacy-source-title) {
    margin-top: 25px;
    padding-left: 10px;
    font-size: 17px;
  }

  .privacy-modal__body section > p {
    text-indent: 0;
  }

  .privacy-modal__body ol {
    padding-left: 1.35em;
  }

  .privacy-modal__footer {
    padding:
      9px
      14px
      calc(10px + env(safe-area-inset-bottom));
  }

  .privacy-modal__close-button {
    min-height: 42px;
    padding: 8px 24px;
  }

  .privacy-modal .fee-table th,
  .privacy-modal .fee-table td {
    padding: 11px 10px;
    font-size: 13px;
  }

}

/* ========================================
   狭いスマートフォン
======================================== */

@media screen and (max-width: 390px) {
  .privacy-modal__body {
    padding-right: 12px;
    padding-left: 12px;
    font-size: 14px;
  }

  .privacy-source-title {
    font-size: 19px;
  }

  .privacy-modal__body
  h3:not(.privacy-source-title) {
    font-size: 17px;
  }
}

/* ========================================
   スクリーンリーダー専用
======================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ========================================
   動きを減らす設定
======================================== */

@media (prefers-reduced-motion: reduce) {
  .privacy-hotspot::after,
  .privacy-modal,
  .privacy-modal__panel,
  .privacy-modal__close,
  .privacy-modal__close-button {
    transition: none;
  }
}