/* 観戦カレンダー: スマホ優先、大きめの文字、ライト/ダーク対応、画像なし */
:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --text: #121419;
  --muted: #4a515c;
  --line: #d9dde4;
  --accent: #2f3fb8;
  --accent-text: #ffffff;
  --accent-soft: #eef0ff;
  --fav: #b02a5b;
  --home: #0b6b40;
  --away: #8a4806;
  --c-PD: #b01f47;
  --c-PL: #4b2a8f;
  --c-CL: #164a8c;
  --warn-bg: #fff1c9;
  --warn-text: #4f3a00;
  --focus: #2f3fb8;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #1a1d23;
    --text: #f0f2f5;
    --muted: #b3bac6;
    --line: #333944;
    --accent: #9aa6ff;
    --accent-text: #0b0e1e;
    --accent-soft: #23284a;
    --fav: #ff8db5;
    --home: #6edca6;
    --away: #f5b971;
    --c-PD: #ff8aa6;
    --c-PL: #c4adff;
    --c-CL: #8cbcff;
    --warn-bg: #3d3110;
    --warn-text: #ffe4a3;
    --focus: #9aa6ff;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main, header.site, footer.site { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.sample-banner {
  background: var(--warn-bg); color: var(--warn-text);
  padding: 10px 16px; font-size: 15px; font-weight: 700; text-align: center;
}
header.site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; padding-top: 10px; padding-bottom: 2px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 15px; }
.nav a { display: inline-block; padding: 10px 0; min-height: 44px; }
.brand { font-weight: 800; font-size: 18px; text-decoration: none; color: var(--text); padding: 8px 0; }

