/* 上部：見出し・設定ボタン・言語の切り替え */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 見出しは1行に収める。狭い画面では文字を少し小さくする（SPEC 11章） */
.header__title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--title);
  font-weight: var(--title-w);
  font-size: clamp(1.1875rem, 5.4vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: .06em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header__tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
  color: var(--sub);
  cursor: pointer;
}

.lang-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--soft);
}

.lang-switch__btn {
  min-height: 36px;
  padding: 0 11px;
  border: none;
  border-radius: 999px;
  background: none;
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--sub);
  white-space: nowrap;
  cursor: pointer;

  &[aria-pressed="true"] {
    background: var(--ink);
    color: var(--ink-on);
  }
}
