@charset "utf-8";

/* 格助詞ページ専用のスタイル */

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

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

/* タイトル内の格助詞バッジ */
.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;
}

/* 使用割合セクション */
.usage-ratio-section {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
}

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

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

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

.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;
}

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

.chart-row .label {
  width: 240px;
  min-width: 240px;
  font-size: 14px;
  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;
}

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

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

/* 意味役割グループ */
.role-group {
  margin-bottom: 35px;
  padding: 10px 20px;
  background-color: #f9f9f9;
  border: 1px solid #a8cfa8;
  border-left: 5px solid #76b676;
  border-radius: 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;
}

.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;
}

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

/* 検索ページへのリンク */
.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: 90%;
  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;
}

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

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

.example-list li .verb-highlight {
  /* display: inline-block; */
  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;
  }
}
