/* 続共通の見た目 v3（design.md・最初の画面 案B 朱。字の大きさは rem。ふつう 16px＝1rem、「大きく」で html を 125% にする） */
:root {
  --ink: #1F1A17; --sub: #4A4440; --paper: #F6F2EA; --white: #FFFFFF;
  --ac: #C4462B; --pale: #F8E6E0; --line: rgba(31,26,23,.16); --line2: rgba(31,26,23,.28);
  --ease: cubic-bezier(.22,1,.36,1); --shadow: 0 2px 8px rgba(31,26,23,.08);
}
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html.big { font-size: 125%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: "Archivo", "M PLUS 1", sans-serif; font-size: 1.25rem; line-height: 1.8; font-weight: 400;
  overflow-wrap: anywhere; word-break: auto-phrase;
}
a { color: inherit; text-underline-offset: 4px; }
/* 電話番号は途中で割らない */
.nowrap, a.tel-inline[href^="tel:"], .tel-num, .foot-tel a, a[href^="tel:"] .nb { white-space: nowrap; }
img, svg { max-width: 100%; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
input, button, select, textarea { font-family: inherit; font-size: 1.125rem; }
::placeholder { color: var(--sub); opacity: 1; }
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 語の途中で折らない（Chrome は文節で折る。ほかは keep-all と <wbr>） */
h1, h2, h3, .btn, .btn2, .door-title, .card-title, .nobr, .tagline, .q-title {
  word-break: keep-all; word-break: auto-phrase; overflow-wrap: anywhere; line-break: strict;
}
.nb { display: inline-block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }   /* 中身 1120px＋左右 40px */
.narrow { max-width: 800px; }                                     /* 本文の段 720px＋左右 40px */
.skip { position: absolute; left: 8px; top: -200px; background: var(--white); padding: 8px 16px; font-size: 1.125rem; z-index: 30; }
.skip:focus { top: 8px; }
/* 見た目には出さず、読み上げだけに出す */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ===== 上の帯 ===== */
.top { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; min-height: 80px; padding-top: 8px; padding-bottom: 8px; }
.sitename { text-decoration: none; min-height: 48px; display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.sitename b { font-size: 1.625rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.sitename small { font-size: 1.125rem; color: var(--sub); }
.sitename b .sn { font-size: 2.25rem; line-height: 1.1; }
.top-right { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.tel { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 48px; white-space: nowrap; }
.tel .ic { width: 28px; height: 28px; }
.tel-label { font-size: 1.125rem; color: var(--sub); }
.tel-num { font-family: "Archivo", sans-serif; font-size: 1.5rem; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.tel-sp { display: none; }
.size { display: flex; align-items: center; gap: 8px; }
.size-label { font-size: 1.125rem; white-space: nowrap; color: var(--sub); }
.size button, .size-sp {
  font-family: inherit; font-size: 1.125rem; font-weight: 500; line-height: 1.4;
  min-height: 48px; min-width: 72px; padding: 0 14px; white-space: nowrap;
  background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 8px; cursor: pointer;
  transition: background .2s var(--ease);
}
.size button:hover, .size-sp:hover { background: var(--paper); }
.size button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.size-sp { display: none; }
/* おもな入口（PC） */
.gnav { border-top: 1px solid var(--line); }
.gnav ul { list-style: none; margin: 0 auto; padding: 0 40px; max-width: 1200px; display: flex; justify-content: center; flex-wrap: wrap; gap: 0 48px; }
.gnav a { display: flex; align-items: center; gap: 10px; min-height: 56px; text-decoration: none; font-size: 1.125rem; font-weight: 500; position: relative; }
.gnav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ac); transform: scaleX(0); transition: transform .2s var(--ease); }
.gnav a:hover::after, .gnav a[aria-current]::after { transform: scaleX(1); }
/* 下のタブ（スマホ） */
.tabbar { display: none; }

/* 見本の帯 */
.sample { background: var(--paper); border-bottom: 1px solid var(--line); }
.sample p { margin: 0; padding: 8px 0; font-size: 1.125rem; line-height: 1.6; }

/* ===== 下の帯 ===== */
.foot { margin-top: 112px; border-top: 1px solid var(--line); background: var(--paper); }
.foot .wrap { padding-top: 48px; padding-bottom: 56px; }
.foot-tel { margin: 0; font-size: 1.25rem; }
.foot-tel a { font-family: "Archivo", "M PLUS 1", sans-serif; font-weight: 600; font-size: 1.375rem; color: var(--ink); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 48px; border-bottom: 2px solid var(--ac); }
.foot-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 500; }
.foot-note { margin: 16px 0 0; font-size: 1.125rem; color: var(--sub); }

/* ===== 文字 ===== */
h1 { font-size: 2.25rem; font-weight: 500; line-height: 1.5; letter-spacing: .04em; margin: 0; }
h1.mincho { font-size: 3rem; }
h2 { font-size: 1.75rem; font-weight: 500; line-height: 1.6; letter-spacing: .02em; margin: 0; }
h3 { font-size: 1.375rem; font-weight: 700; line-height: 1.5; margin: 0; }
p { margin: 16px 0 0; }
.sub { color: var(--sub); }
.small { font-size: 1.125rem; }
.lead { margin: 16px 0 0; max-width: 720px; color: var(--sub); }
.measure { max-width: 720px; }
/* 段の見出しの頭に朱の短い線 */
.section h2::before, .band h2::before { content: ""; display: block; width: 40px; height: 2px; background: var(--ac); margin-bottom: 12px; }

/* ===== ページの頭（細い線＋朱の小さな印＋小さな線画。一度だけ左から引かれる） ===== */
main.page > .wrap:first-child::before {
  content: ""; display: block; height: 48px; margin-bottom: 24px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect width='12' height='12' rx='2' fill='%23C4462B'/%3E%3C/svg%3E") left 0 bottom 0 / 12px 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='48' viewBox='0 0 240 48' fill='none' stroke='%231F1A17' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' opacity='.5'%3E%3Cpath d='M10 47V31L26 19L42 31V47M60 47V23H120V47M56 23L90 9L124 23M84 9V3H96V9M140 47V33L152 23L164 33V47M176 47V29H200V47M172 29L188 19L204 29M216 47V35M216 36C206 36 204 22 216 18C228 22 226 36 216 36'/%3E%3C/svg%3E") right 0 bottom 0 / 240px 48px no-repeat,
    linear-gradient(var(--line2), var(--line2)) left 0 bottom 5px / 100% 1px no-repeat;
  animation: headdraw 1.2s var(--ease) both;
}
@keyframes headdraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ===== 段 ===== */
.page { padding-top: 40px; }
.section { margin-top: 112px; }
.band { background: var(--paper); padding: 112px 0; margin-top: 112px; }
.band + .band { margin-top: 0; }

/* ===== ボタン ===== */
.btn, .btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; text-align: center;
  min-height: 56px; padding: 8px 28px; font-family: inherit; font-size: 1.375rem; font-weight: 700; line-height: 1.5;
  border-radius: 8px; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.btn { background: var(--ink); color: var(--white); border: 2px solid var(--ink); }
.btn2 { background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); }
.btn:hover { background: #3A322D; border-color: #3A322D; }
.btn2:hover { background: var(--paper); }
.btn:active, .btn2:active { transform: scale(.98); }
.btn2[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; align-items: center; }
.textlink { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; font-size: 1.25rem; background: none; border: 0; padding: 0; font-family: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ac); text-decoration-thickness: 2px; cursor: pointer; }
.tel-inline { display: inline-flex; align-items: center; min-height: 48px; font-family: "Archivo", "M PLUS 1", sans-serif; font-weight: 600; }
.arrow { flex: 0 0 auto; width: 28px; height: 18px; }

