/* Web サービス一覧 スタイル */

.wsc-outer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.wsc-intro {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* タブ */
.wsc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.2rem;
}
.wsc-tab {
  font-family: var(--font-primary);
  font-size: 0.85rem;
  padding: 0.55rem 1.2rem;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.wsc-tab:hover { color: var(--color-primary); }
.wsc-tab.active {
  color: var(--color-primary);
  border-color: var(--color-border);
  border-bottom: 1px solid var(--color-bg);
  background-color: var(--color-bg);
}
.wsc-tab[disabled] {
  cursor: not-allowed;
  color: var(--color-text-muted);
  opacity: 0.55;
}
.wsc-tab-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border-radius: 2px;
  letter-spacing: 0.08em;
}

/* フィルタバー */
.wsc-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}
.wsc-filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.wsc-filter-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-right: 0.2rem;
}
.wsc-search-input {
  font-size: 0.85rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  width: 220px;
  font-family: var(--font-primary);
}
.wsc-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.wsc-chips {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.wsc-chip {
  font-size: 0.76rem;
  font-family: var(--font-primary);
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-light);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.wsc-chip:hover { background: var(--color-bg-alt); }
.wsc-chip.active {
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.wsc-result-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* テーブル: literature-history-map / book-series-catalog の二分割配色 +
   shopping-center-map のストライプ + sticky thead パターンを移植 */
.wsc-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 340px);
  min-height: 320px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
}
.wsc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-primary);
  min-width: 900px;
  background: transparent;
}
.wsc-table thead {
  background: var(--color-bg-alt);
  position: sticky;
  top: 0;
  z-index: 2;
}
.wsc-table thead th {
  border-bottom: 2px solid var(--color-border);
  padding: 0.4rem 0.7rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary-dark);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.wsc-table thead th.no-sort { cursor: default; }
.wsc-table thead th .sort-arrow {
  display: inline-block;
  margin-left: 0.3em;
  color: var(--color-text-muted);
  font-size: 0.85em;
  opacity: 0.5;
}
.wsc-table thead th.sorted-asc .sort-arrow::after,
.wsc-table thead th.sorted-desc .sort-arrow::after {
  opacity: 1;
  color: var(--color-primary);
}
.wsc-table thead th.sorted-asc .sort-arrow::after  { content: "▲"; }
.wsc-table thead th.sorted-desc .sort-arrow::after { content: "▼"; }

.wsc-table tbody td {
  padding: 0.28rem 0.7rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  line-height: 1.5;
  white-space: nowrap;
}

/* サービス名列 = 生成り背景 + 明朝体 (book-series-catalog の title-cell パターン) */
.wsc-table .wsc-name-cell {
  background: var(--color-bg-alt);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 500;
  cursor: pointer;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wsc-table .wsc-name-cell:hover { text-decoration: underline; }

/* 右側の他列 = 白背景・行ごとのストライプ */
.wsc-table tbody tr.wsc-data-row td:not(.wsc-name-cell) {
  background: var(--color-white);
  color: var(--color-text);
}
.wsc-table tbody tr.wsc-row-odd td:not(.wsc-name-cell) {
  background: #fdfcfa;
}

/* hover / expanded はストライプより優先 */
.wsc-table tbody tr.wsc-data-row:hover td { background: #f4eee0 !important; }
.wsc-table tbody tr.wsc-data-row.expanded td { background: #ece6dc !important; }
.wsc-table tbody tr.wsc-data-row.expanded .wsc-name-cell { background: #e6dcc5 !important; }

.wsc-cat-chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.05rem 0.5rem;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  border-radius: 2px;
  white-space: nowrap;
}
.wsc-country-cell {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.wsc-link-cell a {
  font-size: 0.78rem;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}
.wsc-link-cell a:hover { text-decoration: underline; }
.wsc-link-cell .pr-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-right: 0.2em;
}

/* 詳細行 (展開時) */
.wsc-detail-row td {
  background: var(--color-bg-alt) !important;
  padding: 0.8rem 1.2rem;
  border-top: none;
  border-bottom: 2px solid var(--color-border);
  white-space: normal;
}
.wsc-detail-desc {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--color-text-light);
  margin: 0 0 0.7rem 0;
}
.wsc-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}
.wsc-detail-meta strong {
  color: var(--color-text-light);
  margin-right: 0.4em;
  font-weight: 500;
}
.wsc-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.82rem;
}
.wsc-detail-actions a {
  color: var(--color-accent);
  text-decoration: none;
}
.wsc-detail-actions a:hover { text-decoration: underline; }

