/* あんしん見積もり デザイントークンと部品(docs/04-デザイン.md、docs/design/tokens.css の写し)。末尾に実装で足した部品 */
:root {
  color-scheme: light;
  --ink: #1f2a30; --ink-2: #55656e; --line: #d9e0e3; --bg: #f4f6f5; --surface: #fff;
  --primary: #0f766e; --primary-soft: #e0f2f0; --accent: #e8731a; --accent-ink: #fff;
  --warn: #b45309; --warn-soft: #fff4e5; --danger: #b91c1c; --ok: #15803d; --ok-soft: #e8f5ec;
  --radius: 12px; --radius-s: 8px;
  --shadow: 0 1px 2px rgba(31,42,48,.06), 0 8px 24px rgba(31,42,48,.06);
  --font: "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; }
a { color: var(--primary); }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.35; margin: 0 0 .5em; font-feature-settings: "palt"; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; color: var(--ink-2); }
.wrap { width: 100%; margin: 0 auto; padding: 0 16px; }
.wrap--site { max-width: 1040px; } .wrap--my { max-width: 640px; } .wrap--app { max-width: 1200px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* ヘッダー・フッター */
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.logo svg { width: 26px; height: 26px; }
.header__nav a { margin-left: 1.25em; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.footer { margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .875rem; }
.footer a { color: var(--ink-2); margin-right: 1.25em; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: 0 1.25em; border-radius: var(--radius-s);
  border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-height: 52px; font-size: 1.05rem; padding: 0 1.75em; }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 約束の帯 */
.promise { display: grid; gap: 12px; padding: 16px; background: var(--primary-soft); border-radius: var(--radius); }
.promise__item { display: flex; gap: 12px; align-items: flex-start; }
.promise__item svg { flex: none; width: 28px; height: 28px; color: var(--primary); }
.promise__item b { display: block; line-height: 1.4; }
.promise__item span { font-size: .875rem; color: var(--ink-2); line-height: 1.5; display: block; }
@media (min-width: 720px) { .promise { grid-template-columns: repeat(3, 1fr); padding: 20px; } }

/* カード・箱 */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.note { padding: 12px 16px; background: var(--warn-soft); border-left: 4px solid var(--warn); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.info { padding: 12px 16px; background: var(--primary-soft); border-radius: var(--radius-s); }
.tag { display: inline-block; padding: 0 .6em; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.8; background: #e5e9eb; color: var(--ink-2); }
.tag--open { background: var(--primary-soft); color: var(--primary); }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.tag--danger { background: #fde8e8; color: var(--danger); }

/* 進捗バー */
.steps { display: flex; justify-content: space-between; list-style: none; margin: 0 0 1.5rem; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 7%; right: 7%; top: 13px; height: 2px; background: var(--line); }
.steps li { position: relative; flex: 1; text-align: center; font-size: .72rem; color: var(--ink-2); }
.steps li::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 4px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.steps li.done::before { background: var(--primary); border-color: var(--primary); }
.steps li.done::after { content: "✓"; position: absolute; top: 2px; left: 0; right: 0; color: #fff; font-weight: 700; font-size: .9rem; }
.steps li.now { color: var(--primary); font-weight: 700; }
.steps li.now::before { border-color: var(--primary); border-width: 4px; }

/* フォーム */
.field { margin-bottom: 1.25rem; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: .3em; }
.req { display: inline-block; margin-left: .5em; padding: 0 .45em; font-size: .72rem; color: #fff; background: var(--danger); border-radius: 4px; vertical-align: middle; }
.field .hint { font-size: .85rem; color: var(--ink-2); margin: -.2em 0 .4em; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }
textarea.input { min-height: 120px; }
.input:focus { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.error { color: var(--danger); font-size: .875rem; margin-top: .3em; }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; font-weight: 400; }
.choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { width: 20px; height: 20px; accent-color: var(--primary); }
.choice--img label { padding: 8px 10px; }
.choice--img img { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 6px; }
.choice--img span { flex: 1; min-width: 0; }
@media (min-width: 720px) { .choice--2 { grid-template-columns: 1fr 1fr; } .choice--3 { grid-template-columns: repeat(3, 1fr); } }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos__item { position: relative; aspect-ratio: 1; border-radius: var(--radius-s); overflow: hidden; background: #e5e9eb; }
.photos__item img { width: 100%; height: 100%; object-fit: cover; }
.photos__add { display: flex; align-items: center; justify-content: center; border: 2px dashed var(--line); color: var(--ink-2); font-size: .85rem; background: var(--surface); }

/* 見積もりカード */
.quote-card { display: block; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; color: inherit; text-decoration: none; }
.quote-card--selected { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.quote-card__head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.quote-card__vendor b { display: block; } .quote-card__vendor small { display: block; }
.quote-card__amount { font-size: 1.5rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.quote-card__amount small { font-size: .8rem; font-weight: 400; margin-left: .2em; }
.quote-card__body { margin: .6em 0 0; color: var(--ink-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quote-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6em; font-size: .85rem; color: var(--ink-2); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }

/* メッセージ */
.chat { display: grid; gap: 10px; padding: 12px 0; }
.chat__msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.chat__msg--me { margin-left: auto; background: var(--primary-soft); border-color: transparent; }
.chat__msg--admin { margin: 0 auto; background: #e5e9eb; font-size: .875rem; }
.chat__meta { display: block; font-size: .72rem; color: var(--ink-2); margin-top: 4px; }
.chat__input { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 0; background: var(--bg); }
.chat__input textarea { flex: 1; min-height: 48px; }

/* サイン */
.sign-pad { position: relative; height: 180px; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius-s); overflow: hidden; }
.sign-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sign-pad::after { content: "ここにサイン"; position: absolute; left: 12px; bottom: 8px; font-size: .8rem; color: var(--line); pointer-events: none; }
.sign-pad__line { position: absolute; left: 16px; right: 16px; bottom: 34px; border-top: 1px solid var(--line); pointer-events: none; }

/* 表(業者・運営) */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; height: 44px; vertical-align: middle; }
.table th { background: var(--bg); font-size: .85rem; color: var(--ink-2); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dl { display: grid; grid-template-columns: 9em 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--ink-2); font-size: .9rem; } .dl dd { margin: 0; }
.masked { color: var(--ink-2); background: #e5e9eb; padding: 0 .5em; border-radius: 4px; font-size: .85rem; }

/* 業者・運営のレイアウト */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.app__nav { background: var(--surface); border-right: 1px solid var(--line); padding: 16px; }
.app__nav a { display: block; padding: 8px 10px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.app__nav a.on { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.app__main { padding: 24px; }
@media (max-width: 719px) { .app { grid-template-columns: 1fr; } .app__nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px; } .app__main { padding: 16px; } }

/* 固定フッターのボタン(依頼者) */
.sticky-cta { position: sticky; bottom: 0; padding: 12px 0 16px; background: linear-gradient(transparent, var(--bg) 30%); }
.grid-2 { display: grid; gap: 16px; } @media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { display: block; padding: 16px 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); text-align: center; text-decoration: none; color: var(--ink); font-weight: 700; }
.tile svg { display: block; width: 36px; height: 36px; margin: 0 auto 6px; color: var(--primary); }
.tile--soon { color: var(--ink-2); background: transparent; border-style: dashed; font-weight: 400; }
.tile--soon svg { color: var(--line); }
.hero { padding: 40px 0 24px; }
.hero p.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 36em; }
/* メインビジュアル: PC は左に文・右に絵、スマホは絵を上に(2026-11-07) */
.hero--visual { padding-top: 24px; }
.hero--visual h1 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
.hero__grid { display: grid; gap: 20px; align-items: center; margin-bottom: 20px; }
.hero__art { margin: 0; }
.hero__art img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
@media (min-width: 720px) { .hero--visual { padding-top: 40px; } .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 32px; } .hero__art { order: 2; } }
@media (max-width: 719px) { .hero__art { order: -1; } }
/* 流れのカード: 左に絵(2026-11-07) */
.card--step { display: flex; gap: 14px; align-items: flex-start; }
.card--step img { flex: 0 0 88px; width: 88px; height: 88px; border-radius: var(--radius-s); background: var(--bg); }
.card--step > div { min-width: 0; }
.card--step p.small { margin-bottom: 0; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.compare th { width: 42%; background: var(--bg); font-weight: 400; color: var(--ink-2); text-align: left; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--line); }
.faq p { padding: 8px 0 12px; color: var(--ink-2); }

/* ---- 実装で足した部品(トークンの色だけを使う) ---- */
.m0 { margin: 0; } .mt1 { margin-top: 1rem; } .mt2 { margin-top: 1.5rem; } .mb1 { margin-bottom: 1rem; } .center { text-align: center; }
.page-top { padding-top: 16px; }
.crumbs { margin: 12px 0 0; font-size: .875rem; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.h1-sm { font-size: 1.4rem; margin: .2em 0 1em; }
.note--danger { background: #fde8e8; border-left-color: var(--danger); }
.note--ok { background: var(--ok-soft); border-left-color: var(--ok); }
.flash { margin: 12px 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row--end { justify-content: flex-end; }
.inline-form { display: inline; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.link-btn--danger { color: var(--danger); }
.input--short { max-width: 12em; } .input--num { max-width: 10em; text-align: right; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: .4em 0; }
.check input { width: 20px; height: 20px; margin-top: .25em; flex: none; accent-color: var(--primary); }
.grid-name { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.date-slot { display: flex; gap: 8px; } .date-slot select { max-width: 9em; }
.photos__item button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(31,42,48,.7); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.photos__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photos__item a { display: block; width: 100%; height: 100%; }
.photo-view { margin: 12px 0; } .photo-view img { max-width: 100%; border-radius: var(--radius-s); }
.split { display: grid; gap: 16px; } @media (min-width: 720px) { .split { grid-template-columns: 1fr 1fr; } }
.code-input { font-size: 1.6rem; letter-spacing: .4em; text-align: center; max-width: 10em; }
.big-number { font-size: 1.6rem; font-weight: 800; }
.contact-box { border: 2px solid var(--primary); }
.kv-table td:first-child { color: var(--ink-2); width: 40%; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.tabs a { display: block; padding: 8px 12px; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.table-wrap { overflow-x: auto; }
.table a { font-weight: 700; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters .input { min-height: 40px; width: auto; }
.todo { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.todo a { display: block; padding: 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.todo b { display: block; font-size: 1.8rem; line-height: 1.2; }
.todo .hot b { color: var(--danger); }
.spark { width: 100%; height: 120px; display: block; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 3px; vertical-align: middle; margin-right: 4px; }
.sign-done img { width: 100%; max-height: 180px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.app__nav .logo { margin-bottom: 12px; }
.app__nav .badge { margin-left: 4px; }
.app__nav .who { margin-top: 16px; }
@media (max-width: 719px) { .app__nav .logo, .app__nav .who { display: none; } .app__nav a { white-space: nowrap; } .header__nav a { margin-left: .9em; font-size: .875rem; } .logo { font-size: 1.05rem; } }
.prose h2 { margin-top: 2rem; } .prose li { margin-bottom: .3em; }
.terms ol { padding-left: 1.4em; } .terms h2 { font-size: 1.1rem; }
.price-table td.num, .price-table th.num { text-align: right; }
.area-list { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; list-style: none; }
.area-list small { color: var(--ink-2); }
.pref-block { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 420px; }
.thread-list a { display: flex; justify-content: space-between; }
@media print { .header, .footer, .app__nav { display: none; } }
.header__nav form { display: inline; margin-left: 1.25em; }
.header__nav-btn { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.lightbox { display: none; }
.lightbox:target { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; background: rgba(31,42,48,.85); padding: 16px; }
.lightbox:target img { max-width: 100%; max-height: 100%; border-radius: var(--radius-s); }
/* 360px でヘッダーと金額を折り返さない */
.logo, .header__nav, .header__nav a, .header__nav-btn { white-space: nowrap; }
.table td.num, .table th.num { white-space: nowrap; }
@media (max-width: 400px) {
  .logo { font-size: .98rem; gap: .3em; } .logo svg { width: 22px; height: 22px; }
  .header__nav a, .header__nav form { margin-left: .7em; } .header__nav a, .header__nav-btn { font-size: .8rem; }
  .card { padding: 16px; } .table th, .table td { padding: 8px; }
}
.btn { white-space: nowrap; }
@media (max-width: 400px) { .btn { padding: 0 .9em; } .btn--accent { padding: 0 1.1em; } }
@media (max-width: 400px) { .dl { grid-template-columns: 6.5em 1fr; } }
.app > *, .grid-2 > *, .split > * { min-width: 0; }
.dl dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 719px) {
  .app__nav { align-items: center; position: sticky; top: 0; z-index: 10; }
  .app__nav a, .app__nav form { flex: none; }
  .app__nav form button { padding: 8px 10px; white-space: nowrap; }
}
.contact-box .btn { white-space: normal; height: auto; padding: 8px 12px; text-align: center; }