/* ===== 箱 ===== */
.fit { background: var(--pale); border-radius: 8px; padding: 16px 20px; margin: 16px 0 0; }
.fit-label { display: block; font-weight: 700; font-size: 1.125rem; }
.safe { background: var(--paper); border-radius: 8px; padding: 16px 24px; margin: 24px 0 0; }
.note { border: 1.5px solid var(--ink); border-radius: 8px; padding: 16px 24px; margin: 16px 0 0; }
.note-label { display: block; font-weight: 700; }
.err { border: 2px solid var(--ac); border-radius: 8px; padding: 16px 24px; margin: 16px 0 0; font-weight: 700; background: var(--white); }
.err::before { content: "ご確認ください："; color: var(--ac); }

/* 写真の枠（写真はまだ無い。淡い地＋小さな線画＋説明） */
.photo {
  aspect-ratio: 16 / 9; border-radius: 12px; margin: 0;
  background: var(--pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='64' viewBox='0 0 160 64' fill='none' stroke='%23C4462B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 62H156M14 62V40L36 24L58 40V62M70 62V30H130V62M66 30L100 12L134 30M94 12V4H106V12M30 62V50H42V62'/%3E%3C/svg%3E") center bottom 24px / 160px 64px no-repeat;
  display: flex; align-items: center; justify-content: center; padding: 24px 24px 104px; text-align: center;
  font-size: 1.125rem; color: var(--sub);
}
.photo.r32 { aspect-ratio: 3 / 2; }

/* ===== 仕事のカード ===== */
.cards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 24px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--white); display: flex; flex-direction: column;
  
}
.card-title { font-size: 1.375rem; font-weight: 700; line-height: 1.5; margin: 0; }
.card-new { align-self: flex-start; display: inline-block; font-size: 1.125rem; font-weight: 700; color: var(--ink); background: var(--pale); border-radius: 4px; padding: 0 10px; margin-bottom: 8px; }
.facts { margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.facts dt { font-weight: 700; color: var(--sub); }
.facts dd { margin: 0; }
.cards.three .facts { grid-template-columns: 1fr; gap: 0; }
.cards.three .facts dd { margin-bottom: 8px; }
.card .btn-row { margin-top: auto; padding-top: 24px; }
.card .btn2 { padding: 8px 20px; }

/* ===== 入力 ===== */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.q-title { font-size: 1.75rem; font-weight: 500; line-height: 1.6; margin: 0; }
.field { margin-top: 32px; }
.field > label, .field-label { display: block; font-weight: 700; margin-bottom: 8px; }
.need-mark { display: inline-block; margin-left: 8px; font-size: 1.125rem; border: 1.5px solid var(--ac); color: var(--ac); background: var(--white); border-radius: 4px; padding: 0 8px; line-height: 1.5; }
input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%; max-width: 720px; font-family: inherit; font-size: 1.25rem; line-height: 1.6; color: var(--ink);
  padding: 12px 16px; min-height: 56px; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white);
  transition: box-shadow .2s var(--ease);
}
input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, textarea:focus { box-shadow: 0 0 0 3px var(--pale); }
textarea { min-height: 160px; }
.opts { display: grid; gap: 12px; margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.opts.one { grid-template-columns: 1fr; max-width: 720px; }
.opt {
  display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 20px;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--white); cursor: pointer; font-weight: 500; line-height: 1.5;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.opt:hover { background: var(--paper); }
.opt input { width: 28px; height: 28px; flex: none; margin: 0; accent-color: var(--ac); }
.opt:has(input:checked) { border-color: var(--ac); outline: 2px solid var(--ac); outline-offset: -3px; background: var(--pale); }
.opt:has(input:focus-visible) { outline: 4px solid var(--ink); outline-offset: 4px; }
.opt:has(input:disabled) { cursor: default; border-color: var(--line2); }
.opt input:focus-visible { outline: none; }

/* 進み具合 */
.progress { font-weight: 700; margin: 0 0 8px; }
.bar { height: 8px; background: var(--paper); border-radius: 4px; overflow: hidden; margin-bottom: 32px; max-width: 720px; }
.bar i { display: block; height: 100%; background: var(--ac); border-radius: 4px; transition: width .7s var(--ease); }

/* 一覧で直す */
.sum { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 800px; }
.sum li { border: 1px solid var(--line2); border-radius: 12px; padding: 16px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.sum .k { font-weight: 700; display: block; }
.sum .v { display: block; }
.sum .btn2 { padding: 8px 24px; }

/* 手順（番号つき） */
.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; }
.steps .n { width: 56px; height: 56px; border: 1.5px solid var(--ac); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "Archivo", sans-serif; font-weight: 500; font-size: 1.5rem; background: var(--white); }

/* 並べ替え */
.sortbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 24px; }
.sortbar .btn2 { padding: 4px 20px; min-height: 56px; }

