/* =========================================================
   cocojam TOP PAGE (home) — design: design/top.png
   style.css の後に読み込む。トップページ専用。
   ========================================================= */

:root {
  --hm-blue:    #1666c8;
  --hm-blue-dk: #0d4a99;
  --hm-navy:    #12305c;
  --hm-line:    #e3e8ef;
  --hm-soft:    #f4f7fb;
  --hm-card:    #ffffff;
  --hm-txt:     #1b2430;
  --hm-txt2:    #5b6878;
  --hm-title:   #0f2f5b;
  --hm-red:     #e0362f;
  --hm-amber:   #eda21a;
  --hm-green:   #1e9e5a;
  --hm-shadow:  0 2px 10px rgba(20,60,120,.07);
}
[data-theme="dark"] {
  --hm-blue:    #5aa2f0;
  --hm-blue-dk: #7ab6f7;
  --hm-navy:    #0b1929;
  --hm-line:    rgba(255,255,255,.10);
  --hm-soft:    #22242a;
  --hm-card:    #1e1e22;
  --hm-txt:     #eeeee8;
  --hm-txt2:    #a0a09a;
  --hm-title:   #eeeee8;
  --hm-shadow:  0 2px 10px rgba(0,0,0,.35);
}

body.home { background: var(--hm-soft); }
body.home .mobile-menu { top: 58px; }
.hm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hm-arw { font-family: system-ui, sans-serif; }

/* ---------- Header ---------- */
.hm-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--hm-card);
  border-bottom: 1px solid var(--hm-line);
}
.hm-header-in {
  max-width: 1240px; margin: 0 auto; padding: 0 20px;
  height: 58px; display: flex; align-items: center; gap: 14px;
}
.hm-logo { display: flex; align-items: center; gap: 9px; flex: none; }
.hm-logo img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.hm-logo b {
  font-size: 21px; font-weight: 900; letter-spacing: -.02em;
  color: var(--hm-navy);
}
[data-theme="dark"] .hm-logo b { color: var(--hm-txt); }
.hm-tag {
  font-size: 12px; color: var(--hm-txt2); font-weight: 600;
  padding-left: 12px; border-left: 1px solid var(--hm-line);
  white-space: nowrap;
}
.hm-nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.hm-nav a {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--hm-txt2);
  padding: 18px 10px; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: .2s;
}
.hm-nav a svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.hm-nav a:hover { color: var(--hm-blue); }
.hm-nav a.is-current { color: var(--hm-blue); border-bottom-color: var(--hm-blue); }
.hm-header-r { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.hm-header-r .hm-about { font-size: 12.5px; font-weight: 600; color: var(--hm-blue); white-space: nowrap; }
.hm-header-r .hm-about:hover { text-decoration: underline; }
.hm-iconbtn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hm-line); background: var(--hm-soft);
  color: var(--hm-txt2); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.hm-ham { display: none; }
@media (max-width: 1180px) { .hm-tag { display: none; } }
@media (max-width: 1000px) {
  .hm-nav, .hm-header-r .hm-about { display: none; }
  .hm-ham { display: flex; }
}

