/* ふみくら行政書士事務所（行政書士デモ・写真を使わないサイト）
   白 × 群青 #2F4FA2 × 朱 #E0533D（判子と日数・金額の数字だけ）。文字は濃い紺 #1E2A44
   書体: 見出しと本文 Zen Kaku Gothic New 400/700、日数・金額の数字だけ Inter 700
   あしらい: 地に方眼（12px・群青5%）、図解の中は24px・10%。区画の頭に角の折れた書類の印。角は丸めない
   動き: 書類が下から置かれる／朱の数字と「済」の判子は押したように出る。transform と opacity だけ */

:root {
  --white: #fff;
  --ai: #2F4FA2;
  --ai-d: #213A80;
  --ai-l: #E8EDF8;
  --ai-m: #B9C6E6;
  --shu: #E0533D;
  --shu-l: #FADCD6;
  --ink: #1E2A44;
  --sub: #4A5675;
  --gray: #6B7385;
  --gray-l: #E4E6EA;
  --rule: #C6D1EB;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --num: "Inter", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --press: cubic-bezier(.3, 1.55, .5, 1);
  --w: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; color: var(--ink); font-family: var(--jp); font-weight: 400;
  font-size: clamp(15px, .25vw + 14.2px, 17px); line-height: 1.8; letter-spacing: .02em;
  background-color: #fff;
  background-image:
    linear-gradient(rgba(47, 79, 162, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 79, 162, .05) 1px, transparent 1px);
  background-size: 12px 12px;
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
img, svg { display: block; }
a { color: var(--ai); }
p { margin: 0 0 .9em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.45; letter-spacing: .03em; font-feature-settings: "palt"; }
h1, h2, h3, p, li, dt, dd, th, td, figcaption, label, legend { word-break: auto-phrase; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
figure { margin: 0; }
table { border-collapse: collapse; width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nb { white-space: nowrap; }
.wrap { width: min(var(--w), calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 767px) { .wrap { width: calc(100% - 36px); } }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 3px; }
.small { font-size: .84em; color: var(--sub); line-height: 1.7; margin-top: .9em; }

/* 数字（日数・金額）: Inter の太字。朱は大きい数字だけに使う */
.num { color: var(--shu); font-weight: 700; white-space: nowrap; }
.num b { font-family: var(--num); font-weight: 700; letter-spacing: 0; font-feature-settings: "tnum"; }
.num--ink { color: inherit; }

/* ---------- ボタン（角は丸めない） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 52px; padding: 10px 26px; border: 2px solid var(--ai);
  font-family: var(--jp); font-weight: 700; font-size: 15px; letter-spacing: .08em; line-height: 1.4;
  text-decoration: none; cursor: pointer; border-radius: 0;
  transition: background-color .2s, color .2s;
}
.btn--fill { background: var(--ai); color: #fff; }
.btn--fill:hover { background: var(--ai-d); border-color: var(--ai-d); }
.btn--line { background: #fff; color: var(--ai); }
.btn--line:hover { background: var(--ai-l); }
.btn--s { min-height: 44px; padding: 8px 22px; }
.btn--l { min-height: 60px; min-width: 280px; font-size: 16px; }
.btn .arw { display: inline-block; font-family: var(--num); transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.more { margin-top: 28px; }
.textlink { font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- ヘッダー ---------- */
.hd { background: #fff; border-bottom: 2px solid var(--ai); position: relative; z-index: 20; }
.hd__row { display: flex; align-items: center; gap: 20px; min-height: 82px; }
.hd__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.brand { display: block; text-decoration: none; color: var(--ink); }
.logo { width: 272px; height: auto; overflow: visible; }
.logo__a { font-family: var(--jp); font-weight: 700; font-size: 25px; fill: var(--ink); }
.logo__b { font-family: var(--jp); font-weight: 700; font-size: 16px; fill: var(--ink); }
.demo { font-family: var(--num); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--sub); border: 1px solid var(--rule); padding: 1px 6px; line-height: 1.5; }
.hd__right { display: flex; align-items: center; gap: 22px; }
.hd__tel { margin: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.hd__tel a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-family: var(--num); font-weight: 700; font-size: 22px; letter-spacing: .02em; }
.hd__tel svg { width: 20px; height: 20px; color: var(--ai); }
.hd__hours { font-size: 12px; color: var(--sub); letter-spacing: .04em; }
.menu { display: none; }

/* ナビ: 書類の欄のように、同じ幅の枠を並べる */
.gnav { border-top: 1px solid var(--rule); background: #fff; }
.gnav ul { display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--rule); }
.gnav li { border-right: 1px solid var(--rule); }
.gnav ul a { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-align: center; transition: background-color .2s; }
.gnav ul a:hover { background: var(--ai-l); }
.gnav ul a[aria-current="page"] { background: var(--ai); color: #fff; }
.gnav__sp { display: none; }

@media (max-width: 1023px) {
  .hd { position: sticky; top: 0; }
  .hd__row { min-height: 64px; gap: 12px; }
  .hd__right { display: none; }
  .logo { width: 214px; }
  .menu {
    display: grid; justify-items: center; align-content: center; gap: 5px; width: 52px; height: 52px; margin-right: -6px;
    background: none; border: 0; padding: 0; cursor: pointer; color: var(--ai);
  }
  .menu__bars, .menu__bars::before, .menu__bars::after { display: block; width: 26px; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
  .menu__bars { position: relative; }
  .menu__bars::before, .menu__bars::after { content: ""; position: absolute; left: 0; }
  .menu__bars::before { transform: translateY(-8px); }
  .menu__bars::after { transform: translateY(8px); }
  .menu__label { font-family: var(--num); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; margin-top: 7px; }
  .is-menu .menu__bars { background: transparent; }
  .is-menu .menu__bars::before { transform: rotate(45deg); }
  .is-menu .menu__bars::after { transform: rotate(-45deg); }
  .gnav { display: none; position: absolute; left: 0; right: 0; top: 100%; border-top: 0; border-bottom: 2px solid var(--ai); box-shadow: 0 14px 30px rgba(30, 42, 68, .12); max-height: calc(100vh - 64px); overflow-y: auto; }
  .is-menu .gnav { display: block; }
  .gnav ul { grid-template-columns: 1fr; border-left: 0; padding-top: 6px; }
  .gnav li { border-right: 0; border-bottom: 1px solid var(--rule); }
  .gnav ul a { justify-content: flex-start; min-height: 56px; font-size: 16px; padding: 8px 4px; }
  .gnav ul a[aria-current="page"] { padding-left: 14px; }
  .gnav__sp { display: grid; gap: 16px; padding: 22px 0 26px; }
  .gnav__sp .hd__tel { align-items: flex-start; }
  .gnav__sp .btn { width: 100%; }
}
@media (max-width: 374px) { .logo { width: 190px; } }

/* ---------- 区画の見出し（角の折れた書類の印） ---------- */
.sh { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.sh__doc { width: 20px; height: 24px; flex: none; }
.sh h1, .sh h2 { font-size: clamp(23px, 1.4vw + 17px, 32px); }
.sh h1 { font-size: clamp(28px, 2vw + 20px, 42px); }
.sec { padding-block: clamp(56px, 6vw, 96px); }
.sec + .sec { border-top: 1px solid var(--rule); }

/* ---------- トップ: 最初の画面 ---------- */
.hero { padding-block: clamp(36px, 5vw, 72px) clamp(48px, 5vw, 72px); border-bottom: 1px solid var(--rule); }
.hero__lead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.hero__h { font-size: clamp(32px, 4.2vw + 14px, 68px); letter-spacing: .02em; line-height: 1.25; }
.hero__p { font-size: clamp(16px, .5vw + 14px, 19px); line-height: 1.85; margin: 0; padding-left: 28px; border-left: 2px solid var(--ai); }
.br-s { display: none; }
.hero__p { white-space: nowrap; }
.hero__sub { display: flex; align-items: center; gap: 12px; font-size: 18px; margin: clamp(36px, 4vw, 56px) 0 16px; letter-spacing: .08em; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ai); background: #fff; }
.tiles li + li { border-left: 2px solid var(--ai); }
.tile { position: relative; display: flex; flex-direction: column; height: 100%; padding: 22px 22px 22px; text-decoration: none; color: var(--ink); background: #fff; transition: background-color .25s; }
.tile:hover { background: var(--ai-l); }
.tile__il {
  width: 100%; max-width: 220px; aspect-ratio: 4 / 3; height: auto; margin: 0 auto 14px; padding: 8px;
  background-image:
    linear-gradient(rgba(47, 79, 162, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 79, 162, .1) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center;
  transition: transform .35s var(--ease);
}
.tile:hover .tile__il { transform: translateY(-4px); }
.tile__name { font-size: clamp(18px, .6vw + 14px, 23px); font-weight: 700; letter-spacing: .04em; padding-top: 12px; border-top: 1px solid var(--rule); }
.tile__days { display: block; margin: 4px 0 6px; font-size: 16px; transform-origin: left center; }
.tile__days b { font-size: clamp(30px, 1.2vw + 22px, 40px); line-height: 1.15; }
.tile__note { font-size: 13px; color: var(--sub); line-height: 1.6; padding-right: 26px; }
.tile__arw { position: absolute; right: 18px; bottom: 18px; font-family: var(--num); font-weight: 700; color: var(--ai); transition: transform .25s var(--ease); }
.tile:hover .tile__arw { transform: translateX(4px); }
.hero__note { font-size: 13px; color: var(--sub); margin: 12px 0 0; }
.hero__free { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 20px 0 0; padding: 16px 22px; background: var(--ai-l); font-weight: 700; font-size: clamp(16px, .4vw + 14px, 18px); }
.hero__tel { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-family: var(--num); font-size: 24px; }
.hero__tel svg { width: 22px; height: 22px; color: var(--ai); }

@media (max-width: 1023px) {
  .hero__lead { grid-template-columns: 1fr; gap: 18px; }
  .hero__p { padding-left: 18px; white-space: normal; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles li + li { border-left: 0; }
  .tiles li:nth-child(even) { border-left: 2px solid var(--ai); }
  .tiles li:nth-child(n+3) { border-top: 2px solid var(--ai); }
}
@media (max-width: 767px) {
  .br-s { display: inline; }
  .tile { padding: 14px 12px 16px; }
  .tile__il { margin-bottom: 8px; padding: 4px; }
  .tile__name { padding-top: 8px; font-size: 16.5px; letter-spacing: 0; }
  .tile__days { font-size: 13px; }
  .tile__days b { font-size: 27px; }
  .tile__note { font-size: 12px; padding-right: 0; }
  .tile__arw { display: none; }
  .hero__free { padding: 14px 16px; }
}

/* ---------- 事務所のこと ---------- */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.about__art { aspect-ratio: 1; background: #fff; border: 1px solid var(--rule); display: grid; place-items: center;
  background-image: linear-gradient(rgba(47, 79, 162, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 79, 162, .1) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center; }
.about__art svg { width: 72%; height: auto; }
.about__letter { max-width: 40em; font-size: clamp(15.5px, .3vw + 14.5px, 17.5px); line-height: 2; }
@media (max-width: 767px) {
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about__art { width: 160px; }
  .about__txt { order: -1; }
  .about__art { order: 0; }
}

/* ---------- トップの建設業許可 ---------- */
.ken { background: rgba(255, 255, 255, .7); }
.ken__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 56px; align-items: start; margin-bottom: 32px; }
.ken__head .sh { margin: 0; }
@media (max-width: 1023px) { .ken__head { grid-template-columns: 1fr; } }

/* ---------- 表 ---------- */
.tbl { background: #fff; }
.tbl__cap { font-size: 13px; color: var(--sub); margin: 0 0 10px; }
.tbl table { border-top: 2px solid var(--ai); border-bottom: 2px solid var(--ai); }
.tbl thead th { background: var(--ai-l); color: var(--ai-d); font-size: 13px; letter-spacing: .08em; text-align: left; padding: 10px 16px; font-weight: 700; border-bottom: 1px solid var(--ai); }
.tbl tbody th, .tbl tbody td { padding: 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.65; }
.tbl tbody tr:first-child th, .tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody th { font-weight: 700; }
.tbl td.money { white-space: nowrap; font-weight: 700; }
.tbl td.money > span { white-space: nowrap; }
.tbl td.money b { font-family: var(--num); font-size: 18px; font-weight: 700; }
@media (max-width: 767px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl table, .tbl tbody, .tbl tr, .tbl tbody th, .tbl tbody td { display: block; }
  .tbl tbody tr { padding: 14px 2px; border-top: 1px solid var(--rule); }
  .tbl tbody tr:first-child { border-top: 0; }
  .tbl tbody th, .tbl tbody td { padding: 0; border: 0; }
  .tbl tbody th { font-size: 16px; margin-bottom: 6px; }
  .tbl tbody td { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; font-size: 14.5px; }
  .tbl tbody td::before { content: attr(data-label); font-size: 12px; color: var(--sub); padding-top: .2em; }
  .tbl td.money { white-space: normal; }
}

/* トップの報酬: 左に見出し、右に表 */
.fee { display: grid; grid-template-columns: 300px 1fr; gap: 24px clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 1023px) { .fee { grid-template-columns: 1fr; } }

/* ---------- ご依頼の流れ（トップ・横に4つ） ---------- */
.flow { background: var(--ai-l); background-image: none; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; position: relative; }
.steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px 26px; background: #fff; border: 2px solid var(--ai); }
.steps li + li { border-left: 0; }
.steps li + li::before { content: ""; position: absolute; left: -9px; top: 50px; width: 14px; height: 14px; background: #fff; border-top: 2px solid var(--ai); border-right: 2px solid var(--ai); transform: rotate(45deg); }
.steps__il { width: 48px; height: 48px; margin-bottom: 4px; }
.steps__no { position: absolute; right: 18px; top: 16px; font-family: var(--num); font-weight: 700; font-size: 34px; line-height: 1; color: var(--shu); }
.steps b { font-size: 17px; letter-spacing: .03em; }
.steps li > span:last-child { font-size: 14.5px; color: var(--sub); line-height: 1.7; }
@media (max-width: 1023px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-left: 2px solid var(--ai); }
  .steps li:nth-child(n+3) { border-top: 0; }
  .steps li:nth-child(3)::before { display: none; }
}
@media (max-width: 599px) {
  .steps { grid-template-columns: 1fr; }
  .steps li { border-left: 2px solid var(--ai) !important; padding: 18px 18px 20px 82px; min-height: 96px; }
  .steps li + li { border-top: 0; }
  .steps li + li::before { display: block !important; left: 26px; top: -9px; transform: rotate(135deg); }
  .steps__il { position: absolute; left: 18px; top: 20px; width: 44px; height: 44px; }
  .steps__no { font-size: 26px; top: 14px; right: 14px; }
  .steps b { padding-right: 28px; }
}

/* ---------- よく聞かれること ---------- */
.faq { display: grid; grid-template-columns: 300px 1fr; gap: 16px clamp(32px, 5vw, 72px); align-items: start; }
.qa { border-top: 2px solid var(--ai); }
.qa__item { padding: 22px 0; border-bottom: 1px solid var(--rule); }
.qa dt { font-weight: 700; font-size: clamp(16px, .3vw + 15px, 18px); margin-bottom: 8px; }
.qa dd { color: var(--ink); }
.qa--qa dt, .qa--qa dd { display: grid; grid-template-columns: 2.2em 1fr; }
.qa__q, .qa__a { font-family: var(--num); font-weight: 700; color: var(--ai); }
.qa__a { color: var(--sub); }
@media (max-width: 1023px) { .faq { grid-template-columns: 1fr; } }

/* ---------- 紙（書類の形。右上の角が折れている） ---------- */
.paper {
  position: relative; background: #fff; border: 1px solid var(--ai-m); padding: clamp(28px, 4vw, 52px);
  box-shadow: 6px 6px 0 var(--ai-l);
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}
.paper::before { content: ""; position: absolute; top: -1px; right: -1px; width: 34px; height: 34px; background: linear-gradient(225deg, transparent 50%, var(--ai-l) 50%); border-left: 1px solid var(--ai-m); border-bottom: 1px solid var(--ai-m); }
.paper--memo { max-width: 860px; }
.info { display: grid; border-top: 2px solid var(--ai); }
.info > div { display: grid; grid-template-columns: 8em 1fr; border-bottom: 1px solid var(--rule); }
.info dt { padding: 14px 16px; background: var(--ai-l); font-weight: 700; font-size: 14px; color: var(--ai-d); }
.info dd { padding: 14px 18px; }
.office .paper { max-width: 900px; }
@media (max-width: 599px) {
  .info > div { grid-template-columns: 1fr; }
  .info dt { padding: 8px 12px; }
  .info dd { padding: 10px 12px 14px; }
}

/* ---------- 下層: パンくずとページの頭 ---------- */
.crumb { padding-top: 18px; font-size: 13px; color: var(--sub); }
.crumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; }
.crumb li + li::before { content: "›"; margin: 0 10px; color: var(--gray); }
.crumb a { color: var(--sub); }
.ph { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(28px, 4vw, 56px) clamp(48px, 5vw, 80px); border-bottom: 1px solid var(--rule); }
.ph .sh { margin-bottom: 26px; }
.ph .sh__doc { width: 26px; height: 31px; }
.ph__body { font-size: clamp(15.5px, .3vw + 14.5px, 18px); line-height: 1.95; max-width: 34em; }
.ph__art { background: #fff; border: 2px solid var(--ai); padding: 18px;
  background-image: linear-gradient(rgba(47, 79, 162, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 79, 162, .1) 1px, transparent 1px);
  background-size: 24px 24px; background-position: center; }
.ph__il { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.ph--flow { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 0; }
@media (max-width: 767px) {
  .ph { grid-template-columns: 1fr; }
  .ph__art { order: -1; max-width: 320px; padding: 10px; }
}
.lead2 { max-width: 44em; margin-bottom: 32px; }
.endcta { display: flex; flex-wrap: wrap; gap: 14px; padding-block: 8px clamp(64px, 7vw, 104px); }

/* 箇条書き（条件）: 群青の小さな四角 */
.dots { margin: 0 0 1em; }
.dots li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px dashed var(--rule); }
.dots li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 8px; height: 8px; background: var(--ai); }
.cond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px clamp(32px, 4vw, 64px); align-items: start; }
@media (max-width: 1023px) { .cond { grid-template-columns: 1fr; } }

.tbl--4 td:nth-child(2) { min-width: 12em; }
@media (min-width: 768px) and (max-width: 1023px) {
  .tbl--4 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl--4 table, .tbl--4 tbody { display: block; }
  .tbl--4 tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 20px; padding: 16px 4px; border-top: 1px solid var(--rule); }
  .tbl--4 tbody tr:first-child { border-top: 0; }
  .tbl--4 tbody th { grid-column: 1 / -1; padding: 0; border: 0; font-size: 16px; }
  .tbl--4 tbody td { padding: 0; border: 0; min-width: 0 !important; }
  .tbl--4 tbody td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--sub); }
}

/* 飲食店: 開店までの流れ（文と図を並べる） */
.open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 4vw, 64px); align-items: start; }
.when { margin: 0 0 1.2em; border-top: 2px solid var(--ai); }
.when li { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.when__k { font-weight: 700; color: var(--ai-d); }
.when__k .num b { font-size: 1.15em; }
.night { background: var(--ai-l); }
.night__in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px clamp(32px, 4vw, 64px); align-items: center; }
@media (max-width: 1023px) { .open, .night__in { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .when li { grid-template-columns: 1fr; gap: 2px; } }

.order { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px clamp(32px, 4vw, 64px); align-items: start; }
.order__txt { position: sticky; top: 24px; }
.will { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px clamp(32px, 4vw, 64px); align-items: start; }
@media (max-width: 1023px) { .order, .will { grid-template-columns: 1fr; } .order__txt { position: static; } }

/* ---------- ご依頼の流れ（/flow/・縦） ---------- */
.vflow { position: relative; max-width: 900px; }
.vflow li { display: grid; grid-template-columns: 96px 1fr; gap: 28px; position: relative; padding-bottom: 36px; }
.vflow li:not(:last-child)::before { content: ""; position: absolute; left: 47px; top: 92px; bottom: 6px; width: 2px; background: var(--ai); }
.vflow__mk { position: relative; width: 96px; height: 88px; border: 2px solid var(--ai); background: #fff; display: grid; place-items: center; }
.vflow__mk svg { width: 52px; height: 52px; }
.vflow__no { position: absolute; left: -2px; top: -2px; transform: translate(-40%, -40%); width: 38px; height: 38px; display: grid; place-items: center; background: #fff; border: 2px solid var(--shu); border-radius: 50%; font-family: var(--num); font-weight: 700; font-size: 20px; color: var(--shu); }
.vflow__tx { padding-top: 10px; }
.vflow__tx h3 { font-size: clamp(18px, .5vw + 16px, 22px); margin-bottom: 10px; }
.vflow__line { margin-top: 14px; padding: 14px 18px; border: 1px dashed var(--ai); background: #fff; font-size: 15px; }
.vflow__line a { font-weight: 700; margin-left: .8em; white-space: nowrap; }
@media (max-width: 599px) {
  .vflow li { grid-template-columns: 64px 1fr; gap: 18px; }
  .vflow__mk { width: 64px; height: 60px; }
  .vflow__mk svg { width: 38px; height: 38px; }
  .vflow li:not(:last-child)::before { left: 31px; top: 64px; }
  .vflow__no { width: 32px; height: 32px; font-size: 17px; }
  .vflow__tx { padding-top: 2px; }
  .vflow__line a { display: inline-block; margin: 6px 0 0; }
}

/* ---------- お問い合わせ ---------- */
.contact { display: grid; grid-template-columns: 340px 1fr; gap: 28px clamp(32px, 5vw, 72px); align-items: start; }
.sh--env { align-items: center; }
.contact__env { width: 64px; height: 48px; flex: none; }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-weight: 700; font-size: 15px; padding: 0; }
.req { display: inline-block; margin-left: 10px; padding: 0 7px; font-size: 11px; line-height: 1.7; color: #fff; background: var(--ai); letter-spacing: .08em; vertical-align: 2px; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--ai-m); border-bottom: 2px solid var(--ai); border-radius: 0; padding: 12px 14px; min-height: 50px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ai) 50%), linear-gradient(135deg, var(--ai) 50%, transparent 50%); background-position: right 20px center, right 14px center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ai); outline-offset: 0; }
.radios { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 4px; }
.radios label, .field--agree label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
.radios input, .field--agree input { width: 20px; height: 20px; accent-color: var(--ai); margin: 0; flex: none; }
.form.is-checked :invalid { border-color: var(--shu); }
.form__send { margin: 6px 0 0; }
@media (max-width: 1023px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 599px) { .btn--l { width: 100%; min-width: 0; } }

/* ---------- フッター ---------- */
.ft { background: #fff; border-top: 2px solid var(--ai); padding: 40px 0 0; }
.ft__in { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: start; padding-bottom: 32px; }
.ft .logo { width: 250px; }
.ft__addr { margin: 14px 0 0; font-size: 14px; color: var(--sub); }
.ft__addr a { color: var(--ink); text-decoration: none; font-family: var(--num); font-weight: 700; }
.ft__nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: end; gap: 10px 32px; font-size: 14px; }
.ft__nav a { color: var(--ink); text-decoration: none; }
.ft__nav a:hover { color: var(--ai); text-decoration: underline; }
.ft__copy { margin: 0 auto; padding: 16px 0 28px; border-top: 1px solid var(--rule); color: var(--sub); font-size: 12px; }
@media (max-width: 1023px) {
  .ft__in { grid-template-columns: 1fr; }
  .ft__nav { justify-content: start; grid-template-columns: repeat(2, auto); }
}
@media (max-width: 420px) { .ft__nav { grid-template-columns: 1fr; } .ft .logo { width: 214px; } }

/* =================================================================
   図解（地は24px角の方眼・群青10%）
   ================================================================= */
.dg {
  position: relative; background-color: #fff; border: 2px solid var(--ai); padding: clamp(20px, 3vw, 36px);
  background-image: linear-gradient(rgba(47, 79, 162, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(47, 79, 162, .1) 1px, transparent 1px);
  background-size: 24px 24px;
}
.dg__ttl { display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .06em; color: #fff; background: var(--ai); padding: 4px 12px; margin: calc(-1 * clamp(20px, 3vw, 36px)) 0 22px calc(-1 * clamp(20px, 3vw, 36px)); }
.dg__note { font-size: 13px; color: var(--sub); margin: 14px 0 0; }

/* 判子「済」: 朱の丸（直径40px・線2px） */
.stamp { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--shu); border-radius: 50%; color: var(--shu); font-weight: 700; font-size: 19px; line-height: 1; flex: none; transform: rotate(-10deg); background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(224, 83, 61, .55); }
.stamp span { transform: translateY(-1px); }

/* G-1 建設業許可を取るまでの流れ */
.g1__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 28px; }
.g1__st { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.g1__st + .g1__st::before { content: ""; position: absolute; left: -24px; top: 66px; width: 20px; height: 2px; background: var(--ai); }
.g1__st + .g1__st::after { content: ""; position: absolute; left: -12px; top: 61px; width: 10px; height: 10px; border-top: 2px solid var(--ai); border-right: 2px solid var(--ai); transform: rotate(45deg); }
.g1__no { font-family: var(--num); font-weight: 700; font-size: 26px; line-height: 1; color: var(--shu); }
.g1__box { display: flex; flex-direction: column; gap: 4px; min-height: 108px; padding: 14px 14px; background: #fff; border: 2px solid var(--ai); }
.g1__box b { font-size: 16px; letter-spacing: .02em; }
.g1__box span { font-size: 13px; color: var(--sub); line-height: 1.6; }
.g1__st:nth-child(4) .g1__box { background: var(--ai-l); }
.g1__d { font-size: 15px; font-weight: 700; color: var(--shu); border-top: 2px solid var(--shu); padding-top: 6px; min-height: 46px; }
.g1__d b { font-family: var(--num); font-size: 24px; }
.g1__d--end { border-top-color: transparent; padding-top: 2px; }
.g1__band { margin: 22px 0 0; padding: 14px 20px; background: var(--ai); color: #fff; font-weight: 700; font-size: 17px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.g1__band .num { color: #fff; }
.g1__band .num b { font-size: 30px; }
.g1--s .g1__box { min-height: 96px; padding: 12px; }
.g1--s .g1__box b { font-size: 15px; }
@media (max-width: 1023px) {
  .g1__list { grid-template-columns: 1fr; gap: 22px; }
  .g1__st { display: grid; grid-template-columns: 34px 1fr 7.5em; align-items: center; gap: 12px; }
  .g1__st + .g1__st::before { left: 51px; top: -20px; width: 2px; height: 18px; }
  .g1__st + .g1__st::after { left: 47px; top: -12px; transform: rotate(135deg); }
  .g1__box, .g1--s .g1__box { min-height: 0; }
  .g1__d { border-top: 0; border-left: 2px solid var(--shu); padding: 2px 0 2px 10px; min-height: 0; }
  .g1__d--end { border-left-color: transparent; }
}
@media (max-width: 479px) {
  .g1__st { grid-template-columns: 26px 1fr 5.6em; gap: 8px; }
  .g1__no { font-size: 22px; }
  .g1__st + .g1__st::before { left: 41px; }
  .g1__st + .g1__st::after { left: 37px; }
  .g1__d { font-size: 13px; padding-left: 8px; }
  .g1__d b { font-size: 21px; }
  .g1__band { font-size: 15px; padding: 12px 14px; }
  .g1__band .num b { font-size: 26px; }
}

/* G-2 報酬の表 */
.g2 { margin-top: 24px; }
.g2__t thead th { text-align: left; font-size: 13px; letter-spacing: .08em; color: var(--ai-d); padding: 8px 14px; border-bottom: 2px solid var(--ai); }
.g2__band th { text-align: left; background: var(--ai); color: #fff; font-size: 14px; letter-spacing: .1em; padding: 6px 14px; }
.g2__t tbody tr:not(.g2__band) { background: rgba(255, 255, 255, .92); }
.g2__t tbody tr:not(.g2__band) th, .g2__t tbody tr:not(.g2__band) td { padding: 14px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; font-size: 15px; }
.g2__t tbody th { font-weight: 700; }
.g2__fee { width: 11em; }
.g2__fee .num b { font-size: 22px; }
.g2__t td:last-child { width: 15em; color: var(--sub); }
.g2__t td:last-child .num b { font-size: 17px; }
.g2__grp + .g2__grp .g2__band th { border-top: 14px solid transparent; background-clip: padding-box; }
.g2__foot { margin: 18px 0 0; padding: 12px 16px; border: 2px solid var(--ai); background: #fff; font-weight: 700; display: inline-block; }
@media (max-width: 767px) {
  .g2__t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .g2__t, .g2__t tbody, .g2__t tr, .g2__t th, .g2__t td { display: block; width: auto !important; }
  .g2__grp + .g2__grp .g2__band th { border-top: 0; }
  .g2__grp + .g2__grp { margin-top: 16px; }
  .g2__t tbody tr:not(.g2__band) { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 12px 14px; border-bottom: 1px solid var(--rule); }
  .g2__t tbody tr:not(.g2__band) th { grid-column: 1 / -1; padding: 0; border: 0; font-size: 15px; }
  .g2__t tbody tr:not(.g2__band) td { padding: 0; border: 0; font-size: 13.5px; }
  .g2__t td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--sub); letter-spacing: .04em; }
  .g2__fee .num b { font-size: 21px; }
}

/* G-3 許可を取るための条件（チェック表） */
.g3__t { background: rgba(255, 255, 255, .92); border-top: 2px solid var(--ai); border-bottom: 2px solid var(--ai); }
.g3__t thead th { text-align: left; font-size: 12.5px; color: var(--ai-d); letter-spacing: .08em; padding: 8px 12px; border-bottom: 1px solid var(--ai); }
.g3__t tbody th, .g3__t tbody td { padding: 14px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; font-size: 15px; line-height: 1.6; }
.g3__t tbody th { font-weight: 700; }
.g3__t tbody td:last-child { color: var(--sub); font-size: 14px; width: 40%; }
.g3__box { width: 52px; }
.g3__sq { display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--ai); background: #fff; }
.g3__sq svg { width: 22px; height: 22px; color: var(--ai); }
.g3__ok { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin: 18px 0 0; font-weight: 700; font-size: 17px; }
.g3__ok .stamp { width: 52px; height: 52px; font-size: 24px; }
@media (max-width: 599px) {
  .g3__t thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .g3__t tbody tr { display: grid; grid-template-columns: 40px 1fr; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .g3__t tbody th, .g3__t tbody td { display: block; padding: 0; border: 0; width: auto !important; }
  .g3__box { grid-row: span 2; }
  .g3__t tbody td:last-child { font-size: 13.5px; margin-top: 4px; }
  .g3__t tbody td:last-child::before { content: attr(data-label) "："; }
}

/* G-4 飲食店の開店までの流れ（縦の時間の線） */
.g4__line { position: relative; display: grid; gap: 0; }
.g4__line::before { content: ""; position: absolute; left: calc(9.5em + 13px); top: 14px; bottom: 14px; width: 2px; background: var(--ai); }
.g4__line li { display: grid; grid-template-columns: 9.5em 28px 1fr; gap: 0 14px; align-items: center; padding: 14px 0; }
.g4__when { font-weight: 700; font-size: 14px; color: var(--ai-d); text-align: right; line-height: 1.5; }
.g4__when .num b { font-size: 20px; }
.g4__dot { position: relative; width: 18px; height: 18px; margin-left: 5px; border: 2px solid var(--ai); background: #fff; border-radius: 50%; }
.g4__line li:first-child .g4__dot { background: var(--ai); }
.g4__what { background: #fff; border: 2px solid var(--ai); padding: 10px 14px; font-weight: 700; font-size: 15px; }
.g4__br { display: grid; gap: 8px; padding: 18px; background: #fff; border: 2px dashed var(--ai); }
.g4__brlab { font-weight: 700; color: var(--ai-d); }
.g4__brwhen { font-size: 15px; }
.g4__brwhen .num b { font-size: 26px; }
@media (max-width: 479px) {
  .g4__line::before { left: 8px; }
  .g4__line li { grid-template-columns: 18px 1fr; gap: 4px 12px; align-items: start; }
  .g4__dot { grid-column: 1; grid-row: 1; margin: 3px 0 0; }
  .g4__when { grid-column: 2; grid-row: 1; text-align: left; }
  .g4__what { grid-column: 2; }
}

/* G-5 在留期間の更新（横の時間の線） */
.g5__chart { position: relative; padding: 44px 0 40px; }
.g5__axis { position: relative; height: 56px; }
.g5__axis::before { content: ""; position: absolute; left: 0; right: 6%; top: 50%; height: 2px; background: var(--ai); }
.g5__axis::after { content: ""; position: absolute; left: 0; top: calc(50% - 6px); width: 2px; height: 14px; background: var(--ai); }
.g5__range { position: absolute; left: 34%; right: 6%; top: 0; bottom: 0; display: grid; place-items: center; background: var(--ai-l); border-left: 2px dashed var(--ai); transform-origin: right center; }
.g5__range span { position: relative; z-index: 1; font-weight: 700; color: var(--ai-d); font-size: 15px; padding: 2px 10px; background: var(--ai-l); }
.g5__tick { display: none; }
.g5__end { position: absolute; right: 6%; top: 50%; width: 20px; height: 20px; margin: -10px -10px 0 0; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 5px rgba(224, 83, 61, .18); }
.g5__from { position: absolute; left: 34%; top: 4px; transform: translateX(-50%); font-weight: 700; font-size: 15px; white-space: nowrap; }
.g5__from .num b { font-size: 22px; }
.g5__endlab { position: absolute; right: 0; bottom: 2px; font-weight: 700; font-size: 14px; color: var(--shu); }
@media (max-width: 599px) {
  .g5__range { left: 18%; }
  .g5__from { left: 18%; transform: translateX(-30%); }
  .g5__range span { font-size: 13px; padding: 2px 4px; }
}

/* G-6 相続の手続きの順番と担当 */
.g6__key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; font-size: 14px; font-weight: 700; }
.g6__key li { display: inline-flex; align-items: center; gap: 8px; }
.g6__sw { width: 18px; height: 18px; border: 2px solid var(--ai); }
.g6__sw--gs { background: var(--ai); }
.g6__sw--ss { background: var(--gray); border-color: var(--gray); }
.g6__sw--zs { background: var(--shu-l); border-color: var(--shu); }
.g6__sw--fam { background: #fff; border-style: dashed; }
.g6__list { display: grid; gap: 22px; }
.g6__st { position: relative; display: grid; grid-template-columns: 6.5em 1fr; background: #fff; border: 2px solid var(--ai); }
.g6__st + .g6__st::before { content: ""; position: absolute; left: calc(6.5em + 30px); top: -22px; width: 2px; height: 20px; background: var(--ai); }
.g6__st + .g6__st::after { content: ""; position: absolute; left: calc(6.5em + 26px); top: -12px; width: 10px; height: 10px; border-right: 2px solid var(--ai); border-bottom: 2px solid var(--ai); transform: rotate(45deg); }
.g6__who { display: grid; place-items: center; font-size: 13px; font-weight: 700; padding: 8px 4px; color: #fff; background: var(--ai); letter-spacing: .04em; }
.g6__what { display: block; padding: 12px 16px; font-weight: 700; font-size: 15px; line-height: 1.6; }
.g6__no { font-family: var(--num); font-weight: 700; color: var(--ai); margin-right: .6em; }
.g6__ex { display: block; font-weight: 400; font-size: 14px; color: var(--sub); }
.g6__ex .num b { font-size: 20px; }
.g6--ss { border-color: var(--gray); }
.g6--ss .g6__who { background: var(--gray); }
.g6--zs { border-color: var(--shu); }
.g6--zs .g6__who { background: var(--shu-l); color: #9E2E1C; }
.g6--fam { border-style: dashed; }
.g6--fam .g6__who { background: #fff; color: var(--ai-d); border-right: 2px dashed var(--ai); }
@media (max-width: 479px) {
  .g6__st { grid-template-columns: 5.2em 1fr; }
  .g6__st + .g6__st::before { left: calc(5.2em + 24px); }
  .g6__st + .g6__st::after { left: calc(5.2em + 20px); }
  .g6__who { font-size: 12px; }
  .g6__what { padding: 10px 12px; font-size: 14.5px; }
}

/* =================================================================
   動き（JS がクラスを付けたときだけ隠す。reduced-motion ではクラスが付かない）
   ================================================================= */
/* 最初の画面: 読み込み時に順に置かれる */
html.js .ld { animation: put .7s var(--ease) both; animation-delay: calc(var(--i, 0) * .08s + .05s); }
html.js .tile__days.press { animation: press .5s var(--press) both; animation-delay: calc(var(--i, 0) * .08s + .55s); }
@keyframes put { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes press { 0% { opacity: 0; transform: scale(1.45); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

/* 見えたら出す */
html.js .rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .rv.is-in { opacity: 1; transform: none; }
html.js [data-in] .st { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: calc(var(--i, 0) * .13s); }
html.js [data-in].is-in .st { opacity: 1; transform: none; }
/* 判子は最後に押す */
html.js [data-in] .stamp { opacity: 0; transform: scale(1.9) rotate(-28deg); transition: transform .38s var(--press), opacity .12s linear; transition-delay: .85s; }
html.js [data-in].is-in .stamp { opacity: 1; transform: rotate(-10deg); }
/* G-3: 上から順にチェックが入り、最後に判子 */
html.js .g3 .g3__sq svg { opacity: 0; transform: scale(.3); transition: transform .3s var(--press), opacity .2s; transition-delay: calc(var(--i, 0) * .16s + .2s); }
html.js .g3.is-in .g3__sq svg { opacity: 1; transform: none; }
html.js .g3 .stamp { transition-delay: 1.15s; }
/* G-5: 申請できる範囲が期限の側から広がる */
html.js .g5 .g5__range { transform: scaleX(0); transition: transform .9s var(--ease) .2s; }
html.js .g5.is-in .g5__range { transform: none; }
/* 図の数字（朱）も押したように */
html.js [data-in] .g1__d .num, html.js [data-in] .g2__fee .num { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