/* ページャ */
.wsc-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.wsc-pager button {
  font-family: var(--font-primary);
  font-size: 0.82rem;
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-light);
  cursor: pointer;
}
.wsc-pager button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wsc-pager button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 歴史軸ビュー */
.wsc-history-wrap {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  overflow: auto;
  max-height: calc(100vh - 280px);
  min-height: 360px;
  position: relative;
  cursor: grab;
}
.wsc-history-wrap.is-panning {
  cursor: grabbing;
  user-select: none;
}
.wsc-history-wrap svg { display: block; }
.wsc-history-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.wsc-history-filter {
  margin-bottom: 0.6rem;
}
.wsc-history .lane-bg {
  fill: rgba(0, 0, 0, 0.025);
}
.wsc-history .lane-bg.alt { fill: transparent; }
.wsc-history .lane-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  fill: var(--color-primary);
  text-anchor: end;
}
.wsc-history .axis-label {
  font-family: var(--font-primary);
  font-size: 0.7rem;
  fill: var(--color-text-muted);
}
.wsc-history .grid-line {
  stroke: var(--color-border);
  stroke-width: 0.5;
}
.wsc-history .grid-line.major {
  stroke: var(--color-border);
  stroke-width: 1;
}
.wsc-history .service-dot {
  cursor: pointer;
  transition: r 0.12s, stroke 0.12s;
}
.wsc-history .service-dot:hover {
  stroke: var(--color-primary-dark);
  stroke-width: 2;
}
.wsc-history .service-label {
  font-family: var(--font-primary);
  font-size: 0.66rem;
  fill: var(--color-text);
  pointer-events: none;
}

.wsc-tooltip {
  position: fixed;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.5;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  max-width: 240px;
}
.wsc-tooltip-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}
.wsc-tooltip-meta {
  color: var(--color-text-muted);
}

/* 国別タブ */
.wsc-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.wsc-country-card {
  border: 1px solid var(--color-border);
  background: var(--color-white);
  overflow: hidden;
}
.wsc-country-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background-color 0.15s;
}
.wsc-country-card > summary::-webkit-details-marker { display: none; }
.wsc-country-card[open] > summary { background: #ece6dc; }
.wsc-country-card > summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}
.wsc-country-card[open] > summary::after { transform: rotate(90deg); }
.wsc-country-flag {
  font-size: 1.4rem;
  line-height: 1;
}
.wsc-country-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
}
.wsc-country-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.wsc-country-services {
  padding: 0.5rem 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wsc-country-service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dotted var(--color-border);
  font-size: 0.82rem;
  align-items: baseline;
}
.wsc-country-service-row:last-child { border-bottom: none; }
.wsc-country-service-name {
  font-family: var(--font-heading);
  color: var(--color-primary);
  cursor: pointer;
}
.wsc-country-service-name:hover { text-decoration: underline; }
.wsc-country-service-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.wsc-country-section-pill {
  display: inline-block;
  font-size: 0.62rem;
  padding: 0.05rem 0.4rem;
  border-radius: 2px;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.wsc-country-section-pill.jp { background: #c0392b22; color: #c0392b; }
.wsc-country-section-pill.global-jp { background: #5b8e5b33; color: #3f6b3f; }
.wsc-country-section-pill.global-no-jp { background: #b85a2a22; color: #b85a2a; }

/* カテゴリ階層タブ */
.wsc-cat-tree {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.wsc-cat-group {
  border: 1px solid var(--color-border);
  background: var(--color-white);
}
.wsc-cat-group-header {
  padding: 0.65rem 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.wsc-cat-group-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-family: var(--font-primary);
  opacity: 0.85;
  font-weight: 400;
}
.wsc-cat-group-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  font-family: var(--font-primary);
  font-style: italic;
}
.wsc-cat-subcat {
  border-top: 1px solid var(--color-border);
}
.wsc-cat-subcat:first-child { border-top: none; }
.wsc-cat-subcat > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  transition: background-color 0.15s, color 0.15s;
}
.wsc-cat-subcat > summary::-webkit-details-marker { display: none; }
.wsc-cat-subcat > summary:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.wsc-cat-subcat[open] > summary { background: var(--color-bg-alt); }
.wsc-cat-subcat > summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}
.wsc-cat-subcat[open] > summary::after { transform: rotate(90deg); }
.wsc-cat-subcat-name {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--color-primary);
}
.wsc-cat-subcat-count {
  font-size: 0.74rem;
  color: var(--color-text-muted);
}
.wsc-cat-subcat-services {
  padding: 0.4rem 1rem 0.6rem 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.2rem 1rem;
}
.wsc-cat-subcat-service {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  padding: 0.2rem 0;
  font-size: 0.82rem;
  align-items: baseline;
  border-bottom: 1px dotted var(--color-border);
}
.wsc-cat-subcat-service:last-child { border-bottom: none; }
.wsc-cat-subcat-service-name {
  font-family: var(--font-heading);
  color: var(--color-primary);
  cursor: pointer;
}
.wsc-cat-subcat-service-name:hover { text-decoration: underline; }
.wsc-cat-subcat-service-meta {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* 副タブ未実装表示 */
.wsc-soon {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}
.wsc-soon strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.7rem;
}

/* ノート */
.wsc-note {
  font-size: 0.8rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin: 1.2rem 0;
  padding: 0.7rem 1rem;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-primary);
}
.wsc-note strong { color: var(--color-text-light); }

/* ガイド */
.wsc-guide {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 0.86rem;
  line-height: 1.8;
}
.wsc-guide h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-primary-dark);
  margin: 1.2rem 0 0.5rem 0;
}
.wsc-guide ul { padding-left: 1.4rem; }
.wsc-guide li { margin-bottom: 0.3rem; }
