/* =========================================================
   固定費見直しメディア トップページ
   配色・角丸・影は :root の変数に集約。姉妹サイト
   （光回線／格安SIM／クレカ比較）と揃える場合はここを調整する。
   ========================================================= */
:root {
  --c-primary: #1f4e8c;       /* メイン（濃紺） */
  --c-primary-dark: #163a69;
  --c-accent: #f2a93b;        /* アクセント（夜あけのオレンジ） */
  --c-accent-soft: #fff3df;
  --c-text: #1f2933;
  --c-text-sub: #5b6672;
  --c-border: #e2e7ee;
  --c-bg: #ffffff;
  --c-bg-alt: #f5f7fb;
  --c-line: #06c755;
  --c-hikari: #2f7fd6;
  --c-sim: #1aa38c;
  --c-card: #8a5cd1;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px rgba(20, 40, 80, 0.08);
  --shadow-hover: 0 8px 24px rgba(20, 40, 80, 0.14);
  --container: 1080px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", 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);
  font-size: 16px;
  line-height: 1.75;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-primary); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.sp-only { display: inline; }
@media (min-width: 768px) { .sp-only { display: none; } }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff; font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--c-accent);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-weight: 700; font-size: 15px; }
.logo-sub { font-size: 11px; color: var(--c-text-sub); }

