/* 光回線比較サイト（試作） スタイル — スマホ優先（モバイルファースト） */
:root {
  --c-main: #1f6feb;
  --c-main-dark: #1554b8;
  --c-accent: #ff7a1a;
  --c-line: #06c755;
  --c-line-dark: #05a647;
  --c-text: #1d2433;
  --c-sub: #5b6475;
  --c-border: #dfe4ec;
  --c-bg: #ffffff;
  --c-bg-alt: #f4f7fb;
  --c-warn-bg: #fff4d6;
  --c-warn-text: #7a5300;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(20, 40, 80, .08);
  --font: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  font-size: 15px;
}
h1, h2, h3 { line-height: 1.4; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
a { color: var(--c-main); }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* サンプル告知 */
.sample-banner {
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid #f0d58a;
}
.sample-note { font-size: 13px; color: var(--c-warn-text); background: var(--c-warn-bg); display: inline-block; padding: 2px 10px; border-radius: 6px; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--c-border); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { font-weight: 800; font-size: 17px; color: var(--c-text); text-decoration: none; }
.logo span { color: var(--c-main); }
.gnav { display: flex; gap: 12px; }
.gnav a { font-size: 13px; color: var(--c-sub); text-decoration: none; font-weight: 600; }
.gnav a:hover { color: var(--c-main); }

/* ヒーロー */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0 60px, transparent 61px),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,.12) 0 90px, transparent 91px),
    linear-gradient(135deg, #1f6feb 0%, #3a8dff 55%, #5fb2ff 100%);
  color: #fff;
  padding: 40px 0 44px;
}
.hero-label { display: inline-block; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.2); padding: 3px 10px; border-radius: 999px; }
.hero h1 { font-size: 25px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 60%, rgba(255,122,26,.75) 60%); }
.hero-lead { font-size: 14px; opacity: .95; }

/* ボタン */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; text-align: center;
  border-radius: 999px; padding: 14px 28px; transition: transform .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-accent); color: #fff; box-shadow: 0 4px 0 #c95a0b; }
