/* =====================================================================
   詐欺返金相談ナビ — Components
   ===================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-sm);
  line-height: 1; padding: 13px 20px; border-radius: var(--radius-button);
  border: 1px solid transparent; cursor: pointer; transition: .18s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-line {
  background: var(--color-accent); color: #fff;
  box-shadow: 0 2px 6px rgba(46,158,91,.25);
}
.btn-line:hover { background: var(--color-accent-600); transform: translateY(-1px); box-shadow: var(--shadow-cta); }
.btn-line .line-glyph { width: 18px; height: 18px; fill: #fff; flex: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-700); }
.btn-ghost { background: #fff; color: var(--color-primary); border-color: var(--color-line); }
.btn-ghost:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Badges / Tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1;
  padding: 5px 10px; border-radius: var(--radius-pill); white-space: nowrap;
}
.badge-lawyer {
  background: var(--color-lawyer-050); color: #8a6420;
  border: 1px solid color-mix(in srgb, var(--color-lawyer) 35%, white);
}
.badge-lawyer svg { width: 13px; height: 13px; }
.badge-cat {
  background: var(--color-primary-050); color: var(--color-primary);
  font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: 6px;
}
.tag {
  display: inline-flex; align-items: center; font-size: var(--fs-xs); font-weight: 600;
  color: var(--color-muted); background: var(--color-bg);
  border: 1px solid var(--color-line); padding: 4px 10px; border-radius: var(--radius-pill);
}
.tag-clickable:hover { border-color: var(--color-secondary); color: var(--color-secondary); cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--color-line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 18px; color: var(--color-primary); letter-spacing: .01em; white-space: nowrap; }
.brand-sub { font-size: 10.5px; color: var(--color-lawyer); font-weight: 700; letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--color-text-soft); font-size: var(--fs-sm); font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-button); text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--color-primary-050); color: var(--color-primary); text-decoration: none; }
.header-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--color-line); border-radius: 8px; width: 42px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--color-primary); }

@media (max-width: 1040px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-height); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-line);
    padding: 10px 16px 18px; box-shadow: var(--shadow-card); margin: 0;
  }
  .nav.open a { padding: 12px 10px; border-radius: 8px; }
  .nav.open .header-cta { display: flex; margin: 8px 0 0; }
}

/* ---------- Section scaffolding ---------- */
.section { padding-block: var(--sp-16); }
.section-tight { padding-block: var(--sp-12); }
.section-head { margin-bottom: var(--sp-8); }
.section-eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; color: var(--color-secondary); text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-size: var(--fs-h2); }
.section-desc { color: var(--color-muted); margin-top: 10px; font-size: var(--fs-sm); }
.bg-tint { background: var(--color-primary-050); }
.bg-card { background: var(--color-card); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--color-primary); color: #fff; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(47,107,176,.42), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(46,158,91,.14), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 0; align-items: start; padding-block: var(--sp-16); max-width: 720px; }
.hero h1 { color: #fff; font-size: var(--fs-display); letter-spacing: .005em; }
.hero h1 .accent { color: #ffd98a; }
.hero-lead { color: rgba(255,255,255,.84); font-size: var(--fs-lead); margin-top: 18px; max-width: 38ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero .badge-lawyer { background: rgba(255,255,255,.1); color: #ffe2ac; border-color: rgba(255,217,138,.4); }
.hero-trust-pill { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 600; color: rgba(255,255,255,.82); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 5px 11px; border-radius: var(--radius-pill); white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-disclaimer { margin-top: 18px; font-size: var(--fs-xs); color: rgba(255,255,255,.6); line-height: 1.6; max-width: 46ch; }
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-cats a { font-size: var(--fs-sm); color: rgba(255,255,255,.9); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); padding: 7px 13px; border-radius: var(--radius-pill); text-decoration: none; transition: .16s var(--ease); }
.hero-cats a:hover { background: rgba(255,255,255,.16); }

/* hero side card (legacy) */
.hero-card { background: #fff; color: var(--color-text); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-pop); }
.hero-card h3 { font-size: var(--fs-h3); margin-bottom: 4px; }
.hero-card .muted { color: var(--color-muted); font-size: var(--fs-sm); margin-bottom: 16px; }

/* hero visual illustration (v2) */
.hero-visual { display: flex; align-items: center; justify-content: flex-end; }
.hero-visual-img { width: 100%; max-width: 580px; height: auto; display: block; border-radius: 16px; filter: drop-shadow(0 8px 32px rgba(10,25,70,.18)); }
/* H1直下の画像: 常に表示 */
.hero-visual-mobile { display: flex; justify-content: center; width: 100%; margin: 20px 0 24px; }
.hero-visual-mobile .hero-visual-img { max-width: 100%; width: 100%; border-radius: 16px; }
/* 右カラム版: 常に非表示（レイアウト変更により不使用） */
.hero-visual-desktop { display: none !important; }

/* hero quick-action pills */
.hero-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.hero-qa-item { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 100px; padding: 6px 14px; font-size: var(--fs-sm); color: rgba(255,255,255,.9); white-space: nowrap; }
.hero-qa-item svg { width: 15px; height: 15px; flex: none; }

/* hero layout variants (Tweaks: hero) */
:root[data-hero="centered"] .hero-inner { grid-template-columns: 1fr; max-width: 820px; margin-inline: auto; text-align: center; }
:root[data-hero="centered"] .hero-lead { margin-inline: auto; max-width: 52ch; }
:root[data-hero="centered"] .hero-badges,
:root[data-hero="centered"] .hero-actions,
:root[data-hero="centered"] .hero-cats { justify-content: center; }
:root[data-hero="centered"] .hero-disclaimer { margin-inline: auto; }
:root[data-hero="centered"] .hero-card { display: none; }
:root[data-hero="centered"] .hero-search-wrap { max-width: 560px; margin-inline: auto; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-card { order: 2; }
}

/* ---------- Search box ---------- */
.searchbox { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius-button); padding: 7px 8px 7px 14px; box-shadow: var(--shadow-soft); }
.searchbox svg { width: 19px; height: 19px; stroke: var(--color-muted); flex: none; }
.searchbox input { flex: 1; border: none; outline: none; font-family: var(--font-sans); font-size: var(--fs-body); color: var(--color-text); background: transparent; min-width: 0; }
.searchbox input::placeholder { color: var(--color-muted); }
.searchbox .btn { padding: 10px 16px; }
.hero-search-wrap { margin-top: 24px; }
.hero-search-label { font-size: var(--fs-sm); font-weight: 600; color: rgba(255,255,255,.78); margin-bottom: 8px; }
.search-suggest { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.search-suggest span { font-size: var(--fs-xs); color: rgba(255,255,255,.65); }
.search-suggest a { font-size: var(--fs-xs); color: rgba(255,255,255,.9); border-bottom: 1px dotted rgba(255,255,255,.4); }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card { display: flex; flex-direction: column; gap: 10px; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 22px; text-decoration: none; color: inherit; transition: .18s var(--ease); }
.cat-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--color-secondary) 45%, white); box-shadow: var(--shadow-card); transform: translateY(-2px); }
.cat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--color-primary-050); }
.cat-icon svg { width: 26px; height: 26px; stroke: var(--color-primary); fill: none; stroke-width: 1.6; }
.cat-card h3 { font-size: 17px; }
.cat-card p { font-size: var(--fs-sm); color: var(--color-muted); line-height: 1.7; }
.cat-card .cat-more { margin-top: auto; font-size: var(--fs-sm); font-weight: 700; color: var(--color-secondary); display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 880px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .cat-card { padding: 18px; } }
@media (max-width: 480px) { .cat-grid { grid-template-columns: 1fr; } }

