/* =====================================================================
   style.css — CSS詳細度の計算 ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   ===================================================================== */

/* 入力欄は等幅で見やすく */
#in-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 各セレクタの結果カード */
.sg-spec-card {
  border: 1px solid var(--sg-border, #e5e7eb);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: var(--sg-space-3, 12px);
}
.sg-spec-card:first-child {
  margin-top: 0;
}
.sg-spec-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sg-spec-card__sel {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1rem;
  word-break: break-all;
}
.sg-spec-badge {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sg-accent-weak, #eef2ff);
  color: var(--sg-accent, #3b5bdb);
  white-space: nowrap;
}

/* 内訳チップ */
.sg-spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sg-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--sg-border, #e5e7eb);
  background: var(--sg-surface, #fff);
  font-size: 0.85rem;
}
.sg-spec-chip__text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sg-spec-chip__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}
/* 成分ごとの色分け（a=強／b=中／c=弱） */
.sg-spec-chip.is-a .sg-spec-chip__badge {
  background: #d6336c;
}
.sg-spec-chip.is-b .sg-spec-chip__badge {
  background: #3b5bdb;
}
.sg-spec-chip.is-c .sg-spec-chip__badge {
  background: #2f9e44;
}
.sg-spec-chip.is-fn .sg-spec-chip__badge {
  background: #7048e8;
}
.sg-spec-chip.is-zero .sg-spec-chip__badge {
  background: var(--sg-muted, #adb5bd);
}
.sg-spec-chip.is-zero {
  color: var(--sg-muted, #777);
}

.sg-spec-card__detail {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--sg-muted, #777);
  line-height: 1.7;
}

/* 優先順位ランキング */
.sg-rank {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--sg-border, #e5e7eb);
}
.sg-rank-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
}
.sg-rank-row.is-top {
  font-weight: 600;
}
.sg-rank-row__rank {
  flex: 0 0 1.8em;
  text-align: center;
  font-weight: 700;
  color: var(--sg-accent, #3b5bdb);
}
.sg-rank-row__sel {
  flex: 1 1 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.sg-rank-row__spec {
  flex: 0 0 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--sg-muted, #555);
  white-space: nowrap;
}
