:root {
  --fg: #1f2937;
  --fg-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-fg: #ffffff;
  --card: #ffffff;
  --border: #e5e7eb;
  --success-bg: #ecfdf5;
  --success-fg: #047857;
  --error-bg: #fef2f2;
  --error-fg: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f3f4f6;
    --fg-muted: #9ca3af;
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-fg: #ffffff;
    --card: #1e293b;
    --border: #334155;
    --success-bg: #064e3b;
    --success-fg: #6ee7b7;
    --error-bg: #7f1d1d;
    --error-fg: #fecaca;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 880px; margin: 0 auto; padding: 0 24px; }
section { padding: 60px 0; }
section.alt { background: var(--bg-alt); }
h1, h2, h3 { line-height: 1.4; }
h2 { font-size: 22px; margin: 0 0 24px; text-align: center; }
h3 { font-size: 16px; margin: 0 0 8px; }

.nav { padding: 16px 0; border-bottom: 1px solid var(--border); }
.nav .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: inherit; text-decoration: none; }
.nav-brand img { width: 24px; height: 24px; }
.nav-cta { font-size: 13px; padding: 6px 14px; border: 1px solid var(--accent); color: var(--accent); border-radius: 9999px; }

.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 { font-size: 32px; margin: 0 0 16px; letter-spacing: 0.02em; }
.hero .lead { font-size: 16px; color: var(--fg-muted); margin: 0 0 32px; }
.hero .cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-primary {
  display: inline-block; padding: 14px 32px; background: var(--accent); color: var(--accent-fg);
  border-radius: 9999px; font-weight: 600; font-size: 15px; transition: background 0.15s;
}
.cta-primary:hover { background: var(--accent-dark); text-decoration: none; }
.cta-secondary {
  display: inline-block; padding: 14px 32px; border: 1.5px solid var(--accent); color: var(--accent);
  border-radius: 9999px; font-weight: 600; font-size: 15px;
}
.cta-secondary:hover { text-decoration: none; background: var(--accent); color: var(--accent-fg); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: center; }
.feature-icon { display: flex; justify-content: center; margin: 4px 0 12px; color: var(--accent); }
.feature-icon svg { width: 40px; height: 40px; }
.feature-card h3 { text-align: left; }
.feature-card p { margin: 8px 0 0; font-size: 13px; color: var(--fg-muted); text-align: left; }

/* スクリーンショット (フォン枠付き) */
.screenshot {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px auto 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  background: #fff;
}
.screenshot-hero { max-width: 280px; }
.screenshot-feature { max-width: 220px; }
.screenshot-step { max-width: 220px; }
.screenshot-wide {
  /* 06-printable は 1024 viewport で撮った横長スコアシート */
  max-width: 100%;
  border-radius: 8px;
}
@media (prefers-color-scheme: dark) {
  .screenshot { background: #0b1220; box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2); }
}

/* Hero カルーセル: scroll-snap でネイティブ swipe */
.hero-carousel {
  margin: 24px auto 0;
  max-width: 320px;
}
.hero-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* スライド毎の高さ揃え: 最も縦長の mobile portrait shot に合わせる */
  align-items: center;
  /* スクロールバー領域分のレイアウトズレ防止 */
  padding-bottom: 2px;
}
.hero-carousel-track::-webkit-scrollbar { display: none; }
.hero-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  /* 「公式 PDF」(横長) と 「試合入力」(縦長) のサイズ差で高さがバタつくのを抑える */
  min-height: 620px;
  justify-content: center;
}
.hero-carousel-slide .screenshot {
  margin: 0;
}
.hero-carousel-wide {
  /* 06-printable は phone frame だと違和感が出るので 18px → 8px に */
  border-radius: 8px;
}
.hero-carousel-slide figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}
.hero-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
}
.hero-carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-carousel-dot:hover { transform: scale(1.15); }
.hero-carousel-dot.is-active { background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track { scroll-behavior: auto; }
}