/* ---------- Article cards ---------- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card { display: flex; flex-direction: column; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); overflow: hidden; text-decoration: none; color: inherit; transition: .18s var(--ease); }
.article-card:hover { text-decoration: none; box-shadow: var(--shadow-card); transform: translateY(-2px); border-color: var(--color-line); }
.article-thumb { aspect-ratio: 16/9; background: var(--color-primary-050); position: relative; display: flex; align-items: center; justify-content: center; }
.article-thumb svg { width: 54px; height: 54px; opacity: .5; }
.article-body { display: flex; flex-direction: column; gap: 9px; padding: 16px 18px 18px; flex: 1; }
.article-meta-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.article-card h3 { font-size: 16.5px; line-height: 1.5; }
.article-card p { font-size: var(--fs-sm); color: var(--color-muted); line-height: 1.7; }
.article-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; font-size: var(--fs-xs); color: var(--color-muted); }
.article-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--color-muted); }
@media (max-width: 880px) { .article-grid { grid-template-columns: 1fr; } }

/* compact list (ranking / popular) */
.article-list { display: grid; gap: 2px; }
.article-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); text-decoration: none; color: inherit; transition: .16s var(--ease); }
.article-row + .article-row { margin-top: 10px; }
.article-row:hover { text-decoration: none; border-color: color-mix(in srgb, var(--color-secondary) 40%, white); }
.article-rank { font-family: var(--font-serif); font-weight: 700; font-size: 20px; color: var(--color-muted); width: 26px; text-align: center; flex: none; }
.article-row h3 { font-size: 15.5px; line-height: 1.5; margin-bottom: 3px; }
.article-row .article-meta-top { gap: 6px; }

