:root {
  --tsn-main: #009380;
  --tsn-text: #333;
  --tsn-bg: #f1f6f9;
  --tsn-border: #e0e0e0;
}

/* 全体のラップ。ここから下のスタイルは .tsn-ai-layout の中だけで適用されます */
.tsn-ai-layout {
  display: flex;
  flex: 1;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--tsn-text);
  background-color: #fdfdfd;
  display: grid;
  grid-template-columns: 1fr 300px 1100px 300px 1fr;
  gap: 20px;
  margin-top: 40px;
  padding-bottom: 60px;
  width: 1500px;
  margin: 0 auto;
}

/* --- 基本タグの干渉防止（スコープ化） --- */
.tsn-ai-layout h1, 
.tsn-ai-layout h2, 
.tsn-ai-layout h3, 
.tsn-ai-layout p, 
.tsn-ai-layout ul, 
.tsn-ai-layout li, 
.tsn-ai-layout a {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.tsn-ai-layout h1 { font-size: 2.2rem; line-height: 1.3; margin: 0 0 15px 0; color: #000; }
.tsn-ai-layout h2 { 
  font-size: 1.35rem;
  text-align: left;
  padding: 10px 0 10px 14px;
  margin: 60px 0 24px;
  background: transparent;
  border-top: none;
  border-bottom: none;
  border-left: 4px solid var(--tsn-main);
  line-height: 1.5;
}
.tsn-ai-layout h3 { 
  font-size: 1.5rem; 
  color: var(--tsn-main); 
  text-align: center;
  border-bottom: 1px solid #ddd; 
  padding-bottom: 10px; 
  margin: 50px 0 30px; 
  text-align: left;
}
.tsn-ai-layout p { margin-bottom: 1.8em; font-size: 1.1rem; text-align: justify; }

/* 左側：サイドバー */
.tsn-ai-sidebar { grid-column: 2; }
.tsn-ai-sticky { position: sticky; top: 30px; }

/* 中央：メインコンテンツ */
.tsn-ai-main {
  grid-column: 3;
  background-color: #fff;
  padding: 40px;
  box-shadow: 0 0 10px rgba(0,0,0,0.02);
  border-radius: 8px;
  min-width: 900px;
}

/* MV画像 */
.tsn-ai-mv {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 40px;
  border-radius: 4px;
}

.tsn-ai-title-area {
  margin-bottom: 50px;
  padding-bottom: 30px;
  text-align: center;
}
.tsn-ai-subtitle { font-size: 1.2rem; color: #444; display: block; margin-top: 10px; font-weight: bold; }

/* INDEXメニュー */
.tsn-ai-index {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
}
.tsn-ai-index-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--tsn-text);
  margin-bottom: 15px;
  border-bottom: 2px solid var(--tsn-main);
  padding-bottom: 8px;
}
.tsn-ai-index ul { list-style: none; }
.tsn-ai-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--tsn-text);
  font-size: 0.85rem;
  font-weight: bold;
  padding: 12px 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}
.tsn-ai-index a:hover { background-color: rgba(0, 147, 128, 0.05); color: var(--tsn-main); }
.tsn-ai-icon { color: var(--tsn-main); margin-right: 10px; flex-shrink: 0; display: flex; align-items: center; }
.tsn-ai-icon svg { width: 18px; height: 18px; fill: currentColor; }
.tsn-ai-text { line-height: 1.4; flex: 1; }
.tsn-ai-chevron {
  width: 5px; height: 5px;
  border-top: 2px solid var(--tsn-main);
  border-right: 2px solid var(--tsn-main);
  transform: rotate(45deg);
  margin-left: 8px;
}

/* 画像回り込み設定 */
.tsn-ai-img-right {
  float: right;
  width: 45%;
  max-width: 420px;
  margin: -15px 0 20px 30px;
  border-radius: 4px;
}

.tsn-ai-img-right-2 {
  float: right;
  width: 45%;
  max-width: 300px;
  margin: 20px 0 20px 30px;
  border-radius: 4px;
}


.marker-text {
  display: inline;
  position: relative;
  font-weight: bold;
  z-index: 1;
}

.marker-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.05em;
  width: 100%;
  height: 0.45em;
  background: #fff36d;
  z-index: -1;

  transform: scaleX(0);
  transform-origin: left center;
  animation: markerLine 0.8s ease-out forwards;
}

@keyframes markerLine {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.highlight {
  background-color: #fff36d; /* 黄色 */
  padding: 0 4px; /* マーカーに余白を加えて目立たせる */
}

.text-underline{
  text-decoration-color: #ffd900;
  text-decoration-line: underline;
  text-decoration-thickness: 4px;
  /* text-underline-offset: 0px; */
  font-weight: bold;
}

.subtitle-text-w{
  font-weight: bold;
}
.blank-cotaniner{
  display: block;
        flex: 0 0 240px;
        margin-right: 2vw;
}
/* PC用 */
@media screen and (min-width: 1025px) {
  .tsn-ai-layout {
      display: flex;
  }
  .tsn-ai-sidebar {
      display: block; /* 左固定メニュー */
      flex: 0 0 240px;
  }
  .tsn-ai-main {
      max-width: calc(100% - 242px);
      margin: 0 auto;
  }
  #hamburger-container {
      display: none !important;
  }
}

/* タブレット用 */
@media screen and (max-width: 1024px) {
  .tsn-ai-layout {
      display: block;
      width: 100%;
  }
  .tsn-ai-sidebar {
      display: none; /* 左メニュー非表示 */
  }
  .tsn-ai-main {
      width: 100%;
      margin: 0 auto;
      max-width: 100%;
      padding: 2vw;
  }
  #hamburger-container {
      display: flex !important;
  }
  .tsn-ai-layout h2{
    font-size: 4vw;
  }
  .tsn-ai-layout h3{
    font-size: 3.5vw;
    text-align: left;
  }
  .tsn-ai-layout p{
    font-size: 2.5vw;
  }
  .tsn-ai-layout h2 {
    border-left: 1vw solid var(--tsn-main);
  }
}