/* Shared styles for every page: tokens, base elements, header, buttons, shared
   components, guides, footer, the floating inquiry bar and their mobile rules.
   Page-specific styles live in the page files (home.css, service.css, pricing.css,
   examples.css, use-cases.css, faq.css, and forms.css for the two form pages), which
   load after this one. Pages without a file of their own (guides, company, policy,
   stop, 404) keep their few rules here.

   Brand tokens. Single source of truth for colour across every page.
   Base palette is docs/CONTENT-RULES.md: navy #071E45, blue #1265E8, orange #F5A623.
   The blue matches the illustrations in assets/images (hue ~215).
   Do not introduce page-specific colour palettes; add a token here instead.
   site.css, home.css, service.css, pricing.css, examples.css and forms.css write
   every hex colour as a token (checked by scripts/check_site.py); rgba() in shadows
   and overlays may stay inline. The illustrated pages (use cases, FAQ) keep
   their one-off tints next to the artwork they match; a tint needed a second
   time becomes a token here. */
:root {
  /* Core brand */
  --brand-navy: #071e45;
  --brand-navy-deep: #051734;
  --brand-navy-darkest: #041129;
  --brand-blue: #1265e8;          /* accents, links, fills, icons — AA 5.18:1 on white */
  --brand-blue-dark: #0d4fb8;     /* hover / gradient depth */
  --brand-orange: #f5a623;
  --brand-orange-dark: #d88719;
  --brand-orange-text: #9a5900;  /* 白 5.52:1。--brand-orange は 2.03:1 で文字に使えない */
  --campaign-red: #d92d20;       /* キャンペーン帯。白文字 4.83:1 */

  /* Surfaces */
  --pale-blue: #eff5ff;
  --pale-blue-2: #f7faff;
  --paper: #f7f9fc;
  --white: #ffffff;

  /* Text */
  --ink: #071e45;
  --text-body: #1a3355;
  --muted: #435670;
  --on-dark: #d6e2f2;
  --on-dark-muted: #c6d3e5;

  /* Lines & accents */
  --line: #dbe4f0;
  --cyan: #8eafe3;
  --green: #0c7a62;
  --alert: #e0655f;
  --alert-text: #b3261e;         /* 白背景 6.54:1。--alert は 3.39:1 で本文には使えない */
  --alert-surface: #fff4f3;      /* 送信失敗の案内の背景。--alert-text 6.07:1・--brand-blue 4.81:1 */
  --on-brand-blue: #f7faff;      /* --brand-blue の上に載る文字。4.95:1 */

  /* Supporting colours of shared components */
  --on-ink: #d7e0ef;             /* 文面サンプルの見出し帯。--ink の上で 12.34:1 */
  --on-dark-faint: #acb6c6;      /* 濃い見出し帯の上のパンくず。--ink の上で 8.01:1 */
  --check-surface: #e0f6ef;      /* .check-list の✓の丸。--green 4.68:1 */
  --highlight: #fff1a8;          /* 文面サンプルの強調（蛍光ペン） */
  --notice-surface: #fff2ed;     /* .notice の背景 */
  --pending-text: #8a3b20;       /* .pending ラベル。--pending-surface の上で 6.5:1 */
  --pending-surface: #ffe7dd;
  --field-border: #bbc2cf;       /* 入力欄の枠 */

  /* Tints of the use-cases page that it uses in more than one place */
  --surface-cool: #f2f5fb;        /* 帯・カード・最後の導線の背景のグラデーション */
  --surface-cool-light: #fafbfd;  /* それより淡い色。帯とカードの背景のグラデーション */
  --picture-surface: #f1f5fb;     /* イラストの背景のグラデーションの始まり */
  --picture-surface-light: #fcfdfe; /* 同じグラデーションの終わり */

  /* Typography. Single source of truth for type across every page.
     明朝(--font-serif) はページ見出しh1、セクション見出しh2、添え書きのキーコピーだけ。
     カード見出し・h3以下・ラベル・本文・UI はすべてゴシック(--font-sans)。
     --font-latin は装飾数字専用。装飾の英文署名は使わない。
     Webフォントは読み込まず、各スタックは macOS → Windows → Noto → 総称 の順で揃える。
     ページ固有の font-family は追加しない。必要ならここにトークンを追加する。 */
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "MS PMincho", serif;
  --font-latin: Georgia, "Times New Roman", serif;

  --shadow: 0 20px 48px rgba(7, 30, 69, .10);
  --radius: 20px;
  --max: 1180px;
  /* The fixed header's height. site.js measures the header and overrides this. */
  --header-height: 79px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Include the focus outline as well as both fixed bars in native scrolling. */
  scroll-padding-top: calc(var(--header-height) + 12px);
  scroll-padding-bottom: calc(var(--floating-cta-height, 0px) + 12px);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
h1, h2 {
  overflow-wrap: normal;
  word-break: normal;
  line-break: strict;
  text-wrap: pretty;
}
@supports (word-break: auto-phrase) {
  h1, h2 { word-break: auto-phrase; }
}
.heading-line { display: inline-block; white-space: nowrap; }
body.nav-open { overflow: hidden; }
.nav-actions, .mobile-label { display: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
/* Focus ring. The offset draws the ring outside the element, so what it has
   to contrast with is the container behind it, not the element itself.
   Navy clears 3:1 on every light surface the site uses (15:1 on white,
   3.16:1 on --brand-blue); white covers the dark containers listed below.
   WCAG 2.2 non-text contrast needs 3:1 and no single colour manages both. */
:focus-visible { outline: 3px solid var(--brand-navy); outline-offset: 3px; }
.page-hero :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

.skip-link { position: fixed; top: -80px; left: 12px; z-index: 999; background: var(--ink); color: var(--white); padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
/* Narrower columns set --narrow-width on the .narrow element itself, in a stylesheet loaded
   after this one (forms.css .form-shell); set on a parent it would be overridden here. */
.narrow { --narrow-width: 820px; width: min(calc(100% - 40px), var(--narrow-width)); margin-inline: auto; }
.section { padding: 104px 0; }
.section-sm { padding: 68px 0; }
.section-blue { background: var(--pale-blue); }

.section-title { margin: 0; max-width: 800px; font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.22; letter-spacing: -.04em; }
.section-lead { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.caption { color: var(--muted); font-size: 1rem; }

/* One header for every page. Markup comes from site.js; do not add
   per-page .site-header / .logo / .global-nav overrides. */
/* The header wrapper is only as tall as the header itself, so position:sticky
   would stop holding after one header height. Fix the header and let the wrapper
   reserve the space it no longer occupies. */
[data-site-header] { height: var(--header-height); }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(14px); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 28px; }
/* Official logo (dist/assets/images/asset_logo_bizform.webp). Size it by height only.
   Scoped to the header and footer so page-wide `img` rules cannot resize it. */
.logo { display: inline-flex; flex: none; align-items: center; }
.site-header .logo img, .site-footer .logo img { display: block; width: auto; }
.site-header .logo img { height: 32px; }
.global-nav { display: flex; align-items: center; gap: 25px; margin-left: auto; }
/* The menu links only: the buttons in the mobile menu (.nav-actions) keep the button look. */
.global-nav > a { position: relative; padding: 8px 0; font-size: 14.4px; font-weight: 700; }
.global-nav > a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 1px; height: 2px; background: var(--brand-blue); transition: right .2s ease; }
.global-nav > a:hover::after, .global-nav > a[aria-current="page"]::after { right: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-button { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.menu-button span, .menu-button::before, .menu-button::after { content: ""; display: block; width: 20px; height: 2px; margin: 4px auto; background: var(--ink); transition: .2s ease; }
.menu-button[aria-expanded="true"] span { opacity: 0; }
.menu-button[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; line-height: 1.3; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; cursor: pointer; }
.button:hover { transform: translateY(-2px); }
/* Navy label, not white: white on brand orange is 2.03:1 and fails WCAG AA.
   Navy on orange is 8.09:1. */
.button-primary { color: var(--brand-navy); background: var(--brand-orange); box-shadow: 0 12px 24px rgba(245,166,35,.22); }
.button-primary:hover { background: var(--brand-orange-dark); }
.button-secondary { color: var(--brand-blue); border-color: var(--brand-blue); background: var(--white); }
.button-ghost { color: var(--white); border-color: rgba(255,255,255,.38); background: transparent; }
/* Phone consultation next to the consultation CTA. Navy keeps it apart from the orange and blue CTAs. */
.button-tel { color: var(--white); background: var(--brand-navy); }
.button-tel:hover { background: var(--brand-blue-dark); }
.button-tel svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.header-actions .button-tel { gap: 8px; padding: 8px 14px; }
.button-tel-text { display: grid; line-height: 1.2; text-align: left; }
.button-tel-text small { color: var(--on-dark); font-size: 12px; }
.button-tel-text span { font-size: 15.2px; letter-spacing: .02em; }
/* Japanese text may break between any two characters, so a tight header used
   to wrap every link onto two lines instead of overflowing. Keep each label on
   one line and make the row fit instead. Header row text is in px, like the
   buttons, so a larger browser font setting cannot push the row off screen.
   Desktop ranges start at 1040.02px, not 1041px: zoom and OS scaling produce
   fractional widths such as 1040.9px that would fall between the queries. */
.global-nav > a, .header-actions .button, .button-tel-text span { white-space: nowrap; }
.header-dl-short { display: none; }
@media (min-width: 1040.02px) {
  .header-inner { gap: 20px; }
  .header-actions .button { padding-inline: 14px; }
  /* site.js adds .header-compact when the row does not fit anyway (fonts,
     scrollbars and text scaling vary by device): the same short labels as below 1240px. */
  .header-compact .header-actions .button-tel { width: 50px; padding: 0; }
  .header-compact .header-actions .button-tel-text { display: none; }
  .header-compact .header-dl-long { display: none; }
  .header-compact .header-dl-short { display: inline; }
}
@media (min-width: 1240px) {
  .global-nav { gap: 20px; }
  .header-actions { gap: 8px; }
}
/* Below 1240px the number no longer fits beside the menu; keep the phone as an icon
   and shorten 資料ダウンロード to 資料DL. .98 covers fractional widths under zoom. */
@media (min-width: 1040.02px) and (max-width: 1239.98px) {
  .global-nav { gap: 18px; }
  .header-actions .button-tel { width: 50px; padding: 0; }
  .header-actions .button-tel-text { display: none; }
  .header-dl-long { display: none; }
  .header-dl-short { display: inline; }
}
/* site.js adds .header-no-tel when the row still does not fit after .header-compact.
   The menu and the floating bar still offer the phone. */
.header-no-tel .header-actions .button-tel { display: none; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-blue); font-weight: 800; }
/* Symbols drawn with content are decoration: the text after "/" is their alternative
   text, empty so screen readers skip them. Browsers without that syntax drop the second
   declaration and keep the first. */
.text-link::after { content: "→"; content: "→" / ""; transition: transform .2s ease; }
.text-link:hover::after { transform: translateX(4px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.check-list { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; }
.check-list li::before { content: "✓"; content: "✓" / ""; display: grid; place-items: center; width: 21px; height: 21px; margin-top: 3px; border-radius: 50%; color: var(--green); background: var(--check-surface); font-size: .75rem; font-weight: 900; }
.section-title + .check-list { margin-top: 28px; }
.check-list + p { margin-top: 30px; }

/* Marks the part of a sample message written from research (top and examples pages). */
.highlight { padding: 1px 4px; border-radius: 4px; color: inherit; background: var(--highlight); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Card grid of the guide index. */
.cards-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin-top: 48px; }
.info-card { position: relative; min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-num { color: var(--brand-blue); font-size: .75rem; font-weight: 900; letter-spacing: .12em; }
.info-card .text-link { margin-top: 22px; }
.info-card p { margin: 0; color: var(--muted); }
.info-card h2 { overflow-wrap: anywhere; font-size: 1.4rem; }
/* One card title is much longer than the others and is set smaller. */
.info-card .guide-long-title { font-size: 1.1rem; }

.faq-list { display: grid; gap: 12px; margin-top: 44px; }
details { border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
summary { position: relative; padding: 21px 54px 21px 22px; font-weight: 800; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; content: "+" / ""; position: absolute; right: 22px; top: 18px; color: var(--brand-blue); font-size: 1.4rem; }
details[open] summary::after { content: "−"; content: "−" / ""; }
.detail-body { padding: 0 22px 22px; color: var(--muted); }

.page-hero { padding: 94px 0 72px; color: var(--white); background: var(--ink); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; color: var(--on-dark-faint); font-size: .875rem; }
.breadcrumbs a:hover { color: var(--white); }
.page-hero h1 { max-width: 1040px; margin: 0; font-family: var(--font-serif); font-size: clamp(2.6rem,4vw,3.6rem); line-height: 1.2; letter-spacing: -.045em; }
.page-hero p { max-width: 720px; margin: 24px 0 0; color: var(--on-dark); font-size: 1.08rem; }
.page-hero .text-link { color: var(--cyan); }
.page-hero-center { min-height: 65vh; display: grid; align-items: center; }
.page-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
/* Heroes on a light background (service, pricing, examples, FAQ) need darker breadcrumbs. */
.breadcrumbs-light { color: var(--muted); }
.breadcrumbs-light a:hover { color: var(--brand-blue); }

/* Page title on the light heroes of the service, pricing and examples pages, and the
   two round buttons under it (service, examples). */
.hero-title { margin: 0; color: var(--brand-navy-deep); font-family: var(--font-serif); font-size: clamp(2.5rem,4.4vw,4rem); line-height: 1.25; letter-spacing: -.05em; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-buttons .button { min-width: 190px; border-radius: 999px; }

/* Page blocks (service, pricing, examples): full-width bands in white or pale blue around
   a 1120px column, each opened by a serif title and a lead. */
.block { padding: 88px 0; background: var(--white); }
.block-blue { background: var(--pale-blue); }
.block-inner { width: min(calc(100% - 40px), 1120px); margin-inline: auto; }
.block-title { margin: 0; color: var(--brand-navy-deep); font-family: var(--font-serif); font-size: clamp(2rem,3.2vw,2.75rem); line-height: 1.35; letter-spacing: -.04em; }
.block-lead { max-width: 760px; margin: 18px 0 0; color: var(--text-body); line-height: 1.9; }
.block-note { margin: 16px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.7; }
/* Step numbers (01, 02 ...) in the flows on the top, service and examples pages.
   Decorative: the list itself is numbered, so the spans carry aria-hidden. */
.step-number { color: var(--brand-blue); font-family: var(--font-latin); font-size: 1rem; font-weight: 700; letter-spacing: .08em; }
/* Numbered steps as a row of cards (service, examples): five across, three below
   1024px, a list with the number on the left on phones. */
.step-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.step-cards > li { min-width: 0; padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.step-cards h3 { margin: 6px 0 8px; color: var(--brand-navy-deep); font-size: 1.125rem; line-height: 1.5; }
.step-cards p { margin: 0; font-size: 1rem; line-height: 1.8; }
/* Links to related pages at the end of a block. */
.more-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 32px 0 0; }

/* Final CTA: the dark card that closes the top, service, pricing and examples pages. */
.final-cta-block { padding: 64px 0 88px; }
.final-cta { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 44px; align-items: center; padding: 56px; border-radius: 24px; color: var(--white); background: var(--brand-navy-deep); }
.final-cta h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(1.875rem,3.2vw,2.75rem); line-height: 1.4; letter-spacing: -.04em; }
.final-cta p { margin: 16px 0 0; color: var(--on-dark); }
.final-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.final-cta-actions .button { min-width: 190px; border-radius: 999px; }
.final-cta :focus-visible { outline-color: var(--white); }

.split { display: grid; grid-template-columns: .78fr 1.22fr; gap: 70px; align-items: start; }
.definition-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.definition-row { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.definition-row dt { font-weight: 800; }
.definition-row dd { margin: 0; color: var(--muted); }
.comparison { width: 100%; border-collapse: collapse; margin-top: 34px; border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.comparison th, .comparison td { padding: 18px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison th { color: var(--brand-blue); background: var(--pale-blue); font-size: .86rem; }
.comparison tr:last-child td { border-bottom: 0; }
.notice { padding: 22px 24px; border-left: 4px solid var(--brand-orange); border-radius: 0 14px 14px 0; background: var(--notice-surface); }
.notice strong { display: block; margin-bottom: 5px; }
.notice + .section-title { margin-top: 55px; }
.pending { display: inline-flex; padding: 5px 9px; border-radius: 99px; color: var(--pending-text); background: var(--pending-surface); font-size: .76rem; font-weight: 800; }

.article-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 70px; align-items: start; }
.toc { position: sticky; top: 110px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.toc strong { display: block; margin-bottom: 12px; }
.toc a { display: block; padding: 7px 0; color: var(--muted); font-size: .86rem; }
.toc a:hover { color: var(--brand-blue); }
.prose { min-width: 0; }
.prose h2 { margin: 70px 0 18px; font-family: var(--font-serif); font-size: 2rem; line-height: 1.4; letter-spacing: -.03em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 40px 0 12px; font-size: 1.35rem; }
.prose p, .prose li { color: var(--text-body); }
.prose blockquote { margin: 30px 0; padding: 24px 28px; border-left: 4px solid var(--brand-blue); background: var(--pale-blue); font-weight: 700; }

/* One footer for every page; no per-page background overrides. */
.site-footer { padding: 64px 0 26px; color: var(--on-dark-muted); background: var(--brand-navy-darkest); }
.footer-grid { display: grid; grid-template-columns: 1.25fr repeat(3,1fr); gap: 50px; }
/* The logo's blue disappears on the dark footer, so it sits on a white plate. */
.logo-plate { padding: 10px 14px; border-radius: 10px; background: var(--white); }
.site-footer .logo-plate img { height: 28px; }
.footer-brand p { max-width: 330px; margin-top: 18px; }
.footer-column strong { display: block; margin-bottom: 14px; color: var(--white); }
.footer-column a { display: block; padding: 5px 0; font-size: .9rem; }
.footer-column a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 54px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .78rem; }

/* Fades in when scrolled into view. Hidden only once site.js watches it (.reveal-ready on
   <html>), and only on screens wider than phones with motion allowed: without scripts, if
   site.js fails to load, on phones, with reduced motion and in print it is shown as is.
   Only the fade-in is animated; hiding is instant. */
@media screen and (min-width: 768.02px) and (prefers-reduced-motion: no-preference) {
  .reveal-ready .reveal { opacity: 0; transform: translateY(18px); }
  .reveal-ready .reveal.visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
}

.error-code { margin: 0 0 16px; color: var(--on-dark); font-size: 1.125rem; font-weight: 800; }

.table-scroll-hint { margin: 0 0 12px; color: var(--muted); font-size: .875rem; }
.table-scroll-hint[hidden] { display: none; }

/* Floating CTA. Injected by site.js on every page except the contact form,
   where a second "相談する" would only compete with the form itself. */
.floating-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 14px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(7, 30, 69, .09);
  transform: translateY(120%);
  visibility: hidden;
  transition: transform .28s ease, visibility .28s ease;
}
.floating-cta.is-visible { transform: translateY(0); visibility: visible; }
.floating-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 30px;
  border-radius: 999px;
  /* px like the header, so a larger browser font setting cannot push a button off screen. */
  font-size: 15.2px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.floating-cta .floating-cta-primary {
  color: var(--white);
  background: var(--brand-blue);
  box-shadow: 0 10px 24px rgba(18, 101, 232, .3);
}
.floating-cta .floating-cta-primary:hover { background: var(--brand-blue-dark); transform: translateY(-2px); }
.floating-cta .floating-cta-secondary {
  color: var(--brand-navy);
  background: var(--white);
  border: 1.5px solid var(--line);
}
.floating-cta .floating-cta-secondary:hover { border-color: var(--brand-blue); color: var(--brand-blue); transform: translateY(-2px); }
.floating-cta .floating-cta-tel { color: var(--white); background: var(--brand-navy); }
.floating-cta .floating-cta-tel:hover { background: var(--brand-blue-dark); transform: translateY(-2px); }
.floating-cta svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 資料DL・無料相談・電話 replace the full labels at 768px and below. */
.floating-cta-label-short { display: none; }

/* The tab on the bar's top edge tucks the bar away. Tucked, the bar slides below the
   screen (the home-indicator strip stays) and only the tab is left to bring it back. */
.floating-cta-toggle {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  /* Overlap the bar's top border so the tab and bar read as one piece. */
  bottom: calc(100% - 1px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  color: var(--brand-navy);
  background: var(--white);
  box-shadow: 0 -6px 14px rgba(7, 30, 69, .07);
  /* px like the bar's buttons. */
  font-size: 13.6px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
/* A 44px touch target without a taller tab. */
.floating-cta-toggle::before { content: ""; position: absolute; inset: -8px -4px 0; }
.floating-cta-toggle:hover { color: var(--brand-blue); }
.floating-cta .floating-cta-toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
/* Tucked away, the tab is the only way back to the inquiry links; fill it like 無料で相談する. */
.floating-cta.is-minimized .floating-cta-toggle { color: var(--white); background: var(--brand-blue); border-color: var(--brand-blue); }
.floating-cta.is-minimized .floating-cta-toggle:hover { background: var(--brand-blue-dark); }
.floating-cta.is-minimized .floating-cta-toggle svg { transform: rotate(180deg); }
.floating-cta.is-visible.is-minimized { transform: translateY(calc(100% - env(safe-area-inset-bottom, 0px))); box-shadow: none; }
/* Out of reach once tucked away: hidden links leave the tab order after the slide. */
.floating-cta.is-minimized a { visibility: hidden; transition: visibility 0s .28s; }

/* Keep the footer clear of the bar so the last links stay clickable. */
body.has-floating-cta .site-footer { padding-bottom: calc(var(--floating-cta-height, 80px) + 16px); }

/* Screen-size rules (max-width), widest first. The header's desktop ranges stay with
   the header rules above. Page files add their own after this file. */
@media (max-width: 1040px) {
  .site-header { backdrop-filter: none; background: var(--white); }
  .header-inner { gap: 16px; }
  .header-actions { order: 1; margin-left: auto; }
  .header-actions .button-secondary { display: none; }
  .menu-button { display: block; order: 2; flex: none; cursor: pointer; }
  .global-nav { display: none; position: fixed; inset: var(--header-height) 0 auto; background: rgba(255,255,255,.98); align-items: stretch; flex-direction: column; gap: 0; height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; padding: 12px max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  .global-nav.open { display: flex; }
  .global-nav > a { flex: none; min-height: 56px; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .global-nav > a[aria-current="page"] { color: var(--brand-blue); }
  .global-nav .nav-actions { display: grid; flex: none; gap: 12px; margin-top: 24px; padding-bottom: 12px; }
  .global-nav .nav-actions .button { min-height: 52px; padding: 14px 20px; font-size: 1rem; }
  body.nav-open { position: fixed; top: var(--nav-scroll-top); left: 0; right: 0; width: 100%; }
  .footer-grid { grid-template-columns: 1.3fr repeat(2,1fr); }
}
@media (max-width: 1024px) {
  .cards-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .step-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }

  .block-title .heading-line { white-space: normal; }
  /* Side by side, the heading and two buttons overflow just above 768px with larger text. */
  .final-cta { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .final-cta-actions { justify-content: flex-start; }
}
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 16px; overflow-wrap: anywhere; }
  .header-inner { width: calc(100% - 32px); min-height: 64px; gap: 8px; }
  .header-inner .logo img { height: 28px; }
  .header-actions .button-primary { display: inline-flex; min-height: 44px; padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: none; }
  .desktop-label { display: none; }
  .mobile-label { display: inline; }
  .header-actions { gap: 6px; }
  .header-actions .button-tel { width: 44px; min-height: 44px; padding: 0; border-radius: 999px; }
  .header-actions .button-tel-text { display: none; }
  .menu-button { border-radius: 10px; }
  .section { padding: 56px 0; }
  .section-sm { padding: 40px 0; }
  .section-title { font-size: clamp(1.625rem, 6.6vw, 2.25rem); line-height: 1.5; letter-spacing: -.025em; }
  .section-title br { display: none; }
  .section-lead, .page-hero p { font-size: 1rem; line-height: 1.85; }
  .section-lead { margin-top: 16px; }
  .breadcrumbs { align-items: center; gap: 6px; margin-bottom: 24px; line-height: 1.6; }
  .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .button { min-height: 52px; min-width: 0; font-size: 1rem; }
  .hero-actions { gap: 10px; margin-top: 24px; }
  .hero-actions .button { width: 100%; }
  .text-link { min-height: 44px; }
  .page-links { display: grid; grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(1.875rem, 8.5vw, 2.75rem); line-height: 1.4; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .button { width: 100%; min-width: 0; }
  .block { padding: 56px 0; }
  .more-links { flex-direction: column; gap: 4px; margin-top: 24px; }
  .final-cta-block { padding: 40px 0 56px; }
  .final-cta { padding: 30px 22px; border-radius: 18px; }
  .final-cta-actions { flex-direction: column; }
  .final-cta-actions .button { width: 100%; min-width: 0; }
  .step-cards { grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 28px; }
  .step-cards > li { display: grid; grid-template-columns: 2.5em minmax(0,1fr); gap: 0 12px; padding: 18px 20px; }
  .step-cards .step-number { grid-row: 1 / 3; padding-top: 3px; }
  .step-cards h3 { margin: 0 0 4px; }
  .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .page-hero { padding: 28px 0 36px; }
  .page-hero h1 { font-size: clamp(1.875rem, 7.5vw, 2.75rem); line-height: 1.5; letter-spacing: -.025em; }
  .page-hero h1 br { display: none; }
  .heading-line { display: inline; white-space: normal; }
  .cards-3, .split, .article-layout { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .cards-3, .faq-list { margin-top: 28px; }
  .info-card { padding: 22px; }
  summary { min-height: 56px; padding: 18px 44px 18px 18px; line-height: 1.65; }
  summary::after { right: 16px; top: 16px; }
  .detail-body { padding: 0 18px 20px; font-size: 1rem; }
  .toc { position: static; padding: 20px; }
  .toc a { min-height: 44px; padding: 10px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .toc a:last-child { border-bottom: 0; }
  .prose h2 { margin-top: 44px; font-size: 1.5rem; }
  .prose h3 { font-size: 1.25rem; }
  .prose blockquote { padding: 20px; }
  .prose ul, .prose ol { padding-left: 24px; }
  .definition-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .table-scroll { margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; }
  .table-scroll .comparison { display: table; min-width: 560px; margin: 0; overflow: visible; box-shadow: none; }
  /* Two-column key/value tables fit the screen by wrapping instead of scrolling. */
  .table-scroll .comparison-compact { min-width: 0; }
  .comparison-compact th { width: 6.5em; white-space: nowrap; }
  .comparison th, .comparison td { padding: 14px 16px; }
  .site-footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-column strong { margin-bottom: 8px; }
  .footer-column a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; font-size: .875rem; }
  .footer-bottom { flex-direction: column; gap: 8px; margin-top: 28px; font-size: .75rem; }


  .floating-cta { gap: 8px; padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .floating-cta a { flex: 1 1 0; gap: 6px; min-height: 50px; padding: 10px 12px; font-size: 14.4px; }
  .floating-cta .floating-cta-label-long { display: none; }
  .floating-cta .floating-cta-label-short { display: inline; }
  .floating-cta .floating-cta-tel { flex: none; }
  .floating-cta-toggle { right: max(12px, env(safe-area-inset-right)); }
}
@media (max-width: 390px) {
  .page-hero .guide-how-to-title { word-break: normal; }
}
/* Up to 389px the full-size logo leaves no room beside the phone button. */
@media (max-width: 389px) {
  .header-inner .logo img { height: 24px; }
  .header-actions .button-primary { padding-inline: 12px; }
}
/* Three buttons stop fitting with icons; the phone keeps its icon so the short label stays clear. */
@media (max-width: 374px) {
  .floating-cta-secondary svg, .floating-cta-primary svg { display: none; }
}
@media (max-width: 360px) {
  .container, .narrow { width: calc(100% - 32px); }
}
/* No room for a third header button; the phone stays in the menu and the floating bar. */
@media (max-width: 349px) {
  .header-actions .button-tel { display: none; }
}
/* Folded phones such as the Galaxy Fold cover screen (280px): a smaller logo keeps the row on screen. */
@media (max-width: 319px) {
  .header-inner .logo img { height: 20px; }
}
/* Keep 44px touch targets and room for focus outlines in short landscape views. */
@media (max-height: 480px) and (orientation: landscape) {
  .header-inner { min-height: 56px; }
  .header-actions .button { min-height: 44px; padding-block: 8px; }
  .floating-cta { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .floating-cta a { min-height: 44px; padding-block: 6px; line-height: 1.3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }

  .floating-cta, .floating-cta .floating-cta-toggle svg { transition: none; }
}

@media print {
  .floating-cta { display: none; }
}