.nav-toggle {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 2px; background: var(--c-text); border-radius: 2px;
  transition: transform .2s, background .2s;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.global-nav {
  position: absolute; top: 60px; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow);
  display: none;
}
.global-nav.is-open { display: block; }
.global-nav ul { padding: 8px 20px 16px; }
.global-nav a {
  display: block; padding: 12px 4px; text-decoration: none; color: var(--c-text);
  border-bottom: 1px solid var(--c-border); font-weight: 600; font-size: 15px;
}
.global-nav .nav-cta {
  margin-top: 12px; border: 0; border-radius: 999px; text-align: center;
  background: var(--c-line); color: #fff;
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .global-nav { position: static; display: block; background: none; border: 0; box-shadow: none; }
  .global-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .global-nav a { border: 0; padding: 8px 12px; font-size: 14px; }
  .global-nav a:hover { color: var(--c-primary); }
  .global-nav .nav-cta { margin: 0 0 0 8px; padding: 8px 18px; }
  .global-nav .nav-cta:hover { color: #fff; opacity: .9; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 4px 0 var(--c-primary-dark); }
.btn-ghost { background: #fff; color: var(--c-primary); border: 2px solid var(--c-primary); }
.btn-line { background: var(--c-line); color: #fff; box-shadow: 0 4px 0 #04a045; width: 100%; max-width: 380px; }
.line-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  background: #fff; color: var(--c-line); padding: 2px 7px; border-radius: 6px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 10%, rgba(242, 169, 59, .35), transparent 45%),
    linear-gradient(160deg, #0f2747 0%, var(--c-primary) 60%, #2c6bb5 100%);
  color: #fff;
  padding: 48px 0 56px;
}
.hero::after { /* 夜明けの地平線 */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -120px; height: 200px;
  background: radial-gradient(ellipse at center, rgba(255, 214, 150, .35), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero-title { font-size: clamp(28px, 7.4vw, 48px); line-height: 1.35; font-weight: 800; letter-spacing: .01em; }
.marker { background: linear-gradient(transparent 62%, rgba(242, 169, 59, .75) 62%); }
.hero-lead { margin-top: 16px; font-size: 15px; color: rgba(255, 255, 255, .9); max-width: 640px; }

.calc-card {
  margin-top: 28px; background: #fff; color: var(--c-text);
  border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  max-width: 560px;
}
.calc-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.calc-title::before { content: ""; display: inline-block; width: 4px; height: 1em; background: var(--c-accent); margin-right: 8px; vertical-align: -2px; border-radius: 2px; }
.calc-row label { display: block; font-size: 13px; color: var(--c-text-sub); }
.calc-input-wrap { display: flex; align-items: center; gap: 12px; }
.calc-input-wrap input[type="range"] { flex: 1; accent-color: var(--c-primary); height: 32px; }
.calc-input-wrap output { min-width: 84px; text-align: right; font-weight: 800; font-size: 18px; color: var(--c-primary); }
.calc-result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.calc-result div { background: var(--c-accent-soft); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; }
.calc-result dt { font-size: 12px; color: var(--c-text-sub); }
.calc-result dd { font-size: clamp(15px, 4.4vw, 20px); font-weight: 800; color: #b5651d; }
.calc-note { margin-top: 12px; font-size: 12px; color: var(--c-text-sub); line-height: 1.6; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions .btn { flex: 1 1 200px; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }
.hero .btn-primary { background: var(--c-accent); color: #3a2400; box-shadow: 0 4px 0 #c9861f; }

@media (min-width: 768px) {
  .hero { padding: 72px 0 80px; }
  .hero-lead { font-size: 16px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; color: var(--c-accent); }
.section-title { font-size: clamp(22px, 5.6vw, 30px); line-height: 1.4; margin-top: 4px; }
.section-lead { margin-top: 10px; color: var(--c-text-sub); font-size: 15px; }
@media (min-width: 768px) { .section { padding: 80px 0; } }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.cat-card {
  --cat: var(--c-primary);
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--c-border); border-top: 5px solid var(--cat);
  box-shadow: var(--shadow); text-decoration: none; color: var(--c-text);
  transition: transform .15s, box-shadow .15s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cat-hikari { --cat: var(--c-hikari); }
.cat-sim { --cat: var(--c-sim); }
.cat-card-credit { --cat: var(--c-card); }
.cat-label { font-size: 20px; font-weight: 800; }
.cat-desc { font-size: 14px; color: var(--c-text-sub); }
.cat-points { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-points li {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  color: var(--cat); background: color-mix(in srgb, var(--cat) 10%, #fff);
}
.cat-more { margin-top: auto; padding-top: 6px; font-weight: 700; color: var(--cat); }

/* CSS-only icons */
.cat-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--cat) 12%, #fff);
}
.ico-wifi { position: relative; width: 28px; height: 22px; }
.ico-wifi::before {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--cat);
}
.ico-wifi::after {
  content: ""; position: absolute; left: 50%; top: 2px; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--cat);
}
.ico-phone {
  width: 20px; height: 32px; border: 3px solid var(--cat); border-radius: 5px; position: relative;
}
.ico-phone::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 6px; height: 2px; border-radius: 2px; background: var(--cat);
}
.ico-card {
  width: 32px; height: 22px; border: 3px solid var(--cat); border-radius: 4px; position: relative;
}
.ico-card::before {
  content: ""; position: absolute; left: -3px; right: -3px; top: 4px; height: 4px; background: var(--cat);
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 0; margin-top: 32px; counter-reset: step; }
.step { position: relative; display: flex; gap: 16px; padding-bottom: 24px; }
.step:not(:last-child)::before { /* 縦の接続線（スマホ） */
  content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(to bottom, var(--c-primary) 0 6px, transparent 6px 12px);
}
.step-num {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 0 0 5px #dfe8f5;
}
.step:last-child .step-num { background: var(--c-accent); color: #3a2400; box-shadow: 0 0 0 5px var(--c-accent-soft); }
.step-body { flex: 1; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.step-title { font-size: 18px; margin-bottom: 6px; }
.step-body p { font-size: 14px; color: var(--c-text-sub); }
.step-body .step-tip {
  margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--c-primary);
  background: #eef3fa; border-radius: var(--radius-sm); padding: 6px 10px;
}

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .step { flex-direction: column; align-items: center; padding-bottom: 0; }
  .step:not(:last-child)::before { /* 横の接続線（PC） */
    left: calc(50% + 30px); right: calc(-50% + 10px); top: 21px; bottom: auto; width: auto; height: 2px;
    background: repeating-linear-gradient(to right, var(--c-primary) 0 6px, transparent 6px 12px);
  }
  .step:not(:last-child)::after { /* 矢印 */
    content: ""; position: absolute; top: 16px; right: -14px;
    border: 6px solid transparent; border-left: 8px solid var(--c-primary);
  }
  .step-body { width: 100%; }
  .step-title { text-align: center; }
}

/* ---------- Checklist ---------- */
.checklist-card {
  margin-top: 28px; background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 18px 20px;
}
.checklist li { border-bottom: 1px dashed var(--c-border); }
.checklist label { display: flex; align-items: flex-start; gap: 12px; padding: 14px 2px; cursor: pointer; font-size: 15px; }
.checklist input {
  appearance: none; -webkit-appearance: none; flex: 0 0 24px; height: 24px; margin: 2px 0 0;
  border: 2px solid #b9c3d0; border-radius: 6px; background: #fff; cursor: pointer;
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.checklist input::after {
  content: ""; width: 7px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px); opacity: 0;
}
.checklist input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.checklist input:checked::after { opacity: 1; }
.checklist input:checked + span { color: var(--c-primary); font-weight: 700; }

.checklist-result { margin-top: 18px; background: var(--c-bg-alt); border-radius: var(--radius-sm); padding: 14px 16px; }
.meter { height: 10px; border-radius: 999px; background: #dde3ec; overflow: hidden; }
.meter-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); transition: width .25s; }
.checklist-result p { margin-top: 10px; font-size: 14px; }
.checklist-result strong { font-size: 20px; color: var(--c-primary); }
.note { margin-top: 12px; font-size: 12px; color: var(--c-text-sub); }

/* ---------- FAQ ---------- */
.faq { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 16px 48px 16px 46px; font-weight: 700; font-size: 15px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q"; position: absolute; left: 16px; top: 15px;
  color: var(--c-primary); font-weight: 800; font-size: 17px;
}
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--c-text-sub); border-bottom: 2px solid var(--c-text-sub);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-a { position: relative; padding: 0 18px 16px 46px; font-size: 14px; color: var(--c-text-sub); }
.faq-a::before { content: "A"; position: absolute; left: 16px; top: -1px; color: var(--c-accent); font-weight: 800; font-size: 17px; }

/* ---------- CTA ---------- */
.cta { padding: 56px 0 64px; background: linear-gradient(180deg, var(--c-bg-alt) 0%, #fff 100%); }
.cta-card {
  text-align: center; background: #fff; border-radius: var(--radius);
  border: 2px solid var(--c-line); padding: 32px 20px; box-shadow: var(--shadow);
}
.cta-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; color: var(--c-line);
  background: #e7f9ee; padding: 3px 12px; border-radius: 999px;
}
.cta-title { font-size: clamp(21px, 5.4vw, 28px); line-height: 1.45; margin-top: 10px; }
.cta-lead { margin: 12px auto 22px; font-size: 14px; color: var(--c-text-sub); max-width: 520px; }
.cta-note { margin-top: 14px; font-size: 12px; color: var(--c-text-sub); }

/* ---------- Footer ---------- */
.site-footer { background: #0f2747; color: rgba(255, 255, 255, .85); padding: 40px 0 24px; font-size: 13px; }
.footer-cols { display: grid; gap: 20px; }
@media (min-width: 768px) { .footer-cols { grid-template-columns: 1fr 2fr; } }
.footer-name { font-weight: 700; font-size: 15px; color: #fff; }
.footer-sub { font-size: 12px; opacity: .8; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; }
@media (min-width: 768px) { .footer-links { grid-template-columns: repeat(3, 1fr); } }
.footer-links a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-disclaimer { margin-top: 24px; font-size: 11px; line-height: 1.7; opacity: .75; }
.copyright { margin-top: 16px; text-align: center; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
