/* =====================================================================
   style.css — 文字・単語の出現頻度カウント ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   ===================================================================== */

/* モード・オプションのラベル群 */
.sg-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: var(--sg-space-1, 4px);
}
.sg-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.wf-opts .sg-mode {
  display: flex;
  margin-top: 6px;
}

/* セレクトは幅を抑える */
.wf-select {
  max-width: 22em;
}

/* 集計サマリー */
.wf-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: var(--sg-space-2, 8px);
}
.wf-stat {
  display: flex;
  flex-direction: column;
  align-items: baseline;
}
.wf-stat__num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.wf-stat__cap {
  font-size: 0.78rem;
  color: var(--sg-muted, #777);
}

/* コピーボタンの行 */
.wf-copyrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--sg-space-3, 12px);
}

/* ランキング */
.wf-ranking {
  display: flex;
  flex-direction: column;
}
.wf-row {
  display: grid;
  grid-template-columns: 2.2em minmax(4em, 10em) 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--sg-border, #e5e7eb);
}
.wf-row__rank {
  color: var(--sg-muted, #777);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.85rem;
}
.wf-row__key {
  font-weight: 600;
  word-break: break-all;
}
.wf-row__barwrap {
  height: 10px;
  background: var(--sg-border, #e5e7eb);
  border-radius: 999px;
  overflow: hidden;
}
.wf-row__bar {
  display: block;
  height: 100%;
  background: var(--sg-accent, #3b5bdb);
  border-radius: 999px;
}
.wf-row__count {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--sg-muted, #555);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .wf-row {
    grid-template-columns: 1.8em 1fr auto;
  }
  .wf-row__barwrap {
    display: none;
  }
}