/* ---------- Trust / Lawyer profile box ---------- */
.lawyer-box { display: grid; grid-template-columns: auto 1fr; gap: 22px; background: var(--color-card); border: 1px solid var(--color-line); border-left: 4px solid var(--color-lawyer); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow-soft); }
.lawyer-photo { width: 96px; height: 96px; border-radius: 14px; background: var(--color-lawyer-050); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.lawyer-photo svg { width: 56px; height: 56px; }
.lawyer-info h3 { font-size: var(--fs-h3); }
.lawyer-name-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.lawyer-role { font-size: var(--fs-xs); color: var(--color-muted); }
.lawyer-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; font-size: var(--fs-sm); }
.lawyer-meta dt { color: var(--color-muted); font-size: var(--fs-xs); }
.lawyer-meta .pair { display: flex; flex-direction: column; }
.lawyer-meta dd { margin: 0; font-weight: 600; }
.lawyer-policy { background: var(--color-bg); border-radius: var(--radius-sm); padding: 12px 14px; font-size: var(--fs-sm); color: var(--color-text-soft); line-height: 1.7; }
.lawyer-policy strong { color: var(--color-primary); }
.lawyer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: var(--fs-sm); font-weight: 700; }
@media (max-width: 600px) { .lawyer-box { grid-template-columns: 1fr; gap: 16px; } .lawyer-photo { width: 72px; height: 72px; } }