/* ---------- Hero ---------- */
.hm-hero {
  position: relative; overflow: hidden;
  background: #1b3f6e url("img/home/hero.jpg") center 62% / cover no-repeat;
}
.hm-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(9,36,74,.90) 0%, rgba(12,52,104,.82) 34%,
    rgba(14,66,130,.54) 56%, rgba(16,74,144,.30) 100%);
}
.hm-hero-in {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 34px 20px 30px;
  display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr);
  gap: 28px; align-items: center; color: #fff;
}
.hm-hero-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 900;
  line-height: 1.24; letter-spacing: -.02em;
  text-shadow: 0 2px 16px rgba(3,25,60,.5);
}
.hm-hero-sub {
  margin-top: 14px; font-size: .92rem; line-height: 1.85;
  color: rgba(255,255,255,.9);
}
.hm-hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 22px; padding: 15px 26px; border-radius: 999px;
  background: linear-gradient(180deg, #2f86ef, #0f5fd0);
  color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 8px 22px rgba(3,30,70,.4); transition: .2s;
}
.hm-hero-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(3,30,70,.48); color: #fff; }
.hm-hero-cta svg { width: 19px; height: 19px; fill: #fff; }
.hm-hero-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 26px; }
.hm-hs { display: flex; align-items: center; gap: 9px; }
.hm-hs svg { width: 20px; height: 20px; fill: #8fc4ff; flex: none; }
.hm-hs b { display: block; font-size: 1.15rem; font-weight: 900; line-height: 1.2; }
.hm-hs span { font-size: .7rem; color: rgba(255,255,255,.78); }

/* map card */
.hm-mapcard {
  background: var(--hm-card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 34px rgba(4,24,58,.3);
}
.hm-mapcard-h {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--hm-line);
}
.hm-mapcard-h .hm-ico { width: 26px; height: 26px; border-radius: 7px; flex: none; }
.hm-mapcard-h b { font-size: .95rem; font-weight: 800; color: var(--hm-title); }
.hm-mapcard-h .hm-upd { margin-left: auto; font-size: .72rem; color: var(--hm-txt2); white-space: nowrap; }
.hm-reload {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: transparent;
  color: var(--hm-blue); display: flex; align-items: center; justify-content: center; flex: none;
}
.hm-reload svg { width: 15px; height: 15px; fill: currentColor; }
.hm-mapcard-b {
  display: grid; grid-template-columns: minmax(0,1fr) 206px;
  gap: 14px; padding: 14px;
}
.hm-mapcard-b #map {
  height: 286px; width: 100%;
  border: 1px solid var(--hm-line); border-radius: 10px; overflow: hidden;
}
.hm-legend { padding: 2px 4px 2px 0; border-left: 0; background: transparent; }
.hm-legend h3 { font-size: .78rem; font-weight: 800; color: var(--hm-title); margin-bottom: 10px; }
.hm-legend li { display: flex; align-items: center; gap: 9px; font-size: .78rem; color: var(--hm-txt2); padding: 5px 0; }
.hm-legend i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.hm-legend .lg-r { background: var(--hm-red); }
.hm-legend .lg-y { background: var(--hm-amber); }
.hm-legend .lg-g { background: var(--hm-green); }
.hm-legend .lg-n { background: #b6bec9; }
.hm-legend p { margin-top: 12px; font-size: .68rem; line-height: 1.6; color: var(--hm-txt2); opacity: .85; }
@media (max-width: 1040px) {
  .hm-hero-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hm-hero-in { padding: 26px 16px 24px; }
  .hm-mapcard-b { grid-template-columns: 1fr; }
  .hm-legend { padding: 0 2px 2px; }
  .hm-mapcard-b #map { height: 240px; }
  .hm-hero-cta { width: 100%; justify-content: center; }
}

/* ---------- Section / card ---------- */
.hm-main { padding: 22px 0 4px; }
.hm-row { display: grid; gap: 16px; margin-bottom: 16px; align-items: start; }
.hm-row.c2 { grid-template-columns: minmax(0,1fr) minmax(0,1.06fr); align-items: stretch; }
.hm-row.c2 > .hm-card { display: flex; flex-direction: column; }
.hm-row.c2 .hm-status { flex: 1; }
.hm-row.c2 .hm-st { display: flex; flex-direction: column; justify-content: center; }
.hm-row.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.hm-row.c21 { grid-template-columns: minmax(0,1.9fr) minmax(0,1fr); }
/* 同じ行のカードを同じ高さに揃え、ボタンを下端に固定 */
.hm-row.is-even { align-items: stretch; }
.hm-row.is-even > .hm-card { display: flex; flex-direction: column; }
.hm-row.is-even > .hm-card > .hm-btn { margin-top: auto; }
@media (max-width: 1000px) { .hm-row.c2, .hm-row.c3, .hm-row.c21 { grid-template-columns: minmax(0,1fr); } }

.hm-card {
  background: var(--hm-card); border: 1px solid var(--hm-line);
  border-radius: 14px; padding: 16px 18px 18px;
  box-shadow: var(--hm-shadow); min-width: 0;
}
.hm-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.hm-head .hm-ico { width: 26px; height: 26px; flex: none; object-fit: contain; display: block; }
.hm-head h2 { font-size: 1rem; font-weight: 900; color: var(--hm-title); line-height: 1.3; }
.hm-more { margin-left: auto; font-size: .76rem; font-weight: 700; color: var(--hm-blue); white-space: nowrap; }
.hm-more:hover { text-decoration: underline; }
.hm-note { font-size: .76rem; color: var(--hm-txt2); margin-bottom: 12px; }

/* ---------- 現在の道路状況 ---------- */
.hm-status { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.hm-st { border-radius: 12px; padding: 16px 12px; text-align: center; }
.hm-st-h { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .86rem; font-weight: 800; }
.hm-st-h img { width: 19px; height: 19px; object-fit: contain; display: block; }
.hm-st-n { font-size: 2.1rem; font-weight: 900; line-height: 1.25; margin-top: 6px; }
.hm-st-u { font-size: .72rem; color: var(--hm-txt2); font-weight: 700; }
.hm-st.is-red   { background: #fdeded; } .hm-st.is-red   .hm-st-h, .hm-st.is-red   .hm-st-n { color: var(--hm-red); }
.hm-st.is-amber { background: #fef7e8; } .hm-st.is-amber .hm-st-h, .hm-st.is-amber .hm-st-n { color: #d99215; }
.hm-st.is-green { background: #eaf7f0; } .hm-st.is-green .hm-st-h, .hm-st.is-green .hm-st-n { color: var(--hm-green); }
[data-theme="dark"] .hm-st.is-red   { background: #2a1414; }
[data-theme="dark"] .hm-st.is-amber { background: #271e08; }
[data-theme="dark"] .hm-st.is-green { background: #0e2016; }
@media (max-width: 460px) { .hm-status { grid-template-columns: 1fr; } }

/* ---------- TOP10 テーブル ---------- */
.hm-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; table-layout: fixed; }
.hm-tbl th {
  font-size: .72rem; color: var(--hm-txt2); font-weight: 700; text-align: left;
  padding: 0 6px 9px; border-bottom: 1px solid var(--hm-line); white-space: nowrap;
}
.hm-tbl td {
  font-size: .82rem; padding: 11px 6px; border-bottom: 1px solid var(--hm-line);
  color: var(--hm-title); vertical-align: middle;
}
.hm-tbl tr:last-child td { border-bottom: 0; }
.hm-tbl .c-rank, .hm-tbl th.c-rank { width: 44px; text-align: center; font-weight: 700; }
.hm-tbl th.c-rank { text-align: center; }
.hm-tbl .c-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tbl .c-st, .hm-tbl th.c-st { width: 58px; text-align: center; }
.hm-tbl .c-vol, .hm-tbl th.c-vol { width: 96px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-tbl .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }

/* ---------- 地域から探す ---------- */
.hm-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.hm-region {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--hm-line); border-radius: 10px;
  padding: 10px 11px; font-size: .84rem; font-weight: 700; color: var(--hm-txt);
  background: var(--hm-card); transition: .2s;
}
.hm-region:hover { border-color: var(--hm-blue); box-shadow: var(--hm-shadow); transform: translateY(-1px); }
.hm-region img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.hm-region.is-tokai img { filter: hue-rotate(165deg) saturate(1.3); }
.hm-region .hm-arw { margin-left: auto; color: #b6bec9; font-weight: 900; }
.hm-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; padding: 11px; border-radius: 10px;
  border: 1px solid var(--hm-line); background: var(--hm-soft);
  font-size: .82rem; font-weight: 700; color: var(--hm-blue); transition: .2s;
}
.hm-btn:hover { border-color: var(--hm-blue); background: #eef4fd; }

/* ---------- 都市リスト ---------- */
.hm-cities { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 4px; }
.hm-cities a {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 2px; font-size: .84rem; color: var(--hm-txt);
  border-bottom: 1px solid var(--hm-line);
}
.hm-cities a::before { content: "›"; color: #b6bec9; font-weight: 900; }
.hm-cities a:hover { color: var(--hm-blue); }
@media (max-width: 460px) { .hm-cities { grid-template-columns: 1fr; } }

/* ---------- ランキング ---------- */
.hm-rank { margin-top: 8px; }
.hm-rank a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 2px; font-size: .82rem; color: var(--hm-title);
}
.hm-rank a:hover { color: var(--hm-blue); }
.hm-rank .rk {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: var(--hm-title); background: #e3ebf4;
}
.hm-rank .rk1 { background: #fa333a; color: #fff; }
.hm-rank .rk2 { background: #fd7e2d; color: #fff; }
.hm-rank .rk3 { background: #fdc124; color: #fff; }
.hm-rank .nm { flex: 1; min-width: 0; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-rank .vl { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--hm-title); }
[data-theme="dark"] .hm-rank .rk { background: rgba(255,255,255,.10); }

/* ---------- cocojam について ---------- */
.hm-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.hm-feat {
  border: 1px solid var(--hm-line); border-radius: 12px; padding: 16px 14px 14px;
  text-align: center; background: var(--hm-card);
}
.hm-feat .hm-ico { width: 34px; height: 34px; margin: 0 auto 10px; display: block; object-fit: contain; }
.hm-feat h3 { font-size: .88rem; font-weight: 800; margin-bottom: 7px; color: var(--hm-title); }
.hm-feat p { font-size: .76rem; line-height: 1.75; color: var(--hm-txt2); }
.hm-feat .hm-btn { margin-top: 12px; }
@media (max-width: 760px) { .hm-feats { grid-template-columns: 1fr; } }

/* ---------- データ情報 ---------- */
.hm-data { width: 100%; border-collapse: collapse; margin-top: 6px; }
.hm-data th, .hm-data td {
  font-size: .8rem; padding: 11px 4px; border-bottom: 1px solid var(--hm-line);
}
.hm-data th { text-align: left; color: var(--hm-txt2); font-weight: 700; width: 44%; }
.hm-data td { text-align: right; color: var(--hm-txt); font-weight: 600; }
.hm-data tr:last-child th, .hm-data tr:last-child td { border-bottom: 0; }

/* ---------- リンクリスト / 記事 / FAQ ---------- */
.hm-links { margin-top: 4px; }
.hm-links a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px; border-bottom: 1px solid var(--hm-line);
  font-size: .83rem; color: var(--hm-txt);
}
.hm-links a::before { content: "›"; color: #b6bec9; font-weight: 900; }
.hm-links a::after { content: "›"; margin-left: auto; color: #cfd6df; font-weight: 900; }
.hm-links a:hover { color: var(--hm-blue); }
.hm-arts { margin-top: 4px; }
.hm-art {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 2px; border-bottom: 1px solid var(--hm-line);
}
.hm-art:last-child { border-bottom: 0; }
.hm-art img { width: 74px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.hm-art .tx { min-width: 0; }
.hm-art b { display: block; font-size: .83rem; font-weight: 700; color: var(--hm-title); line-height: 1.45; }
.hm-art .tag {
  display: inline-block; margin-top: 5px; font-size: .66rem; font-weight: 700;
  color: var(--hm-blue); background: #e7f0fd; border-radius: 10px; padding: 2px 8px;
}
.hm-art:hover b { color: var(--hm-blue); }
[data-theme="dark"] .hm-art .tag { background: rgba(90,162,240,.16); }

/* ---------- SEO 本文 ---------- */
.hm-prose { background: var(--hm-card); border: 1px solid var(--hm-line); border-radius: 14px; padding: 24px 26px; box-shadow: var(--hm-shadow); }
.hm-prose h2 {
  font-size: 1.05rem; font-weight: 900; color: var(--hm-title);
  margin: 26px 0 12px; padding-left: 11px; border-left: 4px solid var(--hm-blue);
}
.hm-prose h2:first-child { margin-top: 0; }
.hm-prose p { font-size: .87rem; line-height: 1.95; color: var(--hm-txt2); margin-bottom: 12px; }
.hm-prose p strong { color: var(--hm-txt); }
.hm-prose a { color: var(--hm-blue); text-decoration: underline; }
.hm-prose table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: .82rem; }
.hm-prose th, .hm-prose td { border: 1px solid var(--hm-line); padding: 9px 12px; text-align: left; color: var(--hm-txt); }
.hm-prose th { background: var(--hm-soft); font-weight: 700; }
.hm-faq { margin-top: 8px; }
.hm-faq details {
  border: 1px solid var(--hm-line); border-radius: 10px;
  padding: 13px 16px; margin-bottom: 9px; background: var(--hm-card);
}
.hm-faq summary { font-size: .87rem; font-weight: 700; color: var(--hm-title); cursor: pointer; list-style: none; display: flex; gap: 8px; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::before { content: "Q."; color: var(--hm-blue); font-weight: 900; }
.hm-faq summary::after { content: "+"; margin-left: auto; color: var(--hm-txt2); font-weight: 900; }
.hm-faq details[open] summary::after { content: "−"; }
.hm-faq p { margin-top: 10px; font-size: .83rem; line-height: 1.85; color: var(--hm-txt2); }

/* ---------- 広告枠（未配信時は詰める） ---------- */
.hm-ad { max-width: 900px; margin: 0 auto 8px; text-align: center; }
.hm-ad .adsbygoogle { display: block; }
.hm-ad .adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* ---------- Footer ---------- */
.hm-footer { background: var(--hm-navy); color: #c5d4e6; margin-top: 20px; }
[data-theme="dark"] .hm-footer { background: #0b1929; }
.hm-footer-in { max-width: 1200px; margin: 0 auto; padding: 30px 20px 18px; }
.hm-footer-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr) minmax(0,1.2fr); gap: 26px; align-items: start; }
.hm-footer .hm-logo b { color: #fff; }
.hm-footer-desc { font-size: .72rem; margin-top: 8px; color: #9fb4cd; }
.hm-footer h4 { font-size: .74rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.hm-series { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-series a {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); border-radius: 8px;
  padding: 6px 10px; font-size: .74rem; color: #dbe7f5; transition: .2s;
}
.hm-series a img { width: 15px; height: 15px; border-radius: 4px; }
.hm-series a:hover { background: rgba(255,255,255,.16); color: #fff; }
.hm-footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: flex-end; }
.hm-footer-links a { font-size: .74rem; color: #c5d4e6; }
.hm-footer-links a:hover { color: #fff; text-decoration: underline; }
.hm-social { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.hm-social a {
  width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.10);
  display: flex; align-items: center; justify-content: center; transition: .2s;
}
.hm-social a svg { width: 14px; height: 14px; fill: #dbe7f5; }
.hm-social a:hover { background: rgba(255,255,255,.2); }
.hm-footer-bottom {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: .7rem; color: #9fb4cd;
}
.hm-footer-bottom a { color: #9fb4cd; }
.hm-footer-bottom a:hover { color: #fff; }
@media (max-width: 860px) {
  .hm-footer-top { grid-template-columns: 1fr; }
  .hm-footer-links, .hm-social { justify-content: flex-start; }
}
