/* ============================================================
   日韓マッチング（matching.hangul-match.com）専用
   ハングルマッチ本体のハヌルデザイン（_haneul.scss / _haneul_article.scss）の
   記事ページと同じ見た目にそろえる。sites/layout で kind=matching のときだけ読み込む。
   ============================================================ */
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) {
  --haneul: #329eff;
  --haneul-50: #eaf4ff;
  --haneul-100: #d6eaff;
  --bada: #1265b8;
  --gyul: #ff8a3d;
  --gyul-dark: #e0702a;
  --ink: #12263a;
  --ink-soft: #4a5b6e;
  color: var(--ink);
}
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-br-pc { display: none; }
@media (min-width: 768px) { :is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-br-pc { display: inline; } }

/* --- 記事の枠（.hm-article） --- */
.hm-mt-article { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-crumb { margin-bottom: 1.2rem; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-crumb a { color: var(--bada); }

/* --- 記事ヘッダー（.hm-article-head） --- */
.hm-mt-head { text-align: center; margin-bottom: 2rem; padding-bottom: 1.8rem; border-bottom: 1px solid var(--haneul-50); }
.hm-mt-head-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 20px; margin: 0 auto 1rem; display: block; }
.hm-mt-title { color: var(--ink); font-weight: 900; font-size: 1.45rem; line-height: 1.6; margin: 0 0 .5rem; }
@media (min-width: 768px) { .hm-mt-title { font-size: 1.7rem; } }
.hm-mt-date { color: var(--ink-soft); font-size: .78rem; margin: 0; }

/* --- 本文タイポグラフィ（.hm-article-body） --- */
.hm-mt-body { color: var(--ink-soft); font-size: .98rem; line-height: 2; }
.hm-mt-body h2 { color: var(--ink); font-weight: 900; font-size: 1.3rem; line-height: 1.6; margin: 2.6rem 0 1rem; padding: .5rem .9rem; border-left: 4px solid var(--haneul); background: var(--haneul-50); border-radius: 0 8px 8px 0; }
.hm-mt-body h3 { color: var(--ink); font-weight: bold; font-size: 1.1rem; margin: 2rem 0 .8rem; padding-bottom: .35rem; border-bottom: 2px solid var(--haneul-100); }
.hm-mt-body h4 { color: var(--bada); font-weight: bold; font-size: 1rem; margin: 1.6rem 0 .6rem; }
.hm-mt-body p { margin: 0 0 1.1rem; }
.hm-mt-body strong, .hm-mt-body b { color: var(--ink); }
.hm-mt-body a { color: var(--bada); font-weight: bold; text-decoration: underline; text-decoration-color: var(--haneul-100); text-underline-offset: 3px; }
.hm-mt-body a:hover { text-decoration-color: var(--bada); }
.hm-mt-body ul, .hm-mt-body ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.hm-mt-body li { margin-bottom: .35rem; }
.hm-mt-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.2rem 0; }
.hm-mt-body small { font-size: .8rem; }

/* --- 早見表（.hm-korean-table） --- */
.hm-mt-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; }
.hm-mt-table { width: 100%; border-collapse: collapse; font-size: .85rem; line-height: 1.6; }
.hm-mt-table th, .hm-mt-table td { border: 1px solid var(--haneul-100); padding: .55rem .6rem; text-align: left; vertical-align: middle; }
.hm-mt-table thead th { background: var(--haneul-50); color: var(--ink); white-space: nowrap; }
.hm-mt-table td a { color: var(--bada); text-decoration: none; }
@media (max-width: 575px) { .hm-mt-table { min-width: 520px; } }

/* --- こんな人はここから・目次 --- */
.hm-mt-jump { background: var(--haneul-50); border-radius: 12px; padding: 1.1rem 1.3rem; margin: 0 0 2rem; }
.hm-mt-jump-title { color: var(--ink); font-weight: 900; font-size: .95rem; margin: 0 0 .4rem !important; }
.hm-mt-jump ul, .hm-mt-jump ol { margin: 0; }
.hm-mt-jump a { text-decoration: none !important; font-size: .9rem; }