.btn-primary:hover { background: #ff8b38; }
.btn-line { background: var(--c-line); color: #fff; font-size: 17px; width: 100%; max-width: 360px; box-shadow: 0 4px 0 var(--c-line-dark); }
.btn-line::before { content: "LINE"; font-size: 11px; font-weight: 800; background: #fff; color: var(--c-line); border-radius: 5px; padding: 1px 5px; margin-right: 8px; vertical-align: 2px; }
.btn-line:hover { background: #10d862; }
.btn-small { padding: 6px 14px; font-size: 12px; background: var(--c-main); color: #fff; white-space: nowrap; }
.btn-small:hover { background: var(--c-main-dark); }

/* セクション */
.section { padding: 44px 0; }
section[id] { scroll-margin-top: 56px; }
.section-alt { background: var(--c-bg-alt); }
.section-title { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.section-title span {
  flex: none; font-size: 13px; color: #fff; background: var(--c-main);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
}

/* 導入 */
.point-grid { display: grid; gap: 12px; }
.point { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px 18px 6px; position: relative; }
.point-num { position: absolute; top: -10px; left: 14px; background: var(--c-accent); color: #fff; font-weight: 800; font-size: 13px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.point h3 { font-size: 16px; margin-top: 4px; }
.point p { font-size: 14px; color: var(--c-sub); }
.calc-box { margin-top: 16px; border-left: 4px solid var(--c-accent); background: #fff7f0; padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.calc-box p { margin: 0; font-size: 14px; }
.calc-title { font-weight: 700; font-size: 12px !important; color: var(--c-accent); }
.calc-box strong { color: var(--c-accent); font-size: 16px; }

/* 比較表コントロール */
.controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 14px 0 12px; }
.toggle { display: inline-flex; background: #fff; border: 1px solid var(--c-border); border-radius: 999px; padding: 3px; }
.toggle button {
  font: inherit; font-size: 14px; font-weight: 700; border: 0; background: transparent; color: var(--c-sub);
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
}
.toggle button.is-active { background: var(--c-main); color: #fff; }
.sort { font-size: 13px; color: var(--c-sub); display: inline-flex; align-items: center; gap: 6px; }
.sort select { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--c-border); background: #fff; }

/* 比較表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.table-scroll:focus { outline: 2px solid var(--c-main); }
.compare-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; font-size: 13px; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--c-border); padding: 10px 8px; text-align: center; vertical-align: middle; }
.compare-table td { min-width: 120px; }
.compare-table thead th { background: var(--c-main); color: #fff; font-size: 14px; }
.compare-table th.axis {
  position: sticky; left: 0; z-index: 2; background: #eef3fb; text-align: left; width: 96px; min-width: 96px;
  font-size: 12px; border-right: 1px solid var(--c-border);
}
.compare-table thead th.axis { background: var(--c-main-dark); color: #fff; z-index: 3; }
.compare-table th.axis small { display: block; font-weight: 400; color: var(--c-sub); font-size: 11px; }
.compare-table tbody tr:nth-child(2) td { background: #fffaf3; }
.svc-name { font-weight: 800; }
.num { font-weight: 700; font-size: 15px; white-space: nowrap; }
.num-strong { font-size: 17px; color: var(--c-text); }
.num-strong.is-best { color: var(--c-accent); }
.badge { display: block; width: fit-content; margin: 2px auto 0; font-size: 10px; font-weight: 800; color: #fff; background: var(--c-accent); padding: 0 8px; border-radius: 999px; }
.sub { display: block; font-size: 11px; color: var(--c-sub); line-height: 1.5; margin-top: 2px; }
.muted { color: #8a93a3; }
.tbd { color: #b0402a; font-weight: 700; font-size: 12px; }
.mark { font-size: 20px; font-weight: 800; line-height: 1; }
.mark-yes { color: var(--c-line-dark); }
.mark-no { color: #b0b7c3; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tags li { font-size: 11px; background: var(--c-bg-alt); border-radius: 6px; padding: 2px 6px; }
.scroll-hint { text-align: center; font-size: 12px; color: var(--c-sub); margin: 8px 0 0; }

/* 実質月額の解説 */
.explain { margin-top: 28px; background: #fff; border-radius: var(--radius); padding: 20px 18px; border: 2px solid #cfe0fb; }
.explain h3 { font-size: 17px; color: var(--c-main-dark); }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 16px; }
.f-box { background: var(--c-bg-alt); border: 1px solid var(--c-border); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.f-op { font-weight: 800; color: var(--c-accent); font-size: 18px; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 22px; font-size: 13px; color: var(--c-sub); margin-bottom: 6px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--c-main); font-weight: 800; }

/* タイプ別 */
.type-grid { display: grid; gap: 14px; }
.type-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.type-icon { font-size: 26px; width: 48px; height: 48px; border-radius: 50%; background: var(--c-bg-alt); display: grid; place-items: center; margin-bottom: 8px; }
.type-card h3 { font-size: 16px; }
.type-card p { font-size: 14px; color: var(--c-sub); }
.pick-list { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--c-border); }
.pick-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--c-border); font-size: 13px; }
.pick-list li span { color: var(--c-sub); }
.pick-list li strong { color: var(--c-main-dark); }
.pick-label { font-size: 12px !important; font-weight: 700; margin-bottom: 6px !important; color: var(--c-warn-text) !important; }
.rank-list { margin: 0; padding-left: 1.5em; font-weight: 700; font-size: 14px; }
.rank-list li::marker { color: var(--c-accent); }

/* 申込みの流れ */
.flow { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.flow li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.flow li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--c-main); color: #fff; font-weight: 800; display: grid; place-items: center; z-index: 1;
}
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: #c3d6f5; }
.flow h3 { font-size: 16px; margin-bottom: 4px; padding-top: 6px; }
.flow p { font-size: 14px; color: var(--c-sub); margin: 0; }

/* FAQ */
.faq details { border: 1px solid var(--c-border); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 44px 14px 46px; font-weight: 700; position: relative; font-size: 15px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; position: absolute; left: 14px; top: 13px; color: var(--c-main); font-weight: 800; font-size: 17px; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 22px; color: var(--c-sub); }
.faq details[open] summary::after { content: "−"; }
.faq-a { padding: 0 16px 16px 46px; font-size: 14px; color: var(--c-sub); position: relative; }
.faq-a::before { content: "A"; position: absolute; left: 14px; top: -2px; color: var(--c-accent); font-weight: 800; font-size: 17px; }

/* CTA */
.cta {
  text-align: center; padding: 48px 0 56px; color: #fff;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #0a9e47, #06c755);
}
.cta h2 { font-size: 22px; }
.cta p { font-size: 14px; }
.cta-badge { display: inline-block; background: #fff; color: var(--c-line-dark); font-weight: 800; font-size: 12px; padding: 3px 12px; border-radius: 999px; }
.cta .btn-line { background: #fff; color: var(--c-line-dark); box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.cta .btn-line::before { background: var(--c-line); color: #fff; }
.cta-note { font-size: 12px !important; opacity: .85; margin-top: 12px; }

/* フッター */
.site-footer { background: #1d2433; color: #b9c1cf; font-size: 12px; padding: 24px 0 90px; }
.copy { margin: 0; }

/* 追従CTA（スマホ） */
.float-cta {
  position: fixed; right: 12px; bottom: 12px; z-index: 30;
  background: var(--c-line); color: #fff; font-weight: 800; font-size: 14px; text-decoration: none;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 6px 16px rgba(6,199,85,.4);
}

.noscript { position: fixed; bottom: 0; left: 0; right: 0; background: #b0402a; color: #fff; text-align: center; padding: 10px; z-index: 40; }

/* ---------- タブレット以上 ---------- */
@media (min-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 64px 0 68px; }
  .hero h1 { font-size: 34px; }
  .hero-lead { font-size: 16px; max-width: 640px; }
  .point-grid { grid-template-columns: repeat(3, 1fr); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .section-title { font-size: 25px; }
  .flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .flow li { padding: 52px 16px 16px; background: #fff; border-radius: var(--radius); border: 1px solid var(--c-border); }
  .flow li::before { left: 16px; top: 12px; }
  .flow li:not(:last-child)::after { display: none; }
  .flow h3 { padding-top: 0; }
}
@media (min-width: 960px) {
  .compare-table { min-width: 0; }
  .scroll-hint { display: none; }
  .float-cta { display: none; }
  .site-footer { padding-bottom: 24px; }
}
@media (max-width: 380px) {
  .gnav { gap: 8px; }
  .gnav a { font-size: 12px; }
  .hero h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
