/* =====================================================================
   style.css — 音の大きさ（デシベル）の目安 ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   ===================================================================== */

/* 結果値・内訳はタブ幅数字で桁を揃える */
.sg-result-row__value {
  font-variant-numeric: tabular-nums;
}

/* 補助ラベルを入力直下に詰める */
.sg-field .sg-help {
  margin-top: var(--sg-space-1);
}

/* dB 数値入力と単位 */
.db-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.db-input-row .sg-input {
  flex: 1 1 auto;
  max-width: 160px;
  font-variant-numeric: tabular-nums;
}
.db-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sg-muted, #777);
}

/* スライダー */
.db-slider {
  width: 100%;
  margin-top: var(--sg-space-3);
  accent-color: var(--sg-primary, #3b5bdb);
}

/* 近い大きさの目安リスト */
.db-scale {
  margin-top: var(--sg-space-4);
}
.db-scale__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 var(--sg-space-3);
}
.db-scale__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.db-scale__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-top: 1px solid var(--sg-border, #e5e7eb);
  font-size: 0.9rem;
}
.db-scale__item:first-child {
  border-top: none;
}
.db-scale__item.is-current {
  background: rgba(59, 91, 219, 0.08);
  border-radius: var(--sg-radius, 8px);
  font-weight: 600;
}
.db-scale__db {
  flex: 0 0 54px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--sg-primary, #3b5bdb);
}
.db-scale__ex {
  flex: 1 1 auto;
}
.db-scale__impact {
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* うるささ判定の色分け */
.db-impact--quiet {
  background: rgba(34, 139, 84, 0.14);
  color: #1c7a48;
}
.db-impact--mild {
  background: rgba(120, 160, 40, 0.16);
  color: #6b7d1e;
}
.db-impact--loud {
  background: rgba(214, 158, 20, 0.18);
  color: #a8730a;
}
.db-impact--veryloud {
  background: rgba(214, 110, 20, 0.18);
  color: #b25a0d;
}
.db-impact--risk {
  background: rgba(214, 60, 40, 0.16);
  color: #c0331f;
}
.db-impact--danger {
  background: rgba(180, 20, 20, 0.2);
  color: #a11414;
}

/* 2つの音源のdB合成計算 */
.db-combine {
  margin-top: var(--sg-space-4);
}
.db-combine__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 var(--sg-space-2);
}
.db-combine__inputs {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: var(--sg-space-3);
}
.db-combine__inputs .sg-field {
  flex: 1 1 0;
  margin: 0;
}
.db-combine__inputs .db-input-row .sg-input {
  max-width: none;
}
.db-combine__plus {
  flex: 0 0 auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sg-muted, #777);
  padding-bottom: 10px;
}
.db-combine__result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--sg-space-3);
  padding: 12px 14px;
  border-radius: var(--sg-radius, 8px);
  background: rgba(59, 91, 219, 0.08);
}
.db-combine__result-label {
  font-size: 0.8rem;
  color: var(--sg-muted, #777);
}
.db-combine__result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sg-primary, #3b5bdb);
  font-variant-numeric: tabular-nums;
}
.db-combine__result-sub {
  font-size: 0.85rem;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .db-scale__item {
    flex-wrap: wrap;
  }
  .db-scale__impact {
    margin-left: 54px;
  }
}
