.gantt .grid-background {
  fill: none; }
.gantt .grid-header {
  fill: #ffffff;
  stroke: #e0e0e0;
  stroke-width: 1.4;
  position: sticky;
  top: 0;
  z-index: 10; }

.gantt .grid-row {
  fill: #ffffff; }

.gantt .grid-row:nth-child(even) {
  fill: #f5f5f5; }

.gantt .row-line {
  stroke: #ebeff2; }

.gantt .tick {
  stroke: #e0e0e0;
  stroke-width: 0.2; }
  .gantt .tick.thick {
    stroke-width: 0.4; }

.gantt .today-highlight {
  fill: #fcf8e3;
  opacity: 0.5; }

.gantt .arrow {
  fill: none;
  stroke: #666;
  stroke-width: 1.4; }

.gantt .bar {
  fill: #b8c2cc;
  stroke: #8D99A6;
  stroke-width: 0;
  transition: stroke-width .3s ease;
  user-select: none; }

.gantt .bar-progress {
  fill: #a3a3ff; }

.gantt .bar-invalid {
  fill: transparent;
  stroke: #8D99A6;
  stroke-width: 1;
  stroke-dasharray: 5; }
  .gantt .bar-invalid ~ .bar-label {
    fill: #555; }

.gantt .bar-label {
  fill: #fff;
  dominant-baseline: central;
  text-anchor: middle;
  font-size: 12px;
  font-weight: lighter; }
  .gantt .bar-label.big {
    fill: #555;
    text-anchor: start; }

.gantt .handle {
  fill: #ddd;
  cursor: ew-resize;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease; }

.gantt .bar-wrapper {
  cursor: pointer;
  outline: none; }
  .gantt .bar-wrapper:hover .bar {
    fill: #a9b5c1; }
  .gantt .bar-wrapper:hover .bar-progress {
    fill: #8a8aff; }
  .gantt .bar-wrapper:hover .handle {
    visibility: visible;
    opacity: 1; }
  .gantt .bar-wrapper.active .bar {
    fill: #a9b5c1; }
  .gantt .bar-wrapper.active .bar-progress {
    fill: #8a8aff; }

.gantt .lower-text, .gantt .upper-text {
  font-size: 12px;
  text-anchor: middle; }

.gantt .upper-text {
  fill: #555; }

.gantt .lower-text {
  fill: #333; }

.gantt .hide {
display: none; }

.gantt-container {
  position: relative;
  overflow: auto;
  font-size: 12px;
  height: 80vh; /* コンテナの高さを指定 */
  margin-top: 0; /* ヘッダー分の余白を削除 */
}

.gantt-header-container {
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-bottom: -80px;
}

.gantt-html-header .upper-text,
.gantt-html-header .lower-text {
  font-family: Arial, sans-serif;
}
  .gantt-container .popup-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(193, 189, 189, 0.8);
    padding: 10px;
    color: #959da5;
    border-radius: 3px; 
  }
    .gantt-container .popup-wrapper .title {
      border-bottom: 3px solid #a3a3ff;
      padding: 10px; 
    }

    .gantt-container .popup-wrapper .subtitle {
      padding: 10px;
      color: #dfe2e5; 
    }
    .gantt-container .popup-wrapper .pointer {
      position: absolute;
      height: 5px;
      margin: 0 0 0 -5px;
      border: 5px solid transparent;
      border-top-color: rgba(193, 189, 189, 0.8); 
    }
    
    /* 日付表示を横書きに変更 */
.gantt .lower-text {
  text-anchor: middle;
  dominant-baseline: hanging; /* テキストを上揃えに */
  transform: rotate(0deg); /* 回転をリセット（縦書きになっている場合） */
}

/* 週次・月次ビューの日付表示のスペースを確保 */
.gantt-container .grid-header {
  height: 70px !important; /* ヘッダーの高さを増やして横書きテキスト用のスペースを確保 */
}

/* HTMLヘッダーの場合も同様に */
.gantt-header-container {
  height: 80px !important;
}

/* 日付テキストの位置調整 */
.gantt-html-header .lower-text {
  transform: rotate(0deg) !important;
  margin-top: 5px !important;
  width: auto !important; /* 幅を自動調整 */
  white-space: nowrap;
}