@charset "utf-8";

/* 格助詞ページ専用のスタイル（2カラムレイアウト版） */

/* 960px以上ではページ全体のスクロールを無効化 */
@media only screen and (min-width: 960px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }
  
  #wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  
  .content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
}

/* 959px以下では要素間のマージンを設定 */
@media only screen and (max-width: 959px) {
  * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -o-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
    margin-top: 0.50em;
  }

  /* ルビ・ダークモードのボタン（JSで生成）は他ページと同じ見た目にする */
  #display-options * {
    margin-top: 0;
  }
  
  /* デスクトップ用の注記を非表示 */
  .note-desktop {
    display: none;
  }
  
  /* モバイル用の注記を表示 */
  .note-mobile {
    display: block;
  }
}

/* 960px以上ではモバイル用の注記を非表示 */
@media only screen and (min-width: 960px) {
  .note-mobile {
    display: none;
  }
  
  .note-desktop {
    display: block;
  }
}

/* ルビのフォントサイズと間隔 */
rt {
  font-size: 65%;
  margin-bottom: 0.1em;
}

/* 格助詞ページのタイトル */
.content h1 {
  text-align: center;
  color: #181818;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 10px;
}

/* 960px以上ではタイトルのサイズを固定 */
@media only screen and (min-width: 960px) {
  .content h1 {
    flex-shrink: 0;
    margin-top: 10px;
    margin-bottom: 20px;
  }
}

/* タイトル内の格助詞バッジ */
.particle-type-title {
  position: relative;
  top: -4px;
  margin-left: 1.50em;
  font-size: 12px;
}

/* ローディング表示 */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #666;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8e8e8;
  border-top: 4px solid #5c9f5c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: #666;
}

/* スケルトンスクリーン */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-chart {
  margin-bottom: 15px;
}

.skeleton-bar {
  height: 20px;
  margin-bottom: 15px;
}

.skeleton-example {
  height: 180px;
  margin-bottom: 20px;
}

/* 2カラムレイアウトコンテナ */
.two-column-container {
  display: flex;
  gap: 30px;
  max-width: 1200px;
  margin: 10px auto;
  padding: 0 20px 20px 20px;
}

/* 960px以上ではコンテナを画面いっぱいに */
@media only screen and (min-width: 960px) {
  .two-column-container {
    flex: 1;
    overflow: hidden;
    margin: 0 auto;
    padding: 0 40px 25px;
    width: 100%;
  }
}

/* 960px未満では縦並び（従来のレイアウト） */
@media only screen and (max-width: 959px) {
  /* #footer（position: absolute）と重ならないよう下に余白を取る（style.css と同じ値） */
  .content {
    margin: 30px 0 56px;
  }
  
  .two-column-container {
    flex-direction: column;
    gap: 20px;
  }
  
  /* 「すべての意味の頻度を見る」ボタンを非表示 */
  .show-more {
    display: none;
  }
}

/* 左カラム:使用頻度 */
.left-column {
  flex: 0 0 400px;
  min-width: 0;
}

/* 960px以上では左カラムにスクロールバーを表示 */
@media only screen and (min-width: 960px) {
  .left-column {
    flex: 0 0 calc(30% - 9px);
    min-width: 300px;
    max-width: none;
    overflow-y: auto;
    height: 100%;
    border: 1px solid #a8cfa8;
  }
}

/* 右カラム：用例 */
.right-column {
  flex: 1;
  min-width: 0;
}

/* 960px以上では右カラムにスクロールバーを表示 */
@media only screen and (min-width: 960px) {
  .right-column {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    height: 100%;
    border: 1px solid #a8cfa8;
    overflow: hidden;
  }
}

/* 960px未満では両カラムを全幅に */
@media only screen and (max-width: 959px) {
  .left-column,
  .right-column {
    flex: 1 1 100%;
  }
}

/* 使用割合セクション */
.usage-ratio-section {
  padding: 20px;
  background-color: white;
}

