/*
 * site-chrome: thunderblog 自作ツール共通のヘッダー・フッター
 * 自動生成コピー。各ツール側で直接編集しない（正本は site-chrome/src/site-chrome.css）。
 * クラスはすべて tbc- 接頭辞にして、各ツールのCSSと衝突させない。
 */

/* ヘッダー・フッターを画面端まで広げるため、ブラウザ既定の body 余白を消す */
body {
  margin: 0;
}

/* ブログ（Affinger子テーマ）のヘッダー・メニュー配色に合わせる */
.tbc-header,
.tbc-footer {
  --tbc-bar-top: #54606b;
  --tbc-bar-bottom: #0b253a;
  --tbc-sub: #1e4f73;
  --tbc-text: #ffffff;
  --tbc-text-muted: rgba(255, 255, 255, .72);
  --tbc-line: rgba(255, 255, 255, .22);
  --tbc-inner-width: 1080px;
  --tbc-gutter: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color: var(--tbc-text);
  line-height: 1.6;
  text-align: left;
}

.tbc-header *,
.tbc-footer * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tbc-header a,
.tbc-footer a {
  color: inherit;
  text-decoration: none;
}

.tbc-header a:hover,
.tbc-footer a:hover {
  text-decoration: underline;
}

.tbc-header a:focus-visible,
.tbc-footer a:focus-visible {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}

.tbc-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--tbc-inner-width);
  margin: 0 auto;
  padding: 0 var(--tbc-gutter);
}

/* ── ヘッダー上段: ブランドとブログメニュー ── */
.tbc-bar {
  background: linear-gradient(var(--tbc-bar-top) 0%, var(--tbc-bar-bottom) 100%);
}

.tbc-bar .tbc-inner {
  min-height: 52px;
}

.tbc-brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.tbc-brand-sub {
  margin-left: 6px;
  font-size: .75rem;
  font-weight: 400;
  color: var(--tbc-text-muted);
}

.tbc-menu {
  display: flex;
  gap: 4px;
  font-size: .85rem;
  font-weight: 700;
}

.tbc-menu a {
  padding: 6px 10px;
  border-radius: 6px;
}

.tbc-menu a:hover {
  background: rgba(255, 255, 255, .12);
  text-decoration: none;
}

/* ── ヘッダー下段: パンくずと言語切替 ── */
.tbc-sub {
  background: var(--tbc-sub);
  font-size: .8rem;
}

.tbc-sub .tbc-inner {
  min-height: 38px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.tbc-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  color: var(--tbc-text-muted);
}

.tbc-breadcrumb li + li::before {
  content: "›";
  margin: 0 8px;
}

.tbc-breadcrumb [aria-current="page"] {
  color: var(--tbc-text);
  font-weight: 700;
}

/* 言語切替は各ツールのテストが class="language-switcher" を前提にしているため、その名前のまま装飾する */
.tbc-header .language-switcher {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  max-width: none;
}

.tbc-header .language-switcher a,
.tbc-header .language-switcher span {
  padding: 2px 12px;
  border: 1px solid var(--tbc-line);
  border-radius: 999px;
  color: var(--tbc-text);
  background: transparent;
}

.tbc-header .language-switcher a:hover {
  background: rgba(255, 255, 255, .14);
  text-decoration: none;
}

.tbc-header .language-switcher [aria-current="page"] {
  background: var(--tbc-text);
  color: var(--tbc-sub);
  font-weight: 700;
}

/* ── フッター: ツール一覧（内部リンク）とサイト情報 ── */
.tbc-footer {
  background: var(--tbc-bar-bottom);
  font-size: .85rem;
  padding: 32px 0 24px;
}

.tbc-footer .tbc-inner {
  display: block;
}

.tbc-footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tbc-footer-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--tbc-line);
}

.tbc-footer-cat {
  font-size: .78rem;
  font-weight: 700;
  color: var(--tbc-text-muted);
  margin-bottom: 6px;
}

.tbc-footer-list {
  list-style: none;
}

.tbc-footer-list li {
  padding: 3px 0;
}

.tbc-footer-list [aria-current="page"] {
  color: var(--tbc-text-muted);
}

.tbc-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0 12px;
}

.tbc-footer-meta {
  font-size: .75rem;
  color: var(--tbc-text-muted);
}

@media (max-width: 560px) {
  .tbc-menu-extra,
  .tbc-brand-sub {
    display: none;
  }
}

/* 印刷時はツール本体だけを出す */
@media print {
  .tbc-header,
  .tbc-footer {
    display: none;
  }
}