/* ---------- Flow steps (初動3ステップ) ---------- */
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.flow-step { position: relative; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 24px 22px; }
.flow-step .step-num { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--color-primary); color: #fff; font-family: var(--font-serif); font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.flow-step h3 { font-size: 17px; margin-bottom: 6px; }
.flow-step p { font-size: var(--fs-sm); color: var(--color-muted); line-height: 1.75; }
.flow-step .step-icon { position: absolute; top: 22px; right: 22px; width: 26px; height: 26px; stroke: var(--color-line); fill: none; stroke-width: 1.5; }
@media (max-width: 760px) { .flow-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- Boxes: Warning / Disclaimer / Compliance ---------- */
.box { border-radius: var(--radius-card); padding: 18px 20px; font-size: var(--fs-sm); line-height: 1.8; }
.box-warning { background: var(--color-warning-bg); border: 1px solid var(--color-warning-bd); color: #6b531d; }
.box-warning .box-title { color: #6b531d; }
.box-disclaimer { background: var(--color-bg); border: 1px solid var(--color-line); color: var(--color-text-soft); font-size: var(--fs-xs); line-height: 1.75; }
.box-compliance { background: #fff; border: 1px dashed var(--color-line); color: var(--color-muted); font-size: var(--fs-xs); }
.box-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; }
.box-title svg { width: 18px; height: 18px; flex: none; }

/* ---------- Evidence checklist ---------- */
.checklist { background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); overflow: hidden; }
.checklist-head { background: var(--color-primary); color: #fff; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checklist-head h3 { color: #fff; font-size: 17px; }
.checklist-progress { font-size: var(--fs-xs); color: rgba(255,255,255,.78); font-weight: 600; }
.checklist-items { list-style: none; padding: 6px; margin: 0; }
.check-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: var(--radius-sm); cursor: pointer; transition: .14s var(--ease); }
.check-item:hover { background: var(--color-bg); }
.check-item input { position: absolute; opacity: 0; }
.check-box { width: 22px; height: 22px; border: 2px solid var(--color-line); border-radius: 6px; flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: .14s var(--ease); }
.check-box svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; opacity: 0; }
.check-item input:checked ~ .check-box { background: var(--color-accent); border-color: var(--color-accent); }
.check-item input:checked ~ .check-box svg { opacity: 1; }
.check-item input:checked ~ .check-text { color: var(--color-muted); }
.check-text { font-size: var(--fs-sm); line-height: 1.6; }
.check-text b { display: block; font-size: var(--fs-body); color: var(--color-text); font-weight: 700; margin-bottom: 1px; }
.check-item input:checked ~ .check-text b { color: var(--color-muted); }

/* ---------- LINE CTA ---------- */
.line-cta { position: relative; overflow: hidden; border-radius: var(--radius-card); padding: 36px; color: #fff; background: linear-gradient(135deg, #1f7d47, #2e9e5b); }
.line-cta::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); }
.line-cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.line-cta h2 { color: #fff; font-size: var(--fs-h2); }
.line-cta p { color: rgba(255,255,255,.9); font-size: var(--fs-sm); line-height: 1.8; margin-top: 12px; max-width: 52ch; }
.line-cta .btn-white { background: #fff; color: var(--color-accent-600); font-size: 16px; padding: 16px 30px; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.line-cta .btn-white:hover { transform: translateY(-2px); }
.line-cta .cta-sub { display: block; margin-top: 12px; font-size: var(--fs-xs); color: rgba(255,255,255,.78); }
.line-cta-allowed { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.line-cta-allowed li { display: flex; align-items: center; gap: 9px; font-size: var(--fs-sm); color: rgba(255,255,255,.92); list-style: none; }
.line-cta-allowed svg { width: 17px; height: 17px; flex: none; stroke: #bff0d0; }
@media (max-width: 760px) { .line-cta { padding: 26px; } .line-cta-inner { grid-template-columns: 1fr; gap: 18px; } }

/* LINE CTA style variants (Tweaks: cta) */
:root[data-cta="outline"] .line-cta { background: var(--color-card); color: var(--color-text); border: 1px solid var(--color-line); border-top: 4px solid var(--color-accent); }
:root[data-cta="outline"] .line-cta::after { display: none; }
:root[data-cta="outline"] .line-cta h2 { color: var(--color-primary); }
:root[data-cta="outline"] .line-cta p { color: var(--color-text-soft); }
:root[data-cta="outline"] .line-cta-allowed li { color: var(--color-text-soft); }
:root[data-cta="outline"] .line-cta-allowed svg { stroke: var(--color-accent); }
:root[data-cta="outline"] .line-cta .btn-white { background: var(--color-accent); color: #fff; }
:root[data-cta="outline"] .line-cta .cta-sub { color: var(--color-muted); }

:root[data-cta="navy"] .line-cta { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-700)); }
:root[data-cta="navy"] .line-cta .btn-white { background: var(--color-accent); color: #fff; }
:root[data-cta="navy"] .line-cta .btn-white:hover { background: var(--color-accent-600); }

/* ---------- Public consultation links ---------- */
.public-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.public-link { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 18px 12px; text-decoration: none; color: var(--color-text); transition: .16s var(--ease); }
.public-link:hover { text-decoration: none; border-color: var(--color-secondary); }
.public-link .pl-icon { width: 36px; height: 36px; stroke: var(--color-secondary); fill: none; stroke-width: 1.5; }
.public-link b { font-size: var(--fs-sm); }
.public-link span { font-size: var(--fs-xs); color: var(--color-muted); }
@media (max-width: 760px) { .public-links { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.7); padding-block: var(--sp-12) var(--sp-8); margin-top: var(--sp-16); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-bottom: var(--sp-8); border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: var(--fs-xs); color: rgba(255,255,255,.6); margin-top: 12px; line-height: 1.8; max-width: 40ch; }
.footer-col h4 { color: rgba(255,255,255,.92); font-family: var(--font-sans); font-size: var(--fs-sm); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: rgba(255,255,255,.7); font-size: var(--fs-sm); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: var(--fs-xs); color: rgba(255,255,255,.5); }
.footer-disclaimer { max-width: 60ch; line-height: 1.7; }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Sticky mobile LINE CTA ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--color-line); box-shadow: 0 -4px 18px rgba(22,38,63,.08); transform: translateY(120%); transition: transform .3s var(--ease); }
.sticky-cta.show { transform: translateY(0); }
.sticky-cta .btn { width: 100%; padding: 15px; font-size: 15px; }
.sticky-cta .sticky-note { display: block; text-align: center; font-size: 11px; color: var(--color-muted); margin-top: 6px; }
@media (min-width: 1041px) { .sticky-cta { display: none; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--color-muted); padding-block: 14px; }
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs a:hover { color: var(--color-secondary); }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: var(--color-text); font-weight: 600; }

/* ---------- Article body ---------- */
.article-hero { background: var(--color-card); border-bottom: 1px solid var(--color-line); }
.article-head { padding-block: 8px var(--sp-8); }
.article-head h1 { font-size: var(--fs-h1); margin: 14px 0 16px; }
.article-head .lead { font-size: var(--fs-lead); color: var(--color-text-soft); line-height: 1.85; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.article-byline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; padding: 16px 0 4px; border-top: 1px solid var(--color-line-soft); font-size: var(--fs-xs); color: var(--color-muted); }
.article-byline .pair b { color: var(--color-text); font-weight: 600; margin-left: 6px; }

.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; padding-block: var(--sp-12); }
.article-main { min-width: 0; }
.article-aside { position: sticky; top: calc(var(--header-height) + 20px); display: grid; gap: 20px; }
@media (max-width: 940px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static; } .toc-card { display: none; } }