/* --- ボタン（.btnGyul / .btnGhost） --- */
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-btn { background: var(--gyul); color: #fff !important; display: inline-block; padding: .95em 1.4em; font-weight: bold; border-radius: 8px; text-decoration: none !important; line-height: 1.4; transition: background .2s ease; text-align: center; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-btn:hover { background: var(--gyul-dark); }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-btn-sub { background: #fff; color: var(--bada) !important; border: 1.5px solid var(--haneul); display: inline-block; padding: .95em 1.6em; font-weight: bold; border-radius: 8px; text-decoration: none !important; line-height: 1.4; transition: background .2s ease; text-align: center; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-btn-sub:hover { background: var(--haneul-50); }
.hm-mt-applinks { text-align: center; margin: 1.2rem 0 2rem; }
.hm-mt-applinks p { margin: .5rem 0 0; }
.hm-mt-applinks small { color: var(--gyul-dark); font-weight: bold; }
.hm-mt-textlink { color: var(--bada) !important; font-weight: bold; text-decoration: none; }
.hm-mt-textlink:hover { text-decoration: underline; }

/* --- アプリカード --- */
.hm-mt-cards { display: flex; flex-direction: column; gap: 1rem; margin: 0 0 1rem; }
.hm-mt-card { position: relative; display: flex; gap: .9rem; background: #fff; border: 1px solid var(--haneul-100); border-radius: 12px; padding: 1.3rem 1.2rem; }
.hm-mt-card-no { flex: 0 0 2.1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--haneul); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.hm-mt-card-main { flex: 1 1 auto; min-width: 0; }
.hm-mt-card-head { display: flex; gap: .9rem; align-items: flex-start; }
.hm-mt-thumb { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 16px; background: var(--haneul-50); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.6rem; color: var(--haneul); }
.hm-mt-thumb img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.hm-mt-card-title h3 { margin: 0; font-size: 1.15rem; font-weight: 900; line-height: 1.5; }
.hm-mt-card-title h3 a { color: var(--ink); text-decoration: none; }
.hm-mt-card-title h3 a:hover { color: var(--bada); }
.hm-mt-catch { margin: .1rem 0 .35rem; font-size: .85rem; color: var(--gyul-dark); font-weight: bold; }
.hm-mt-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .35rem; }
.hm-mt-badge { font-size: .72rem; font-weight: bold; color: var(--bada); background: var(--haneul-50); border-radius: 999px; padding: .15em .8em; }
.hm-mt-stars { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink); }
.hm-mt-stars-row { color: #f5a524; letter-spacing: 1px; }
.hm-mt-spec { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem 1rem; margin: 1rem 0 0; font-size: .85rem; line-height: 1.7; }
.hm-mt-spec div { display: flex; gap: .6rem; border-bottom: 1px dashed var(--haneul-100); padding: .35rem 0; }
.hm-mt-spec dt { flex: 0 0 6.6rem; color: var(--ink-soft); font-weight: bold; }
.hm-mt-spec dd { margin: 0; color: var(--ink); }
.hm-mt-card-summary { color: var(--ink-soft); font-size: .9rem; line-height: 1.9; margin-top: .9rem; }
.hm-mt-card-summary p { margin: 0 0 .7em; }
.hm-mt-card-summary p:last-child { margin-bottom: 0; }
.hm-mt-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
@media (max-width: 575px) {
  .hm-mt-card { padding: 1.1rem .9rem; gap: .6rem; }
  .hm-mt-card-no { flex-basis: 1.8rem; width: 1.8rem; height: 1.8rem; font-size: .85rem; }
  .hm-mt-spec { grid-template-columns: 1fr; }
  .hm-mt-card-actions a { flex: 1 1 100%; }
}

/* --- アプリ詳細のスペック枠 --- */
.hm-mt-specbox { background: var(--haneul-50); border-radius: 12px; padding: 1.2rem 1.2rem .4rem; margin: 0 0 2rem; }
.hm-mt-specbox-head { text-align: center; }
.hm-mt-specbox-name { color: var(--ink); font-weight: 900; font-size: 1.15rem; margin: 0; }
.hm-mt-specbox .hm-mt-spec div { border-bottom-color: #c9e0f7; }
.hm-mt-stores { display: flex; gap: 1rem; justify-content: center; font-size: .85rem; margin: -1rem 0 1rem; }
.hm-mt-stores a { color: var(--bada); font-weight: bold; }

/* --- 良いところ・気になるところ --- */
.hm-mt-procon { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.4rem 0 2rem; }
@media (max-width: 575px) { .hm-mt-procon { grid-template-columns: 1fr; } }
.hm-mt-procon > div { border: 1px solid var(--haneul-100); border-radius: 12px; padding: .9rem 1.1rem; }
.hm-mt-procon-title { color: var(--ink); font-weight: 900; margin: 0 0 .3rem !important; }
.hm-mt-procon ul { margin: 0; font-size: .9rem; line-height: 1.8; }
.hm-mt-procon-good .hm-mt-procon-title::before { content: '○ '; color: var(--haneul); }
.hm-mt-procon-bad .hm-mt-procon-title::before { content: '△ '; color: var(--gyul-dark); }

/* --- 運営者が使ってみた（おにちゃんメモと同じ形） --- */
.hm-mt-memo { background: #fff8f2; border-left: 4px solid var(--gyul); padding: 1.1rem 1.2rem; margin: 0 0 1.4rem; }
.hm-mt-memo p:last-child { margin-bottom: 0; }

/* --- 韓国語学習への導線（.hm-derived-cta） --- */
.hm-mt-cta { background: var(--haneul-50); border-radius: 12px; padding: 1.8rem 1.4rem; text-align: center; margin: 2.5rem 0; }
.hm-mt-cta p { color: var(--ink-soft); margin: 0 0 1rem; }
.hm-mt-cta .hm-mt-cta-title { color: var(--ink); font-weight: 900; font-size: 1.1rem; }
.hm-mt-cta .hm-mt-cta-sub { margin: .8rem 0 0; }

/* --- 著者カード（運営者カードの形） --- */
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-author { border: 1px solid var(--haneul-100); border-left: 4px solid var(--haneul); border-radius: 12px; background: #fff; margin-top: 2.5rem; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-author-bio { color: var(--ink-soft); }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-author-links a { color: var(--bada); }

/* --- 関連記事カード --- */
.hm-mt-article .hm-cards { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 575px) { .hm-mt-article .hm-cards { grid-template-columns: 1fr; } }
/* --- こんな人はここから（チップ） --- */
.hm-mt-jump .hm-mt-jump-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.hm-mt-jump .hm-mt-jump-chips li { margin: 0; }
.hm-mt-jump .hm-mt-jump-chips a { display: inline-block; background: #fff; border: 1px solid var(--haneul-100); border-radius: 999px; padding: .3em 1em; font-size: .85rem; line-height: 1.6; color: var(--bada); }
.hm-mt-jump .hm-mt-jump-chips a:hover { border-color: var(--haneul); }

/* --- 目的別のおすすめ上位 --- */
.hm-mt-body .hm-mt-picks { list-style: none; padding: 0; margin: 0 0 1.6rem; border: 1px solid var(--haneul-100); border-radius: 12px; overflow: hidden; }
.hm-mt-pick { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; margin: 0 !important; border-top: 1px solid var(--haneul-50); background: #fff; }
.hm-mt-pick:first-child { border-top: none; }
.hm-mt-pick-no { flex: 0 0 1.7rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--haneul-50); color: var(--bada); font-weight: 900; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.hm-mt-pick:first-child .hm-mt-pick-no { background: var(--haneul); color: #fff; }
.hm-mt-pick-body { flex: 1 1 auto; min-width: 0; line-height: 1.6; }
.hm-mt-body .hm-mt-pick-body p { margin: 0; }
.hm-mt-pick-name { font-weight: 900; }
.hm-mt-body .hm-mt-pick-name a { color: var(--ink); text-decoration: none; }
.hm-mt-pick-why { font-size: .85rem; }
.hm-mt-pick-fact { font-size: .82rem; color: var(--ink); }
.hm-mt-pick-fact span { display: inline-block; background: var(--haneul-50); color: var(--bada); font-weight: bold; font-size: .72rem; border-radius: 4px; padding: 0 .5em; margin-right: .5em; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-pick-btn { flex: 0 0 auto; padding: .55em 1em; font-size: .82rem; }
@media (max-width: 575px) {
  .hm-mt-pick { flex-wrap: wrap; }
  :is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-pick-btn { flex: 1 1 100%; margin-left: 2.5rem; }
}
/* 2列の料金表などはスマホでも横スクロールさせない */
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-table-compact { min-width: 0; }
:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) .hm-mt-table-compact th { width: 6em; background: var(--haneul-50); color: var(--ink); white-space: nowrap; }

/* 本体（MDB）と同じフォント。hangul-match.com/korean と同じく英数字は Roboto、無ければ端末の標準フォント（日本語はヒラギノ等） */
body.hm-site:is(.hm-site-matching, .hm-site-schools, .hm-site-vpn) {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
}
