/* ハングルマッチ 記事サイト共通（サブドメイン + 本ドメインの /column /dictionary /grammar /legal） */
:root {
  --hm-accent: #329eff;
  --hm-accent-soft: rgba(50, 158, 255, 0.12);
  --hm-ink: #1b2430;
  --hm-muted: #6b7280;
  --hm-bg: #f6f9fc;
  --hm-line: #e5e9ef;
  --hm-radius: 14px;
  --hm-font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, sans-serif;
}

/* ---------- サブドメインのページ全体 ---------- */
body.hm-site {
  margin: 0;
  font-family: var(--hm-font);
  color: var(--hm-ink);
  background: #fff;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
.hm-site a { color: var(--hm-accent); }
.hm-site img { max-width: 100%; height: auto; }
.hm-site-wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.hm-site-header { background: #fff; border-bottom: 1px solid var(--hm-line); position: sticky; top: 0; z-index: 20; }
.hm-site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.hm-site-brand { display: flex; flex-direction: column; text-decoration: none; color: var(--hm-ink); line-height: 1.2; }
.hm-site-brand-name { font-weight: 800; font-size: 18px; }
.hm-site-brand-tag { font-size: 11px; color: var(--hm-muted); margin-top: 2px; }
.hm-site-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hm-site-nav a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--hm-ink); padding: 6px 10px; border-radius: 999px; background: var(--hm-bg); white-space: nowrap; }
.hm-site-nav a:hover { background: var(--hm-accent-soft); color: var(--hm-accent); }

.hm-site-main { min-height: 60vh; padding-bottom: 48px; }

.hm-site-footer { background: var(--hm-bg); border-top: 1px solid var(--hm-line); padding: 36px 0 24px; margin-top: 48px; font-size: 14px; }
.hm-site-footer h3 { font-size: 14px; margin: 0 0 8px; }
.hm-site-footer p { margin: 0; color: var(--hm-muted); font-size: 13px; }
.hm-site-footer ul { list-style: none; margin: 0; padding: 0; }
.hm-site-footer li { margin: 4px 0; }
.hm-site-footer a { color: var(--hm-ink); text-decoration: none; }
.hm-site-footer a:hover { color: var(--hm-accent); }
.hm-site-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-site-copy { margin-top: 24px !important; text-align: center; font-size: 12px; }
@media (max-width: 720px) { .hm-site-footer-cols { grid-template-columns: 1fr; } }

/* ---------- ヒーロー・一覧 ---------- */
.hm-hero { background: linear-gradient(180deg, var(--hm-accent-soft), #fff); padding: 32px 0 20px; }
.hm-hero-title { font-size: 26px; margin: 0 0 8px; font-weight: 800; line-height: 1.4; }
.hm-hero-lead { margin: 0; color: var(--hm-muted); font-size: 14px; max-width: 760px; }
.hm-hero-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hm-hero-cats a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--hm-ink); background: #fff; border: 1px solid var(--hm-line); border-radius: 999px; padding: 6px 12px; }
.hm-hero-cats a span { color: var(--hm-muted); font-weight: 500; margin-left: 4px; font-size: 12px; }
.hm-hero-cats a:hover { border-color: var(--hm-accent); color: var(--hm-accent); }

.hm-section { margin-top: 32px; }
.hm-section-title { font-size: 18px; font-weight: 800; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--hm-accent); line-height: 1.4; }
.hm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .hm-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hm-cards { grid-template-columns: 1fr; } }