.prose { font-size: 16.5px; line-height: var(--lh-body); color: var(--color-text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--fs-h2); margin-top: 1.9em; padding-bottom: 12px; border-bottom: 2px solid var(--color-primary-050); scroll-margin-top: calc(var(--header-height) + 16px); }
.prose h3 { font-size: var(--fs-h3); margin-top: 1.6em; color: var(--color-primary-700); scroll-margin-top: calc(var(--header-height) + 16px); }
.prose p { color: var(--color-text-soft); }
.prose strong { color: var(--color-primary); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .5em; color: var(--color-text-soft); }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* TOC */
.toc-card { background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 18px 20px; }
.toc-card h4 { font-family: var(--font-sans); font-size: var(--fs-sm); color: var(--color-primary); margin-bottom: 12px; }
.toc-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.toc-list a { display: block; font-size: var(--fs-sm); color: var(--color-muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; border-left: 2px solid transparent; line-height: 1.5; }
.toc-list a:hover { background: var(--color-bg); color: var(--color-text); }
.toc-list a.active { color: var(--color-primary); background: var(--color-primary-050); border-left-color: var(--color-secondary); font-weight: 600; }
.toc-list .sub a { padding-left: 22px; font-size: var(--fs-xs); }

/* aside LINE mini */
.aside-line { background: var(--color-accent-050); border: 1px solid color-mix(in srgb, var(--color-accent) 30%, white); border-radius: var(--radius-card); padding: 20px; text-align: center; }
.aside-line h4 { font-family: var(--font-sans); color: var(--color-accent-600); font-size: var(--fs-sm); margin-bottom: 8px; }
.aside-line p { font-size: var(--fs-xs); color: var(--color-text-soft); line-height: 1.7; margin-bottom: 14px; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 10px; }
.faq-item { background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); overflow: hidden; }
.faq-q { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-family: var(--font-sans); font-weight: 700; font-size: var(--fs-body); color: var(--color-primary); }
.faq-q .q-mark { font-family: var(--font-serif); color: var(--color-secondary); flex: none; }
.faq-q .q-chev { margin-left: auto; width: 20px; height: 20px; stroke: var(--color-muted); transition: transform .25s var(--ease); flex: none; }
.faq-item[open] .q-chev, .faq-item.open .q-chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 20px 20px 52px; font-size: var(--fs-sm); color: var(--color-text-soft); line-height: 1.85; }