.back { margin: 4px 0 0; font-size: 16px; }
.back a { display: inline-block; padding: 10px 0; }
.jump-sub { margin: 8px 0 0; font-size: 16px; font-weight: 800; }
.jump-sub a { display: inline-block; padding: 10px 0; min-height: 44px; }
.subscribe { scroll-margin-top: 12px; }
.hero h1 { font-size: 30px; line-height: 1.3; margin: 8px 0 0; letter-spacing: .01em; }
.hero .h1-sub { display: block; font-size: 18px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.hero .league { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: var(--muted); }
.hero .sub { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.hero .lead { margin: 8px 0 4px; color: var(--muted); font-size: 16px; }

h2 { font-size: 21px; line-height: 1.4; margin: 0 0 8px; }
.list { margin-top: 18px; }
.list > h2 { margin-bottom: 4px; }
.list-sub { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.group-h { font-size: 17px; color: var(--text); margin: 22px 0 8px; font-weight: 800; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.empty, .filter-empty { color: var(--muted); font-size: 17px; padding: 12px 0; }

/* 試合カード */
ol.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.match {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: grid; gap: 6px;
}
.match.is-fav { border: 2px solid var(--fav); box-shadow: inset 6px 0 0 var(--fav); padding-left: 20px; }
.match.is-past { opacity: .6; }
.when { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; }
.when time { font-weight: 800; font-size: 19px; }
.when .time { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.when .time.tbd { font-size: 18px; color: var(--muted); }
.body { display: grid; gap: 6px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.comp { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 2px solid currentColor; }
.comp small { font-size: 13px; font-weight: 600; }
.c-PD { color: var(--c-PD); } .c-PL { color: var(--c-PL); } .c-CL { color: var(--c-CL); }
.status, .done-label { font-size: 14px; font-weight: 800; color: var(--warn-text); background: var(--warn-bg); padding: 2px 10px; border-radius: 999px; }
.is-fav .meta::after { content: "★ マイチーム"; font-size: 14px; font-weight: 800; color: var(--fav); }
.match .vs, .match .pair { margin: 0; font-size: 21px; line-height: 1.4; }
.vs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.vs-x { color: var(--muted); font-size: 16px; font-weight: 700; }
.team { font-weight: 800; }
.pair { display: grid; gap: 2px; }
.side { display: flex; align-items: center; gap: 8px; }
.ha { flex: none; font-size: 13px; font-weight: 800; padding: 1px 7px; border-radius: 6px; line-height: 1.6; }
.ha.h { color: var(--home); border: 2px solid var(--home); }
.ha.a { color: var(--away); border: 2px solid var(--away); }
.pair .ha { min-width: 4.6em; text-align: center; }
.match .tv { margin: 0; font-size: 16px; color: var(--text); }
.tv-label { font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-right: 8px; }

/* 大会フィルター */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 0; }
.filters-label { font-size: 15px; font-weight: 700; color: var(--muted); }
.fbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.fbtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 6px 16px;
  border-radius: 999px; border: 2px solid currentColor; background: var(--surface);
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.fbtn .check::before { content: "✓"; }
.fbtn[aria-pressed="false"] { color: var(--muted); border-style: dashed; background: transparent; text-decoration: line-through; }
.fbtn[aria-pressed="false"] .check::before { content: "+"; }

/* チームページ: トップに表示するチーム */
.fav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; }
.fav-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px;
  border: 2px solid var(--fav); border-radius: 999px; background: var(--surface); color: var(--fav);
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.fav-btn[aria-pressed="true"] { background: var(--fav); color: var(--surface); }
.fav-note { font-size: 14px; color: var(--muted); }

/* カード・ボタン */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 22px 0; }
.card p { margin: 0 0 10px; font-size: 16px; }
.btns { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 12px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 48px; text-align: center; padding: 10px 14px; border-radius: 12px;
  background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: 17px; text-decoration: none;
}
.url-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.url-row label { flex-basis: 100%; color: var(--muted); }
.url-row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: 16px ui-monospace, monospace; /* 16px 未満だと iPhone で押したときに拡大される */
}
.btn-sub, select {
  min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; font-weight: 700;
}
.btn-sub { cursor: pointer; }
details { margin-top: 12px; font-size: 16px; }
summary { cursor: pointer; color: var(--accent); font-weight: 800; padding: 10px 0; }
.howto h3, .teams h3 { font-size: 16px; margin: 14px 0 4px; }
.howto ol { margin: 0; padding-left: 1.4em; }
.note { color: var(--muted); font-size: 15px; }

.pick { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.pick select { width: 100%; font-size: 17px; color: var(--text); }
.team-links { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.team-links a { display: block; padding: 10px 0; min-height: 44px; }
.team-links a[aria-current="page"] { font-weight: 800; color: var(--text); text-decoration: none; }

.pr-slot { position: relative; margin: 22px 0; padding: 14px 16px 14px 56px; border: 1px dashed var(--line); border-radius: 14px; font-size: 16px; }
.pr-label { position: absolute; left: 14px; top: 15px; font-size: 13px; font-weight: 800; border: 1px solid var(--muted); color: var(--muted); border-radius: 6px; padding: 0 6px; }
.pr-slot ul { margin: 0; padding: 0; list-style: none; }
.pr-empty { margin: 0; color: var(--muted); }

footer.site { margin-top: 32px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 15px; }
footer.site p { margin: 0 0 8px; }
footer.site .small { color: var(--muted); font-size: 14px; }
footer.site .small a { display: inline-block; padding: 12px 0; }
/* 観戦カレンダー|サッカー貯金|このサイトについて(両サイト共通の小さなメニュー。目立たせないが、タップしやすい高さ) */
footer.site .site-menu { display: flex; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 14px; color: var(--muted); }
footer.site .site-menu a, footer.site .site-menu strong { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; }
footer.site .site-menu strong { color: var(--text); font-weight: 800; }
footer.site .site-menu .sep { padding: 0 8px; }

/* トップ: チーム選択と、選んだチームの日程 */
.has-team [data-picker], .has-team [data-hero] { display: none; }
.picker h2 { font-size: 22px; }
.league-h { font-size: 17px; margin: 18px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-grid a {
  display: flex; align-items: center; min-height: 52px; height: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font-weight: 700; font-size: 16px; line-height: 1.35; text-decoration: none;
}
.team-grid a:hover { border-color: var(--accent); }
.team-grid a[aria-current] { border: 2px solid var(--accent); color: var(--accent); }
.pick-cancel { margin: 0 0 8px; }
.my { margin-top: 8px; }
.my-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.my-head h1 { font-size: 28px; line-height: 1.3; margin: 8px 0 0; }
.my-head h1:focus { outline: none; }
.change { font-size: 15px; }
.my-more { margin: 4px 0 0; }
.my-more a { display: inline-block; padding: 10px 0; font-weight: 700; }
.offline-note, .offline-banner { background: var(--warn-bg); color: var(--warn-text); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; margin: 12px 0 0; }

/* このサイトについて */
.prose h2 { margin: 28px 0 8px; }
.prose h3 { font-size: 17px; margin: 18px 0 4px; }
.prose p { margin: 0 0 10px; }
.btn.inline { display: inline-flex; padding: 10px 22px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 600px) {
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .my-head h1 { font-size: 34px; }
  body { font-size: 18px; }
  .hero h1 { font-size: 36px; }
  .btns { grid-template-columns: 1fr 1fr; }
  .match { grid-template-columns: 150px minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .when { flex-direction: column; gap: 0; }
  .team-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
