/* サイト共通: ヘッダー・フッター・アイコン(観戦カレンダー・サッカー貯金・投票の結果で共用。部品は src/chrome.mjs)
   値はパレタの刷新案(design/2026-11-site-redesign、案A)。色は各ページの --bg / --surface / --text / --muted / --line / --accent / --accent-text を使う */
:root { --foot-bg: #ebedf2; }
@media (prefers-color-scheme: dark) { :root { --foot-bg: #22262e; } }
html { scroll-padding-top: 80px; } /* 上に固定したヘッダーの下に、ページ内リンクの行き先が隠れないように */

/* アイコン(Lucide: 24枠・線2px。色は文字色) */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic.s { width: 16px; height: 16px; vertical-align: -3px; }
.ic.l { width: 24px; height: 24px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.site-in { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー(高さ60px、上に固定・半透明) */
header.site {
  position: sticky; top: 0; z-index: 5; max-width: none; margin: 0; padding: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  header.site { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}
header.site .site-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; }
header.site .brand { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; color: var(--text); text-decoration: none; font-weight: 800; font-size: 17px; }
header.site .mark { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-text, #fff); }
header.site .mark .ic { width: 18px; height: 18px; vertical-align: 0; }
header.site .brand-t { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
header.site .brand-uo { font-size: 12px; font-weight: 700; color: var(--muted); }
header.site .nav { display: flex; gap: 2px; font-size: 12px; }
header.site .nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 48px; min-height: 48px; padding: 0 4px; border-radius: 10px;
  color: var(--muted); font-weight: 700; line-height: 1.2; text-decoration: none;
}
header.site .nav a:hover { color: var(--text); }
header.site .nav a[aria-current="page"] { color: var(--accent); }

/* フッター(3段目 = 案B で短く): 非公式+出典・注意書き+「このサイトについて」「お問い合わせ」の2リンク(タブと同じリンクは重ねない)。中央ぞろえ */
footer.site { max-width: none; margin: 32px 0 0; padding: 18px 0 20px; border-top: 1px solid var(--line); background: var(--foot-bg); font-size: 15px; text-align: center; }
footer.site p { margin: 0 0 6px; }
footer.site .uo { font-size: 12px; font-weight: 400; color: var(--muted); } /* 「非公式」の断りはここ1か所だけ。小さく控えめに(2026-11-03) */
footer.site .site-menu { display: block; margin: 4px 0 0; font-size: 14px; }
footer.site .site-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }
footer.site .site-menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
footer.site .site-menu a[aria-current="page"] { font-weight: 800; text-decoration-thickness: 2px; }
footer.site .legal { margin: 0 0 4px; font-size: 13px; line-height: 1.6; color: var(--muted); }
footer.site .legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; color: var(--text); }

/* ---------- 2段目(案B): 画面下のタブバー ---------- */
/* スマホ(699px まで): ヘッダーのメニューは隠し、画面下にタブバー(タブ52px+iPhone の下端の余白)。
   PC(700px 以上): タブバーは隠し、ヘッダーの右のメニュー(同じ4項目)を出す。どちらか片方だけが見える */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-around; gap: 2px;
  padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .tabbar { background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.tabbar a {
  flex: 1 1 0; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.2; text-decoration: none;
}
.tabbar .pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.tabbar .ic { width: 24px; height: 24px; vertical-align: 0; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 800; }
.tabbar a[aria-current="page"] .pill { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 699.98px) {
  header.site .nav { display: none; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); } /* タブバーの下に本文が隠れないように */
  footer.site { margin-bottom: 0; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)) !important; } /* サッカー貯金の通知をタブバーの上に */
}
@media (min-width: 700px) {
  .tabbar { display: none; }
  header.site .nav a { min-width: 56px; }
  header.site .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); border-radius: 10px 10px 0 0; }
}
@media print { .tabbar { display: none; } }

/* クラブの目印(エンブレムは使わない。2026-11-02 代表決定): クラブ色の丸いバッジ(略称3文字)と、無地のシャツのアイコン。
   色は team-colors.css の [data-cb="<slug>"](帯の色・帯の文字の色)。色のないクラブは淡いアクセント色 */
.cb {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--cb, var(--accent-soft)); color: var(--cb-on, var(--text)); box-shadow: inset 0 0 0 1px var(--cb-edge, var(--line));
  font-size: 12px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.cb.s { width: 28px; height: 28px; font-size: 10px; }
.shirt { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- 3段目(案B): 上部バーをクラブの帯の色に ---------- */
/* チームページ(header.site.club)と、チームを選んだあとのトップ(<html class="has-team"> の header.site.club-home)。
   地 = 帯の色(--band)、文字・アイコン・フォーカス枠 = 帯の文字の色(--on-band。帯に 4.5:1 以上は team-colors.mjs の checkTeamColors、
   既定の色は scripts/check.mjs が確かめる)。透明度はかけない(文字のコントラストが落ちるので)。下にトリム線 8px(飾り) */
main { --bar-h: 60px; } /* 月の見出しを止める位置(styles.css の .group-h) */
header.site.club ~ main, .has-team header.site.club-home ~ main { --bar-h: 68px; }
header.site.club, .has-team header.site.club-home {
  background: var(--band); color: var(--on-band); border-bottom: 1px solid var(--band-edge);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
header.site.club::after, .has-team header.site.club-home::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; pointer-events: none;
  background: linear-gradient(var(--trim1) 50%, var(--trim2) 50%);
}
header.site.club :focus-visible, .has-team header.site.club-home :focus-visible { outline-color: var(--on-band); }
header.site.club .nav a, .has-team header.site.club-home .nav a,
header.site.club .nav a:hover, .has-team header.site.club-home .nav a:hover,
header.site.club .nav a[aria-current="page"], .has-team header.site.club-home .nav a[aria-current="page"] { color: var(--on-band); }
.has-team header.site.club-home .brand, .has-team header.site.club-home .brand-uo { color: var(--on-band); }
header.site .bar-back {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-left: -10px; border-radius: 12px; color: inherit;
}
header.site .bar-back .ic { vertical-align: 0; }
header.site .bar-team { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; min-height: 48px; color: inherit; }
header.site .bar-pick {
  margin: 0 0 0 -6px; padding: 0 8px 0 6px; border: 0; border-radius: 12px; background: none; font: inherit; text-align: left; cursor: pointer;
}
header.site .bar-pick > .ic { flex: none; }
header.site .bar-back:hover, header.site .bar-pick:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
header.site .bar-team .shirt { width: 28px; height: 28px; }
header.site .bar-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
header.site .bar-n { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.site .bar-lg { font-size: 12px; font-weight: 700; white-space: nowrap; }
header.site .bar-lg:empty { display: none; }
@media (min-width: 700px) {
  header.site.club .nav a[aria-current="page"], .has-team header.site.club-home .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--on-band); }
}

/* note・X への入口(src/chrome.mjs の followLinks。2026-11-03)。広告ではない。宣伝色を抑える(同日の代表指示): ページの一番下(フッターのすぐ上)に
   地の文1行だけ。枠・アイコン・見出しなし。文字は本文より小さく、色は控えめ(--muted)。リンクの「note」「X」は下線で示す */
.follow { margin: 32px 0 8px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.follow a { color: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 4px 0; }
.follow a:hover { color: var(--text); }
:root:not(.has-team) header.site.club-home ~ main > .follow { display: none; } /* トップはチームを選んだあとだけ */