.badge-beta {
  display: inline-block;
  background: #fef3c7; color: #92400e;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  margin-left: 6px; vertical-align: 1px;
  letter-spacing: 0.02em;
}
@media (prefers-color-scheme: dark) {
  .badge-beta { background: #78350f; color: #fef3c7; }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: relative; }
.step-num {
  position: absolute; top: -12px; left: 16px; width: 28px; height: 28px;
  background: var(--accent); color: var(--accent-fg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.step-card h3 { margin-top: 8px; }
.step-card p { margin: 4px 0 0; font-size: 13px; color: var(--fg-muted); }

.install-lead { text-align: center; margin: 0 auto 24px; max-width: 640px; font-size: 14px; color: var(--fg-muted); }
.install-compare {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.install-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px;
}
.install-card.recommended {
  border-color: #f59e0b; border-width: 2px;
  background: linear-gradient(180deg, rgba(245,158,11,0.06), transparent 60%), var(--card);
}
.install-card .install-badge {
  display: inline-block; background: #f59e0b; color: #fff; font-size: 11px;
  font-weight: 700; padding: 2px 8px; border-radius: 9999px; margin-bottom: 8px;
}
.install-card h3 { font-size: 15px; margin: 0 0 12px; }

/* 最新のお知らせ (LP top fold 付近) — 他 section と同じ縦 padding (60px) を継承 */
.lp-announcements .container {
  max-width: 760px;
}
.lp-announcements-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border);
}
/* カード風ではなく行リスト感のあるレイアウト。背景は section に溶け込ませる */
.lp-announce-item {
  border-bottom: 1px solid var(--border);
  padding: 14px 4px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'title chevron'
    'date  date'
    'body  body';
  column-gap: 12px;
  row-gap: 4px;
  transition: background-color 0.15s;
  cursor: pointer;
}
.lp-announce-item:hover {
  background: var(--bg-alt);
}
.lp-announce-date {
  grid-area: date;
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  tabular-nums: 1;
}
.lp-announce-title {
  grid-area: title;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  cursor: pointer;
  line-height: 1.4;
}
.lp-announce-title:hover {
  color: var(--primary);
}
.lp-announce-chevron {
  grid-area: chevron;
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--fg-muted);
  transition: transform 0.2s ease, color 0.15s;
  flex-shrink: 0;
  pointer-events: none; /* 親 button のクリックを優先 */
}
.lp-announce-title[aria-expanded='true'] + .lp-announce-chevron,
.lp-announce-item:has(.lp-announce-title[aria-expanded='true']) .lp-announce-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}
.lp-announce-summary,
.lp-announce-body {
  grid-area: body;
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
}
.lp-announce-body {
  white-space: normal;
}

