
.org-chart ul {
    list-style: none;
    margin: 0px 0px;
    flex-direction: column;
    position: relative;
    white-space: nowrap;
    display: block;
}

.org-chart > ul > li {
    margin-left: 0;
}

.org-chart li {
    flex-direction: column;
    position: relative;
    margin-left: 20px;
    margin-top: 5px;
    display: block;
  }

/* Node styles */
.org-chart li a {
    border: 1px solid var(--org-chart-node-border);
    padding: 2px 10px 2px 10px;
    text-decoration: none;
    color: var(--org-chart-node-text);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 18px; 
    display: block;
    border-radius: 6px;
    background: var(--org-chart-node-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
    white-space: nowrap; 
}

 
/* Hover effects */
.org-chart li a:hover, .org-chart li a:hover + ul li a {
    background: var(--org-chart-node-hover-bg);
    color: #000;
    border-color: var(--org-chart-node-border);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.org-chart li a:hover + ul li::before,
.org-chart li a:hover + ul li::after,
.org-chart li a:hover + ul::before,
.org-chart li a:hover + ul ul::before {
    border-width: 3px;
}

.org-chart ul li ul li::before {
  content: "";
  position: absolute;
  top: -0.3em;
  left: -20px;
  width: 20px;
  height: calc(100% + 1em);
  border-left: 1px solid var(--org-chart-line-color);
}
 
.org-chart ul li ul li:last-child::before {
  height: calc(1.3em);
}
 
.org-chart ul li ul li::after {
  content: "";
  position: absolute;
  top: 1.0em;
  left: -20px;
  width: 20px;
  border-bottom: 1px solid var(--org-chart-line-color);
}

@media (max-width: 768px) {
  .org-chart {
    width: 100%;
    overflow-x: auto; /* 横スクロールを有効にする */
    font-size: 16px;
  }

  .org-chart > ul {
    display: inline-block; /* コンテンツ全体の幅を確保 */
    padding: 10px;         /* スクロール時の見切れ防止 */
  }

  .org-chart li a {
    font-size: 16px;
    padding: 2px 8px;
    white-space: nowrap; /* こちらは nowrap のまま維持 */
  }
}