/* ---------- Related articles ---------- */
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- Author / Editor / Supervisor small boxes ---------- */
.person-box { display: flex; gap: 14px; background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); padding: 16px 18px; }
.person-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--color-primary-050); flex: none; display: flex; align-items: center; justify-content: center; }
.person-avatar svg { width: 30px; height: 30px; }
.person-role { font-size: var(--fs-xs); color: var(--color-muted); font-weight: 700; }
.person-box b { font-size: var(--fs-body); }
.person-box p { font-size: var(--fs-xs); color: var(--color-muted); line-height: 1.7; margin-top: 4px; }

/* ---------- Misc utility ---------- */
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.muted { color: var(--color-muted); }
.text-center { text-align: center; }
.divider { height: 1px; background: var(--color-line); border: 0; margin-block: var(--sp-8); }
.ref-list { list-style: none; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.ref-list li { padding-left: 20px; position: relative; color: var(--color-text-soft); }
.ref-list li::before { content: "›"; position: absolute; left: 4px; color: var(--color-secondary); }

/* =====================================================================
   MOBILE IMPROVEMENTS v2 — 2026-06-06
   スマホデザイン全面改善
   ===================================================================== */

/* ---------- Overflow prevention ---------- */
html, body { overflow-x: hidden; }

/* ---------- Container: tighter on small phones ---------- */
@media (max-width: 480px) {
  .container { padding-inline: 16px; }
}

/* ---------- Section spacing: reduced on mobile ---------- */
@media (max-width: 760px) {
  .section { padding-block: var(--sp-10); }
  .section-tight { padding-block: var(--sp-8); }
  .section-head { margin-bottom: var(--sp-6); }
  .section-title { font-size: clamp(19px, 5.5vw, 26px); }
}

/* ---------- Hero: mobile overrides ---------- */
@media (max-width: 880px) {
  .hero-inner {
    gap: 0;
    padding-block: var(--sp-10) 0;
  }
  .hero-copy { padding-bottom: var(--sp-8); }
  .hero h1 { font-size: clamp(24px, 7vw, 36px); }
  .hero-lead { font-size: 15px; max-width: 100%; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-card {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    box-sizing: border-box;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero-card p, .hero-card h3 { overflow-wrap: break-word; word-break: break-word; }
  .hero-search-wrap { margin-top: 16px; }
  .search-suggest { display: none; }
  /* hero visual: full-width below copy on mobile */
  .hero-visual { justify-content: center; margin-top: 8px; }
  .hero-visual-img { max-width: 100%; border-radius: 12px; }
  .hero-quick-actions { gap: 6px; }
  .hero-qa-item { font-size: 12px; padding: 5px 10px; }
}

@media (max-width: 480px) {
  .hero-inner { padding-block: var(--sp-8) 0; grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(20px, 6.5vw, 28px); }
  .hero-badges { gap: 7px; margin-bottom: 14px; }
  .hero-trust-pill { font-size: 11px; padding: 4px 9px; }
  /* モバイル: 既にbase CSSで設定済み */
  .hero-visual-mobile { margin: 12px 0 18px; }
}

/* ---------- Searchbox: fully responsive ---------- */
.searchbox { box-sizing: border-box; max-width: 100%; }
.searchbox input { min-width: 0; }

/* ---------- Article cards: horizontal on mobile ---------- */
@media (max-width: 640px) {
  .article-card {
    flex-direction: row;
    max-height: 118px;
  }
  .article-thumb {
    width: 96px;
    min-width: 96px;
    aspect-ratio: auto;
    height: 100%;
    border-radius: var(--radius-card) 0 0 var(--radius-card);
    flex-shrink: 0;
  }
  .article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .article-body { padding: 11px 13px; gap: 5px; overflow: hidden; }
  .article-card h3 {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .article-card p { display: none; }
  .article-foot { margin-top: 5px; }
}

/* ---------- Category grid: mobile ---------- */
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .cat-card { padding: 14px 12px; }
  .cat-card h3 { font-size: 14px; }
  .cat-card p { font-size: 11.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- Lawyer box: mobile ---------- */
@media (max-width: 480px) {
  .lawyer-box { padding: 16px; gap: 12px; }
  .lawyer-photo { width: 56px; height: 56px; }
}

/* ---------- Flow steps: mobile ---------- */
@media (max-width: 480px) {
  .flow-step { padding: 16px 14px; }
  .flow-step h3 { font-size: 15px; }
}

/* ---------- LINE CTA section: mobile ---------- */
@media (max-width: 480px) {
  .line-cta { padding: 20px 16px; }
  .line-cta h2 { font-size: clamp(17px, 5vw, 22px); }
  .line-cta .btn-lg { font-size: 15px; padding: 14px 20px; }
}

/* ---------- Footer: small screens ---------- */
@media (max-width: 480px) {
  .site-footer { padding-block: var(--sp-8) var(--sp-6); margin-top: var(--sp-10); }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ---------- Article single: mobile ---------- */
@media (max-width: 600px) {
  .article-head h1 { font-size: clamp(18px, 5.5vw, 24px); }
  .article-head .lead { font-size: 14px; }
  .prose { font-size: 15.5px; }
  .prose h2 { font-size: clamp(17px, 5vw, 22px); }
  .prose h3 { font-size: clamp(15px, 4.5vw, 19px); }
}

/* ---------- Sticky LINE CTA: override + min-height ---------- */
.sticky-cta { transform: translateY(100%); }
.sticky-cta .btn { min-height: 52px; }

/* ---------- Heading overflow-wrap (global) ---------- */
h1, h2, h3, h4, .section-title, .article-head h1 {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Image display: ensure cover fill ---------- */
.article-thumb img, .eyecatch img, .related-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}


/* ===================================================================
   MOBILE IMPROVEMENTS v3 — 2026-06-06
   スマホデザイン追加修正：overflow防止・trust-pill折返し・nav幅制限
   =================================================================== */

/* hero-trust-pill: white-space: nowrap → 非常に小さい画面で省略 */
@media (max-width: 380px) {
  .hero-trust-pill {
    max-width: calc(100vw - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* hero全体: 幅オーバーフロー完全防止 */
.hero { max-width: 100vw; overflow-x: hidden; }
.hero-copy { max-width: 100%; overflow-wrap: break-word; word-break: break-word; }
.hero-lead { overflow-wrap: break-word; word-break: break-word; }

/* searchbox: フレキシブル対応 */
@media (max-width: 480px) {
  .searchbox { padding: 6px 8px 6px 12px; }
  .searchbox .btn { padding: 8px 14px; font-size: 14px; }
}

/* nav: スマホで横スクロール防止 */
@media (max-width: 880px) {
  .nav { max-width: 100%; overflow: hidden; }
}

/* 記事ページ: コンテンツ幅オーバーフロー防止 */
.prose img, .prose table, .prose pre, .prose iframe {
  max-width: 100%;
  overflow-x: auto;
}
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* cat-gridホーム: 2列 on 320px */
@media (max-width: 340px) {
  .cat-grid { grid-template-columns: 1fr !important; }
}