/* インライン SVG アイコン (端末依存しない見出し用) */
.inline-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.3em;
  flex-shrink: 0;
}
.install-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--fg-muted); line-height: 1.8; }
.install-card.recommended ul li::marker { color: #16a34a; }
.install-card:not(.recommended) ul li::marker { color: #b91c1c; }

.install-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.install-step {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
}
.install-step h4 { margin: 0 0 8px; font-size: 14px; }
.install-step p { margin: 0; font-size: 13px; color: var(--fg-muted); line-height: 1.7; }

.form { max-width: 560px; margin: 0 auto; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; color: var(--fg-muted); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); color: var(--fg); font-size: 15px; font-family: inherit;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.form-honeypot { position: absolute; left: -10000px; visibility: hidden; }
.form-submit {
  width: 100%; padding: 14px 24px; background: var(--accent); color: var(--accent-fg);
  border: none; border-radius: 9999px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-feedback { margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.form-feedback.success { background: var(--success-bg); color: var(--success-fg); }
.form-feedback.error { background: var(--error-bg); color: var(--error-fg); }
.form-note { font-size: 12px; color: var(--fg-muted); margin-bottom: 16px; }

.stats-sample { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stats-sample .sample-caption {
  font-size: 12px; color: var(--fg-muted); margin: 0 0 12px;
}
.stats-sample h3 {
  font-size: 13px; margin: 4px 0 8px; color: var(--fg-muted); font-weight: 600;
}
.stats-sample h3:not(:first-child) { margin-top: 24px; }
.stats-sample .chart-wrap { width: 100%; overflow-x: auto; }
.stats-sample svg.chart {
  display: block; width: 100%; max-width: 480px; height: auto; margin: 0 auto;
  color: var(--fg-muted);
}
.stats-sample .legend {
  display: flex; gap: 14px; justify-content: center;
  font-size: 11px; color: var(--fg-muted); margin-top: 4px;
}
.stats-sample .legend .swatch {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 4px;
}
.stats-sample .table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.stats-table th, .stats-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stats-table th { font-weight: 600; color: var(--fg-muted); font-size: 11px; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr.total td { font-weight: 700; background: var(--bg-alt); }
.stats-table .num-pos { color: var(--success-fg); }

/* /news/ お知らせ一覧 + 詳細ページ */
.news-page { padding: 40px 0 60px; }
.news-page .container { max-width: 760px; }
.news-h1 { font-size: 24px; margin: 0 0 24px; }
.news-status { color: var(--fg-muted); font-size: 13px; margin: 16px 0; }

.news-list { list-style: none; padding: 0; margin: 0; }
.news-list-item {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.news-list-item:last-child { border-bottom: 1px solid var(--border); }
.news-list-title {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 4px;
}
.news-list-title:hover { color: var(--accent); text-decoration: none; }
.news-list-date {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}
.news-list-summary {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin: 0;
}

.news-detail-header { margin-bottom: 24px; }
.news-detail-date {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  margin: 0;
}
.news-detail-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--fg);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.news-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}
.news-back:hover { color: var(--accent); text-decoration: none; }

/* 詳細下部の前後ナビ */
.news-detail-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
/* 表示中のボタンは画面端に寄せ、両方あるときは左右に均等配置 */
.news-detail-nav-prev { margin-right: auto; }
.news-detail-nav-next { margin-left: auto; }
.news-detail-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
/* hidden 属性が display: flex に上書きされないように明示 */
.news-detail-nav-link[hidden] { display: none; }
.news-detail-nav-link:hover {
  border-color: var(--accent);
  text-decoration: none;
  background: var(--bg-alt);
}
/* next ボタンは内容を右寄せに (タイトル + 矢印が右端に揃う) */
.news-detail-nav-next { text-align: right; }
.news-detail-nav-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.news-detail-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.news-detail-nav-link:hover .news-detail-nav-arrow {
  color: var(--accent);
}
/* スマホでもタイトル幅で 2 つを左右に寄せる挙動を維持。
   タイトルが長い場合は ellipsis で切れる (max-width で抑制)。 */
.news-detail-nav-link {
  max-width: calc(50% - 6px);
}

/* パンくず (news 共用) */
.lp-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-muted); margin: 0 0 16px;
}
.lp-breadcrumb a { color: var(--fg-muted); }
.lp-breadcrumb a:hover { color: var(--accent); }
.lp-breadcrumb-sep { color: var(--border); }
.lp-breadcrumb-current { color: var(--fg); font-weight: 600; }

/* LP トップ「最新のお知らせ」セクションに「すべて見る」リンク */
.lp-announce-more {
  display: flex; justify-content: center; margin-top: 24px;
}
.lp-announce-more a {
  font-size: 13px; color: var(--fg-muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.lp-announce-more a:hover { color: var(--accent); }

.footer { padding: 32px 0 24px; color: var(--fg-muted); font-size: 13px; }
.footer .container { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; }
.footer-sep { color: var(--border); font-size: 11px; user-select: none; }
.footer-hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
.footer-copyright { margin: 0; font-size: 12px; text-align: left; }
.footer a { color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--primary); text-decoration: underline; }

/*
 * Google reCAPTCHA v3 のバッジを非表示。
 * バッジを隠す代わりに reCAPTCHA への切替時はフォーム内に Privacy Policy /
 * Terms of Service のリンクを表示する (contact-form.js 側)。
 */
.grecaptcha-badge { visibility: hidden !important; }