/* 状態の歩み */
.track { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.track li { padding: 8px 16px; border-left: 4px solid var(--line2); }
.track li.done { border-left-color: var(--ink); }
.track li.now { border-left-color: var(--ac); background: var(--pale); font-weight: 700; }
.track .tag { font-size: 1.125rem; font-weight: 700; margin-right: 8px; display: inline-block; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0 8px; line-height: 1.5; }
.track li.now .tag { border-color: var(--ac); color: var(--ac); background: var(--white); }

/* 終わった画面 */
/* 絵（線画・3:2。地は絵と同じ生成りなので枠は線1本だけ） */
.fig { margin: 0; }
.fig img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border: 1px solid var(--line); border-radius: 12px; }
.fig-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; }
@media (max-width: 860px) { .fig-side { grid-template-columns: 1fr; gap: 24px; } }
.done-box { border: 1px solid var(--line2); border-top: 3px solid var(--ac); border-radius: 12px; padding: 24px; margin-top: 32px; max-width: 800px; }
dl.kv { margin: 16px 0 0; }
dl.kv dt { font-weight: 700; margin-top: 12px; }
dl.kv dd { margin: 0; }

/* ===== スマホ ===== */
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .page { padding-top: 24px; }
  .section { margin-top: 64px; }
  .band { padding: 64px 0; margin-top: 64px; }
  .foot { margin-top: 64px; }
  .foot .wrap { padding-top: 32px; padding-bottom: calc(40px + 80px + var(--nlb, 0px)); }
  h1 { font-size: 1.75rem; }
  h1.mincho { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .q-title { font-size: 1.5rem; }
  .cards.three { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .btn, .btn2 { padding: 8px 20px; }
  .btn-row > .btn, .btn-row > .btn2 { width: 100%; }
  .opts { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
  .fit, .safe, .note, .err { padding: 16px 20px; }
  .sum li { padding: 16px 20px; }
  .sum .btn2 { width: 100%; }
  .photo { aspect-ratio: 4 / 3; }
  .photo.r32 { aspect-ratio: 3 / 2; }
  main.page > .wrap:first-child::before { height: 40px; margin-bottom: 16px; background-size: 10px 10px, 200px 40px, 100% 1px; }

  /* 上の帯は1段: サイト名・電話・文字の大きさ */
  .top .wrap { flex-wrap: nowrap; gap: 8px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
  .sitename b { font-size: 1.25rem; letter-spacing: 0; }
  .sitename b .sn { font-size: 1.75rem; }
  .sitename small { display: none; }
  .top-right { gap: 8px; flex-wrap: nowrap; }
  .tel { display: none; }
  .gnav { display: none; }
  .tel-sp { display: none !important; }   /* 電話は下のタブにいつも出す（案B と同じ）。上の帯は幅が足りない */
  .tel-sp-old {
    display: inline-flex; align-items: center; justify-content: center; padding: 0 12px;
    min-height: 48px; font-size: 1.125rem; font-weight: 700; text-decoration: none; white-space: nowrap;
    border: 1.5px solid var(--ink); color: var(--ink); border-radius: 8px; background: var(--white);
  }
  .size { display: none; }
  .size-sp { display: inline-flex; align-items: center; padding: 0 12px; }
  html.big .top .wrap { flex-wrap: wrap; }

  .tabbar {
    display: grid; grid-template-columns: 1fr 1fr auto 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--white); border-top: 1px solid var(--line); padding-bottom: calc(env(safe-area-inset-bottom) + var(--nlb, 0px));
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; padding: 6px 2px;
    font-size: 1.125rem; line-height: 1.2; color: var(--ink); text-decoration: none; white-space: nowrap;
  }
  .tabbar .ic { width: 26px; height: 26px; }
  .tabbar a[aria-current] .ic { stroke: var(--ac); stroke-width: 2; }
  .tabbar a[aria-current] { font-weight: 700; }
  html.big .tabbar a { font-size: 1rem; min-height: 64px; }
  html.big .tabbar .ic { width: 22px; height: 22px; }
  .tabbar a:nth-child(3) { padding: 6px 8px; }
  /* キーで次の欄へ動いたとき、下のタブに隠れない */
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom) + var(--nlb, 0px)); }
}
@media (max-width: 340px) {
  html.big .tabbar a { font-size: .875rem; }
  .top .wrap { flex-wrap: wrap; }
}
/* 動きを減らす設定の人には、全部止めてすぐ出す */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