/* 960px以上では使用頻度セクションのスタイルを調整 */
@media only screen and (min-width: 960px) {
  .usage-ratio-section {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .usage-ratio-section h2 {
    flex-shrink: 0;
    padding: 10px 20px;
    margin: 0;
  }
  
  .usage-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 10px 20px;
  }
}

/* 960px未満ではstickyを解除（不要になったので削除） */

.usage-ratio-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2d7a2d;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #76b676;
}

/* 960px以上では使用頻度の見出しをrole-titleと統一 */
@media only screen and (min-width: 960px) {
  .usage-ratio-section h2 {
    font-size: 15px;
    color: #176117;
    margin-bottom: 0;
    padding-bottom: 10px;
    /*border-bottom: 1px dotted #76b676;*/
    background-color: #cae4ca;
  }
}

.usage-ratio-section .note {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* 960px以上では使用頻度のnoteのスタイルを調整 */
@media only screen and (min-width: 960px) {
  .usage-ratio-section .note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 20px;
    line-height: 1.6;
  }
}

/* 横棒グラフ */
.usage-chart {
  margin-top: 20px;
}

/* 960px以上では使用頻度グラフのスタイルを調整 */
@media only screen and (min-width: 960px) {
  .usage-chart {
    margin-top: 20px;
    padding: 0 10px;
  }
}

.show-all-container {
  text-align: center;
  margin-top: 20px;
}

.show-all-button {
  display: inline-block;
  background-color: white;
  color: #2d7a2d;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 25px;
  border: 2px solid #2d7a2d;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Noto Sans JP", Sans-Serif;
  text-decoration: none;
  transition: all 0.3s ease;
}

.show-all-button:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

#show-all-btn:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

/* 960px以上では「すべての意味の頻度を見る」ボタンを非表示 */
@media only screen and (min-width: 960px) {
  .show-more {
    display: none;
  }
}

.chart-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
  min-height: 36px;
}

/* 960px以上では頻度グラフの行をクリック可能にする */
@media only screen and (min-width: 960px) {
  .chart-row {
    cursor: pointer;
    padding: 8px;
    margin-left: -8px;
    margin-right: -8px;
    /* border-radius: 4px; */
    transition: background-color 0.2s ease;
    border-left: 4px solid transparent;
    padding-left: 4px;
  }
  
  .chart-row:hover {
    background-color: #f0f8f0;
  }
  
  .chart-row.active {
    background-color: #e8f5e8;
    border-left-color: #5c9f5c;
  }
}

.chart-row .label {
  width: 180px;
  min-width: 180px;
  font-size: 13px;
  color: #333;
  text-align: left;
  flex-shrink: 0;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-weight: 400;
}

.chart-row .label strong {
  font-weight: 700;
}

.chart-row .bar-container {
  flex: 1;
  height: 20px;
  background-color: #e8e8e8;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.chart-row .bar {
  height: 100%;
  background-color: #5c9f5c;
  border-radius: 0;
  transition: width 0.5s ease;
}

.chart-row .percentage {
  min-width: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #2d7a2d;
  text-align: right;
}

.chart-row .jump-to-example {
  margin-left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  color: #2d7a2d;
  background-color: transparent;
  border: 1px solid #2d7a2d;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chart-row .jump-to-example:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

/* 960px以上では用例ボタンを非表示（右側に用例が表示されているため） */
@media only screen and (min-width: 960px) {
  .chart-row .jump-to-example {
    display: none;
  }
}

/* 用例セクション */
.examples-section {
  padding: 20px;
}

/* 960px以上では用例セクションのpaddingを無効化 */
@media only screen and (min-width: 960px) {
  .examples-section {
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  /* h2を非表示 */
  .examples-section h2 {
    display: none;
  }
  
  /* 用例コンテンツ領域 */
  #role-groups {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
}

.examples-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: #2d7a2d;
  margin-bottom: 30px;
  padding-bottom: 5px;
  border-bottom: 3px solid #76b676;
}

/* 960px以上での初期メッセージ */
.examples-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.examples-placeholder-icon {
  font-size: 48px;
  color: #76b676;
  margin-bottom: 20px;
}

.examples-placeholder-text {
  font-size: 16px;
  line-height: 1.8;
}

@media only screen and (max-width: 959px) {
  .examples-placeholder {
    display: none;
  }
}

/* 意味役割グループ */
.role-group {
  margin-bottom: 35px;
  padding: 10px 20px;
  background-color: white;
  border: 1px solid #a8cfa8;
  border-left: 5px solid #76b676;
  border-radius: 0;
}

/* 役割グループのヘッダー（全画面サイズ共通） */
.role-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.role-group-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #176117;
}