.hm-card { display: flex; flex-direction: column; text-decoration: none; color: var(--hm-ink); background: #fff; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.hm-card:hover { box-shadow: 0 8px 24px rgba(27, 36, 48, 0.08); transform: translateY(-2px); }
.hm-card-thumb { aspect-ratio: 16 / 9; background: var(--hm-bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hm-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hm-card-thumb-empty { font-size: 32px; font-weight: 800; color: var(--hm-accent); opacity: .5; }
.hm-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.hm-card-cat { font-size: 11px; font-weight: 700; color: var(--hm-accent); }
.hm-card-title { font-size: 15px; font-weight: 700; line-height: 1.5; }
.hm-card-date { font-size: 12px; color: var(--hm-muted); }
.hm-empty { text-align: center; color: var(--hm-muted); padding: 48px 0; }

/* ---------- 記事 ---------- */
.hm-article-wrap { max-width: 800px; padding-top: 20px; }
.hm-crumb { font-size: 12px; color: var(--hm-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.hm-crumb a { color: var(--hm-muted); text-decoration: none; }
.hm-crumb a:hover { color: var(--hm-accent); }
.hm-article-head { margin-bottom: 20px; }
.hm-article-cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--hm-accent); background: var(--hm-accent-soft); padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.hm-article-h1 { font-size: 26px; line-height: 1.45; margin: 0 0 10px; font-weight: 800; }
.hm-article-meta { font-size: 13px; color: var(--hm-muted); display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hm-article-eyecatch { margin: 0 0 24px; }
.hm-article-eyecatch img { width: 100%; border-radius: var(--hm-radius); }

.hm-toc { background: var(--hm-bg); border-radius: var(--hm-radius); padding: 16px 20px; margin: 0 0 28px; font-size: 14px; }
.hm-toc-title { font-weight: 800; margin: 0 0 8px; }
.hm-toc ol { margin: 0; padding-left: 20px; }
.hm-toc li { margin: 4px 0; }
.hm-toc li.hm-toc-l3 { margin-left: 16px; font-size: 13px; }
.hm-toc a { color: var(--hm-ink); text-decoration: none; }
.hm-toc a:hover { color: var(--hm-accent); }

/* WordPress から来た本文HTMLの見た目を整える */
.hm-article-body { font-size: 16px; line-height: 1.95; word-break: break-word; }
.hm-article-body > *:first-child { margin-top: 0; }
.hm-article-body p { margin: 0 0 1.4em; }
.hm-article-body h2 { font-size: 21px; line-height: 1.5; margin: 2.2em 0 1em; padding: 10px 14px; border-left: 5px solid var(--hm-accent); background: var(--hm-bg); border-radius: 0 8px 8px 0; font-weight: 800; }
.hm-article-body h3 { font-size: 18px; line-height: 1.5; margin: 1.8em 0 .8em; padding-bottom: 6px; border-bottom: 2px solid var(--hm-accent-soft); font-weight: 800; }
.hm-article-body h4 { font-size: 16px; margin: 1.5em 0 .6em; font-weight: 800; }
.hm-article-body img { display: block; max-width: 100%; height: auto; margin: 12px auto; border-radius: 10px; }
.hm-article-body figure { margin: 16px 0; }
.hm-article-body figcaption { font-size: 12px; color: var(--hm-muted); text-align: center; }
.hm-article-body ul, .hm-article-body ol { padding-left: 1.6em; margin: 0 0 1.4em; }
.hm-article-body li { margin: .3em 0; }
.hm-article-body blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 4px solid var(--hm-line); background: var(--hm-bg); color: #333; border-radius: 0 8px 8px 0; }
.hm-article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 14px; display: block; overflow-x: auto; }
.hm-article-body th, .hm-article-body td { border: 1px solid var(--hm-line); padding: 8px 10px; vertical-align: top; }
.hm-article-body th { background: var(--hm-bg); font-weight: 700; white-space: nowrap; }
.hm-article-body a { text-decoration: underline; text-underline-offset: 2px; }
.hm-article-body iframe { max-width: 100%; }
.hm-article-body hr { border: 0; border-top: 1px solid var(--hm-line); margin: 2em 0; }
.hm-article-body strong { font-weight: 800; }
.hm-article-body .wp-block-image { margin: 16px 0; }
.hm-article-body .wp-block-table table { display: table; }
.hm-article-body .wp-block-buttons, .hm-article-body .swell-block-button { margin: 1.2em 0; text-align: center; }
.hm-article-body .wp-block-button__link, .hm-article-body .swell-block-button__link {
  display: inline-block; background: var(--hm-accent); color: #fff !important; text-decoration: none !important;
  font-weight: 800; padding: 12px 28px; border-radius: 999px; box-shadow: 0 6px 16px rgba(50, 158, 255, .25);
}
.hm-article-body .p-blogCard, .hm-article-body .swell-block-postLink { margin: 1.4em 0; }
.hm-article-body .p-blogCard a { display: block; border: 1px solid var(--hm-line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--hm-ink); }
.hm-article-body .cap_box, .hm-article-body .swell-block-capbox { border: 2px solid var(--hm-accent); border-radius: 10px; margin: 1.4em 0; overflow: hidden; }
.hm-article-body .cap_box_ttl, .hm-article-body .cap_box_ttl span { background: var(--hm-accent); color: #fff; font-weight: 800; padding: 6px 12px; display: block; }
.hm-article-body .cap_box_content { padding: 12px 14px; }
.hm-article-body .swell-block-step { counter-reset: hmstep; }
.hm-article-body .c-balloon { display: flex; gap: 12px; align-items: flex-start; margin: 1.2em 0; }
.hm-article-body .c-balloon__icon img { width: 56px; height: 56px; border-radius: 50%; margin: 0; }
.hm-article-body .c-balloon__text { background: var(--hm-bg); border-radius: 12px; padding: 10px 14px; }
.hm-article-body .is-style-big_icon_good, .hm-article-body .is-style-big_icon_bad, .hm-article-body .is-style-big_icon_info, .hm-article-body .is-style-big_icon_point,
.hm-article-body .is-style-note_box, .hm-article-body .is-style-alert_box, .hm-article-body .is-style-stitch, .hm-article-body .is-style-dent_box, .hm-article-body .is-style-border_dashed, .hm-article-body .is-style-border_solid {
  border: 1px solid var(--hm-line); background: var(--hm-bg); border-radius: 10px; padding: 14px 16px; margin: 1.4em 0;
}
.hm-article-body .is-style-alert_box, .hm-article-body .is-style-big_icon_bad { border-color: #f3b4b4; background: #fff5f5; }
.hm-article-body .is-style-big_icon_good { border-color: #b7e0c8; background: #f2fbf5; }

/* 著者カード（旧 K-TOP MEDIA の著者欄の形。写真と名前を横一列、紹介文以下は左の余白なし。全サブドメインサイト共通） */
.hm-author { position: relative; margin: 44px 0 0; padding: 26px 20px 20px; background: #fff; border: 1px solid #e3e8ee; border-radius: 12px; }
.hm-author p { margin: 0; }
.hm-author-label { position: absolute; top: -11px; left: 16px; padding: 2px 12px; background: var(--hm-ink, #1d2733); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; border-radius: 4px; }
.hm-author-head { display: flex; align-items: center; gap: 14px; }
.hm-author-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid #e3e8ee; background: #f4f6f8; }
.hm-author-photo-empty { display: flex; align-items: center; justify-content: center; color: var(--hm-ink, #1d2733); font-size: 26px; font-weight: 800; }
.hm-author-who { min-width: 0; }
.hm-author-name { font-size: 17px; font-weight: 800; line-height: 1.4; color: var(--hm-ink, #1d2733); }
.hm-author-position { font-size: 12px; color: var(--hm-muted, #6b7785); line-height: 1.5; margin-top: 2px !important; }
.hm-author-sns { list-style: none; display: flex; gap: 6px; margin: 8px 0 0; padding: 0; }
.hm-author-sns li { margin: 0; }
.hm-author-sns a { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d9e0e8; color: var(--hm-ink, #1d2733); background: #fff; transition: background .15s, color .15s; }
.hm-author-sns a:hover { background: var(--hm-ink, #1d2733); color: #fff; }
.hm-author-bio { margin-top: 14px !important; font-size: 13.5px; line-height: 1.9; color: #4a5562; }
.hm-author-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hm-author-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid #c9d2dc; background: #fff; color: var(--hm-ink, #1d2733) !important; font-size: 12.5px; font-weight: 700; text-decoration: none !important; line-height: 1.4; transition: background .15s, border-color .15s; }
.hm-author-btn span { font-size: 15px; line-height: 1; color: #8a939c; }
.hm-author-btn:hover { background: #f4f6f8; border-color: #9aa5b1; }
.hm-author-btn-main { background: var(--hm-accent, #329eff); border-color: var(--hm-accent, #329eff); color: #fff !important; }
.hm-author-btn-main span { color: #fff; }
.hm-author-btn-main:hover { background: #1f86e6; border-color: #1f86e6; }
@media (max-width: 575px) { .hm-author-btn { flex: 1 1 100%; justify-content: space-between; } }

.hm-related { margin-top: 40px; }
.hm-related-title { font-size: 18px; font-weight: 800; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--hm-accent); }

/* 本ドメイン（layouts.app）内で使うときの余白調整 */
.hm-site-main-section { font-family: var(--hm-font); }
.hm-site-main-section .hm-hero { margin-top: 0; }
.hm-site-main-section .hm-article-wrap { padding-bottom: 40px; }

/* ---- WordPress（SWELL）から移転した本文のブログカード・引用カード ---- */
.hm-article-body .p-blogCard { margin: 2em 0 1.6em; cursor: pointer; }
.hm-article-body .p-blogCard__inner { position: relative; display: flex; align-items: center; gap: 14px; border: 1px solid var(--hm-line); border-radius: 10px; padding: 18px 14px 12px; background: #fff; }
.hm-article-body .p-blogCard__caption { position: absolute; top: -11px; left: 12px; font-size: 11px; font-weight: 700; line-height: 1; color: #fff; background: var(--hm-accent); padding: 5px 10px; border-radius: 4px; }
.hm-article-body .p-blogCard__thumb { flex: 0 0 120px; width: 120px; }
.hm-article-body .p-blogCard__thumb figure { margin: 0; }
.hm-article-body .p-blogCard__thumb img { width: 120px; height: 80px; object-fit: cover; margin: 0; border-radius: 6px; display: block; }
.hm-article-body .p-blogCard__body { min-width: 0; flex: 1 1 auto; }
.hm-article-body .p-blogCard a, .hm-article-body .p-blogCard__title { display: block; font-weight: 800; font-size: 15px; line-height: 1.5; color: var(--hm-ink); text-decoration: none; border: 0; padding: 0; border-radius: 0; background: none; }
.hm-article-body .p-blogCard__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.6; color: var(--hm-muted); margin-top: 4px; }
.hm-article-body .p-blogCard__meta { display: none; }
.hm-article-body blockquote.wp-embedded-content { margin: 1.4em 0; }
@media (max-width: 560px) {
  .hm-article-body .p-blogCard__thumb { flex-basis: 88px; width: 88px; }
  .hm-article-body .p-blogCard__thumb img { width: 88px; height: 60px; }
  .hm-article-body .p-blogCard__excerpt { display: none; }
}

/* ---- 固定フッターバナー（config/sites.php の footer_banner） ---- */
.hm-footer-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; align-items: center; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--hm-line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); padding: 6px 44px 6px 10px; }
.hm-footer-banner a { display: block; line-height: 0; }
.hm-footer-banner img { max-width: 100%; max-height: 70px; width: auto; height: auto; }
.hm-footer-banner-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--hm-line); background: #fff; color: var(--hm-muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }
.hm-has-footer-banner { padding-bottom: 88px; }
.hm-site-pr { margin: 18px 0 0; font-size: 12px; color: var(--hm-muted); }

/* trip: ロゴの飛行機・アイコン付きメニュー・メインビジュアル */
.hm-site-brand-plane { display: inline-flex; align-items: center; gap: 6px; }
.hm-site-brand-plane .hm-ico { width: 22px; height: 22px; color: var(--hm-accent); flex: none; }
.hm-tripnav { background: #fff; border-bottom: 1px solid var(--hm-line); }
.hm-tripnav-inner { display: flex; justify-content: space-between; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.hm-tripnav-inner::-webkit-scrollbar { display: none; }
.hm-tripnav a { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px 6px; font-size: 11px; font-weight: 600; color: var(--hm-ink); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.hm-tripnav a:hover { color: var(--hm-accent); border-bottom-color: var(--hm-accent); }
.hm-tripnav .hm-ico { width: 20px; height: 20px; color: var(--hm-accent); }
.hm-trip-hero { line-height: 0; background: var(--hm-bg); }
.hm-trip-hero img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.hm-site-trip .hm-hero { background: #fff; padding-top: 24px; }