/* 960px以上では役割グループのmargin-bottomとボーダーを無効化 */
@media only screen and (min-width: 960px) {
  .role-group {
    margin-bottom: 0;
    border: none;
    border-left: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  
  /* ヘッダーを固定表示（960px以上用の上書き） */
  .role-group-header {
    flex-shrink: 0;
    padding: 10px 20px;
    margin: 0;
    margin-bottom: 0;
    background-color: #cae4ca;
    border-bottom: none;
  }
  
  .role-group-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #176117;
  }
  
  /* コンテンツエリアをスクロール可能に */
  .role-group-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px 10px 20px;
    min-height: 0;
    max-height: 92.5%;
  }
  
  .role-title {
    flex-shrink: 0;
    padding: 10px 20px;
    margin: 0;
  }
  
  .role-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 10px 20px;
  }
  
  /* 右カラムのコンテンツ切り替え時のトランジション */
  #role-groups {
    transition: opacity 0.2s ease;
    height: 100%;
    min-height: 0;
  }
}

.role-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dotted #ccc;
  margin-top: 5px;
}

/* 960px以上では.role-titleのスタイルを上書き */
@media only screen and (min-width: 960px) {
  .role-title {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 2px dotted #ccc;
    background-color: #cae4ca;
  }
}

.role-title-left {
  display: flex;
  align-items: center;
  gap: 1.00em;
}

.role-name {
  font-size: 16px;
  font-weight: 400;
  color: #176117;
}

.role-name strong {
  font-weight: 700;
}

.frequency-badge {
  display: inline-block;
  background-color: #539753;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 0;
}

.back-to-frequency {
  padding: 4px 10px;
  font-size: 12px;
  color: #2d7a2d;
  background-color: transparent;
  border: 1px solid #2d7a2d;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 400;
}

.back-to-frequency:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

/* 960px以上では「使用頻度」ボタンを非表示 */
@media only screen and (min-width: 960px) {
  .back-to-frequency {
    display: none;
  }
}

/* もっと見るリンク */
.load-more-container {
  text-align: left;
  margin-top: 0px;
  padding-top: 0px;
  padding-left: 0.70em;
}

/* 960px以上では「+5件表示」ボタンを非表示 */
@media only screen and (min-width: 960px) {
  .load-more-container {
    display: none;
  }
}

/* 検索ページへのリンク */
.search-link-container {
  text-align: right;
  margin-top: 15px;
  padding-right: 0.70em;
  padding-bottom: 5px;
}

.search-link-button {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  color: #2d7a2d;
  background-color: transparent;
  border: 1px solid #2d7a2d;
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 400;
  font-family: "Noto Sans JP", Sans-Serif;
  margin-right: -11px;
}

.search-link-button:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

/* 格助詞ページのボタンスタイル（index.htmlには影響しない） */
.content button {
  color: #2d7a2d;
  width: auto;
  font-size: 12px;
  font-family: "Noto Sans JP", Sans-Serif;
  font-weight: 400;
  padding: 4px 10px;
  background-color: transparent;
  border: 1px solid #2d7a2d;
  cursor: pointer;
  margin-left: 6px;
  border-radius: 0;
  transition: all 0.2s ease;
}

.content button:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

.content button:disabled {
  color: #999;
  border-color: #ddd;
  cursor: default;
  background-color: transparent;
}

.content button:disabled:hover {
  background-color: transparent;
  color: #999;
}

/* 用例リスト */
.example-list {
  list-style: none;
  padding-left: 0;
  padding-top: 15px;
}

/* 960px以上での用例セクションの注記スタイル */
@media only screen and (min-width: 960px) {
  .examples-section .note {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    margin-bottom: 0px;
    line-height: 1.6;
  }
}

.example-list li {
  font-size: 14px;
  line-height: 2.5;
  color: #333;
  padding-left: 0;
  margin-bottom: 5px;
}

.example-list li strong {
  color: #176117;
  font-weight: 700;
}

.example-list li .verb-highlight {
  border-bottom: 3px dotted #4e964e;
  padding-bottom: 2px;
}

/* 単一格検索へのリンク */
.search-more,
.show-more {
  margin-top: 40px;
  text-align: center;
}

.search-button {
  display: inline-block;
  background-color: white;
  color: #2d7a2d;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 25px;
  border: 2px solid #2d7a2d;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* buttonタグの場合の詳細度を上げる */
.content button.search-button {
  display: inline-block;
  background-color: white;
  color: #2d7a2d;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border: 2px solid #2d7a2d;
  border-radius: 0;
  text-decoration: none;
  transition: all 0.3s ease;
  width: auto;
  margin-left: 0;
  cursor: pointer;
}

.search-button:hover,
.content button.search-button:hover {
  color: white !important;
  background-color: #76b676 !important;
  border-color: #76b676 !important;
}

.search-button i {
  margin-right: 8px;
}

/* レスポンシブ対応 */
@media only screen and (max-width: 768px) {
  .chart-row {
    flex-wrap: wrap;
  }
  
  .chart-row .label {
    min-width: 100%;
    margin-bottom: 5px;
  }
  
  .chart-row .bar-container {
    flex: 1;
  }
  
  .chart-row .percentage {
    min-width: 50px;
  }
  
  .usage-ratio-section,
  .examples-section {
    padding: 15px;
  }
  
  .role-group {
    padding: 15px;
  }
}

@media only screen and (max-width: 640px) {
  .usage-ratio-section h2,
  .examples-section h2 {
    font-size: 16px;
  }
  
  .role-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .search-button {
    font-size: 13px;
    padding: 10px 20px;
  }
}

/* 格ラベルのスタイル（典型） */
.particle-label,
.example-list .particle-label {
  position: relative;
  padding-bottom: 18px;
  display: inline-block;
  margin-left: 4px;
  margin-right: 12px;
  min-width: 3.5em;
  text-align: center;
  font-weight: 700;
}

/* アンダーライン（ラベルの上） */
.particle-label::before,
.example-list .particle-label::before {
  content: '';
  position: absolute;
  bottom: 21px;
  left: 0;
  right: 0;
  border-bottom: 2px solid #2d7a2d;
}

/* ラベル（アンダーラインの下） */
.particle-label::after,
.example-list .particle-label::after {
  content: attr(data-particle);
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: normal;
  line-height: 1.8;
  color: #2d7a2d;
  background: white;
  padding: 0px 4px;
  white-space: nowrap;
  border: 1px solid #2d7a2d;
  border-radius: 0;
}

/* 対象格（ページで扱っている格）のスタイル - 典型 */
.particle-label.target-particle::after,
.example-list .particle-label.target-particle::after {
  background: #5c9f5c;
  color: white;
  font-weight: 400;
  border-color: #5c9f5c;
}

/* 格ラベルのスタイル（周辺） */
.particle-label-optional,
.example-list .particle-label-optional {
  position: relative;
  padding-bottom: 18px;
  display: inline-block;
  margin-left: 4px;
  margin-right: 12px;
  min-width: 3.5em;
  text-align: center;
  font-weight: 700;
}

/* アンダーライン（実線、ラベルの上） */
.particle-label-optional::before,
.example-list .particle-label-optional::before {
  content: '';
  position: absolute;
  bottom: 21px;
  left: 0;
  right: 0;
  border-bottom: 2px solid #999;
}

/* ラベル（アンダーラインの下、グレー） */
.particle-label-optional::after,
.example-list .particle-label-optional::after {
  content: attr(data-particle);
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: normal;
  line-height: 1.8;
  color: #4d4d4d;
  background: white;
  padding: 0px 4px;
  white-space: nowrap;
  border: 1px solid #4d4d4d;
  border-radius: 0;
}

/* 対象格（ページで扱っている格）のスタイル - 周辺 */
.particle-label-optional.target-particle::after,
.example-list .particle-label-optional.target-particle::after {
  background: #5c9f5c;
  color: white;
  font-weight: 600;
  border-color: #5c9f5c;
}

/* 動詞のハイライト */
.example-list .verb-highlight {
  border-bottom: 3px dotted #4e964e;
  padding-bottom: 2px;
  margin-right: 8px;
}

/* ========================================
   モード切替ボタン
======================================== */

.mode-selector-container {
  text-align: right;
  margin: 0 40px 15px;
}

.mode-selector {
  display: inline-flex;
  background: #ffffff;
  border-radius: 4px;
  padding: 3px;
  /* gap: 3px; */
}

.mode-btn {
  padding: 4px 15px 6px !important;
  border: none;
  background: transparent;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
  font-family: "Noto Sans JP", sans-serif;
  margin-left: 0 !important;
  border: 1px solid #ddd;
}

/* 隣接するボタンの左ボーダーを削除（重なりを防ぐ） */
.mode-btn + .mode-btn {
  border-left: none;
}

.mode-btn:hover {
  background: rgba(92, 159, 92, 0.1);
  color: #5c9f5c;
}

.mode-btn.active {
  background: #5c9f5c;
  color: white;
  border-color: #5c9f5c;
}

/* モバイル表示 */
@media only screen and (max-width: 959px) {
  .mode-selector-container {
    margin: 25px 20px 15px;
    text-align: center;
  }
  
  .mode-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* 積み上げ棒グラフのスタイル */
.bar-segment {
  height: 100%;
  display: inline-block;
  transition: opacity 0.3s ease;
}

.bar-segment.argument {
  background: #5c9f5c;
}

.bar-segment.adjunct {
  background: #c8e6c8;
}

/* モード別の表示制御 */
.mode-argument .bar-segment.adjunct {
  opacity: 0.2;
}

.mode-adjunct .bar-segment.argument {
  opacity: 0.2;
}

/* 役割グループのモード表示 */
.role-group[data-type="argument"] {
  display: block;
}

.role-group[data-type="adjunct"] {
  display: block;
}

.mode-argument .role-group[data-type="adjunct"] {
  display: none;
}

.mode-adjunct .role-group[data-type="argument"] {
  display: none;
}

/* 役割タイプバッジ */
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  margin-right: 8px;
}

.type-badge.argument {
  background: #5c9f5c;
  color: white;
}

.type-badge.adjunct {
  background: #999;
  color: white;
}

/* 役割グループのカウント */
.role-count {
  font-size: 13px;
  color: #666;
  font-weight: 400;
}

/* 用例のメタ情報 */
.example-meta {
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

.verb-info {
  margin-right: 10px;
  font-weight: 500;
}

.wlsp-category {
  color: #5c9f5c;
  font-size: 11px;
}

/* もっと見るボタン */
.load-more-container {
  text-align: center;
  margin: 15px 0;
}

.load-more-btn {
  padding: 8px 20px;
  background: white;
  border: 2px solid #5c9f5c;
  border-radius: 4px;
  color: #5c9f5c;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Noto Sans JP", sans-serif;
}

.load-more-btn:hover {
  background: #5c9f5c;
  color: white;
}

/* 棒グラフ行 */
.chart-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 15px;
  gap: 5px;
  min-height: auto;
  cursor: pointer;
  padding: 8px;
  margin-left: -8px;
  margin-right: -8px;
  transition: background-color 0.2s ease;
  border-left: 4px solid transparent;
  padding-left: 4px;
}

.chart-row:hover {
  background-color: #f0f8f0;
}

.chart-row.active {
  background-color: #e8f5e8;
  border-left-color: #5c9f5c;
}

/* 意味役割ラベル（1行目） */
.chart-label {
  width: 100%;
  font-size: 13px;
  color: #333;
  text-align: left;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-weight: 400;
  margin-bottom: 5px;
}

/* 棒グラフコンテナ（2行目） */
.chart-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e8e8e8;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  margin-bottom: 5px;
}

/* 棒グラフのラッパー */
.chart-bar-wrapper {
  display: flex;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
}

/* カウント表示（3行目） */
.chart-count {
  width: 100%;
  margin-left: 0;
  font-size: 14px;
  font-weight: 600;
  color: #2d7a2d;
  text-align: left;
  white-space: nowrap;
}

.count-detail {
  font-weight: 400;
  margin-left: 2px;
}

/* パーセンテージ表示（カウント内） */
.chart-percentage {
  font-size: 14px;
  font-weight: 600;
  color: #2d7a2d;
  margin-left: 8px;
}

/* 内訳表示（両方モード） */
.count-breakdown {
  font-size: 12px;
  font-weight: 400;
  color: #3f3f3f;
  margin-top: 2px;
}

/* ========================================
   左パネル（意味別の使用頻度）の折りたたみと
   パネル見出し（particle_search/result/ と統一）
======================================== */

.panel-collapse-btn,
.panel-expand-rail {
  display: none;
}

@media only screen and (max-width: 959px) {
  .usage-section-header {
    margin-top: 0;
  }
}

@media only screen and (min-width: 960px) {
  .usage-section-header {
    flex-shrink: 0;
    box-sizing: border-box;
    height: 34px;
    padding: 0 4px 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #cae4ca;
  }

  .usage-ratio-section .usage-section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 700;
    color: #176117;
  }

  .role-group-header {
    box-sizing: border-box;
    height: 34px;
    padding: 0 12px;
  }

  .role-group-title {
    font-size: 14px;
    font-weight: 700;
  }

  /* .content button（style.css / 本ファイル）より詳細度を上げる */
  .collapsible-left-layout .panel-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    color: #2d7a2d;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
  }

  html.usage-panel-collapsed .collapsible-left-layout {
    gap: 0;
  }

  html.usage-panel-collapsed .collapsible-left-layout .left-column {
    flex: 0 0 36px;
    min-width: 36px;
    max-width: 36px;
    overflow: hidden;
    border-right: none;
  }

  html.usage-panel-collapsed .collapsible-left-layout .usage-ratio-section {
    display: none;
  }

  html.usage-panel-collapsed .collapsible-left-layout .panel-expand-rail {
    display: flex;
  }

  .collapsible-left-layout .panel-expand-rail {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px 0;
    color: #176117;
    background-color: #cae4ca;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-family: "Noto Sans JP", sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: background-color 0.2s ease;
  }

  .collapsible-left-layout .panel-expand-rail:hover {
    color: #176117 !important;
    background-color: #b3d8b3 !important;
    border-color: transparent !important;
  }

  .panel-expand-rail-label {
    writing-mode: vertical-rl;
    letter-spacing: 0.15em;
  }
}

/* 959px以下：使用割合と用例の幅をメニュー（style.css で左右 margin 15% / 7.5%）に揃える。
   768px以下の .usage-ratio-section / .examples-section の padding より後に置くこと */
@media only screen and (max-width: 959px) {
  .two-column-container {
    width: 70%;
    padding: 0 0 20px;
  }

  .usage-ratio-section,
  .examples-section {
    padding-left: 0;
    padding-right: 0;
  }
}

@media only screen and (max-width: 640px) {
  .two-column-container {
    width: 85%;
  }
}

/* 572px以下は #alternative-footer（高さ 4em）に切り替わるため余白を広げる */
@media only screen and (max-width: 572px) {
  .content {
    margin-bottom: 70px;
  }
}


