/* サンプル「見積の下書きづくり」専用の見た目。sample-fax.css を写して接頭辞を iv- に替え、メール・金額・見積書の形を足した。色と書体は main.css の変数を使う */
.iv-page {
  --iv-head: 73px;
  --iv-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --iv-unsure-ink: #92400E; --iv-unsure-bg: #FEF3C7;
  --iv-sku-ink: #991B1B; --iv-sku-bg: #FEE2E2;
  --iv-over-ink: #9A3412; --iv-over-bg: #FFEDD5;
  --iv-ok-ink: #115E59; --iv-ok-bg: #CCFBF1;
  --iv-muted: #475569;
}
.iv-page *:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 2px; }
.iv-page p { margin: 0; }
:where(.iv-page) :where(button, input) { font: inherit; color: inherit; }
html:has(#iv-app :focus-visible) { scroll-padding-top: 9.75rem; }
html:has(.iv-finish.is-ready) { scroll-padding-bottom: 10rem; }
.skip-link { top: -5rem; }
.iv-wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); width: 100%; }
.iv-vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* トップの「たとえば」節の部品（index.html の #can から写す） */
.can-eyebrow { display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, .75rem); word-break: auto-phrase; margin: 0 0 1rem !important; font-size: .85rem; font-weight: 600; letter-spacing: .16em; color: var(--cp-primary); text-align: center; }
.can-eyebrow::before, .can-eyebrow::after { content: ""; display: inline-block; flex: none; width: clamp(1rem, 5vw, 2rem); height: 1.5px; background: var(--cp-accent); }
.can-title { font-size: clamp(1.7rem, 3.2vw, 2.8rem); color: var(--cp-primary); line-height: 1.45; text-wrap: balance; word-break: auto-phrase; text-align: center; }
.can-title::after { content: ""; display: block; width: 64px; height: 2px; margin: 1.1rem auto 0; background: var(--cp-accent); }
.can-card__no { display: grid; place-items: center; min-width: 2.6rem; height: 2.6rem; padding: 0 .5rem; background: var(--cp-navy-deep); color: #fff; font-family: var(--ff-display); font-size: 1rem; font-weight: 600; letter-spacing: .06em; border-bottom: 2px solid var(--cp-accent); flex: none; }
.can-invite { position: relative; padding: clamp(1.5rem, 4vw, 3rem); background: var(--cp-white); border: 1px solid var(--cp-line); border-top: 3px solid var(--cp-accent); border-radius: 2px; box-shadow: var(--cp-shadow); }
.can-invite__title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.55; color: var(--cp-primary); text-wrap: balance; word-break: auto-phrase; }
.can-invite__text { margin-top: 1rem !important; font-size: 1rem; line-height: 1.95; text-wrap: pretty; }
.can-cta { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem 2rem; width: 100%; background: var(--cp-primary); color: #fff; font-weight: 600; font-size: 1rem; letter-spacing: .06em; text-decoration: none; border-radius: 2px; border-bottom: 2px solid var(--cp-accent); transition: background-color .3s ease, box-shadow .3s ease; word-break: auto-phrase; }
.can-cta:hover { background: var(--cp-navy-deep); box-shadow: var(--cp-shadow); }
.can-cta svg { width: 1.15rem; height: 1.15rem; transition: transform .3s ease; }
.can-cta:hover svg { transform: translateX(3px); }

/* プライバシーポリシーと同じヘッダーの戻るリンクとフッター */
.policy-header__back { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.04em; color: var(--cp-primary); border-bottom: 1px solid currentColor; padding-bottom: 0.1rem; white-space: nowrap; }
.policy-header__back:hover { color: var(--cp-navy-deep); }
.policy-footer .site-footer__inner { grid-template-columns: 1.2fr 1fr 1.1fr; }

/* 説明 */
.iv-intro { padding: clamp(1.75rem, 4vw, 3.25rem) 0 clamp(1.75rem, 3.5vw, 2.5rem); background: radial-gradient(60rem 30rem at 85% -5%, color-mix(in oklab, var(--cp-accent) 12%, transparent), transparent 70%), linear-gradient(180deg, var(--cp-white) 0%, var(--cp-bg) 100%); }
.iv-hero { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.iv-hero .can-eyebrow { justify-content: flex-start; }
.iv-hero .can-eyebrow::before { display: none; }
.iv-hero .can-title { text-align: left; font-size: clamp(1.7rem, 2.9vw, 2.45rem); }
.iv-hero .can-title::after { margin-left: 0; }
.iv-lead { margin: 1.1rem 0 0 !important; font-size: 1.02rem; line-height: 1.9; text-wrap: pretty; }
.iv-lead-act { margin-top: 1.25rem !important; }
.iv-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: clamp(1.25rem, 3vw, 2rem) 0 0; padding-top: .9rem; border-top: 1px solid var(--cp-line); }
.iv-step { display: flex; align-items: baseline; gap: .55rem; }
.iv-step__no { flex: none; font-family: var(--ff-display); font-size: .95rem; font-weight: 600; letter-spacing: .06em; color: var(--cp-accent-ink); }
.iv-step__text { font-size: .95rem; font-weight: 600; line-height: 1.6; color: var(--cp-text); word-break: auto-phrase; }
.iv-note { margin-top: clamp(1rem, 2.5vw, 1.5rem); padding: .9rem 1.25rem 1rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; }
.iv-note__title { font-size: .98rem; color: var(--cp-primary); margin-bottom: .45rem; }
.iv-note__list { list-style: disc; padding-left: 1.3em; }
.iv-note__list li { font-size: .92rem; line-height: 1.75; margin-bottom: .2em; overflow-wrap: anywhere; }
.iv-note__list li::marker { color: var(--cp-primary); }
.iv-run { margin-top: .55rem !important; font-size: .82rem; line-height: 1.6; color: var(--iv-muted); font-family: var(--iv-sans); }

/* 触ってみる */
.iv-tool { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem); background: var(--cp-cream); border-top: 1px solid var(--cp-line); border-bottom: 1px solid var(--cp-line); }
.iv-tool__title { font-size: clamp(1.35rem, 2.6vw, 1.8rem); color: var(--cp-primary); }
.iv-tool__lead { margin-top: .25rem !important; font-size: .98rem; color: var(--cp-text); }
.iv-tool__notice { margin-top: .35rem !important; font-size: .9rem; line-height: 1.7; color: var(--cp-text); }
.iv-noscript { margin-top: 1rem !important; padding: 1rem; background: var(--cp-white); border: 1px solid var(--cp-line); }
.iv-app { margin-top: 1rem; }

/* 依頼を選ぶ */
.iv-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.iv-tab { display: flex; flex-direction: column; gap: .1rem; min-height: 44px; padding: .6rem .9rem; text-align: left; background: var(--cp-white); border: 1px solid var(--cp-line); border-bottom: 3px solid var(--cp-line); border-radius: 2px; cursor: pointer; line-height: 1.5; transition: border-color .2s ease, background-color .2s ease; }
.iv-tab:hover { border-bottom-color: var(--cp-accent); }
.iv-tab[aria-selected="true"] { background: var(--cp-navy-deep); border-color: var(--cp-navy-deep); border-bottom-color: var(--cp-accent); color: #fff; }
.iv-tab__label { font-weight: 600; font-size: .95rem; word-break: auto-phrase; }
.iv-tab__who { font-size: .82rem; color: var(--iv-muted); min-width: 0; overflow-wrap: anywhere; }
.iv-tab[aria-selected="true"] .iv-tab__who { color: #cbd5e1; }
.iv-tab__state { font-size: .86rem; font-weight: 600; color: var(--cp-accent-ink); font-family: var(--iv-sans); }
.iv-tab[aria-selected="true"] .iv-tab__state { color: #bfdbfe; }

.iv-panel { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; margin-top: 1rem; }

/* 左: 届いた依頼 */
.iv-srccol { position: sticky; top: calc(var(--iv-head) + .75rem); background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; box-shadow: var(--cp-shadow); padding: .75rem; }
.iv-srccol__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.iv-srccol__title { font-size: 1.02rem; color: var(--cp-primary); }
.iv-sheet { position: relative; margin-inline: auto; width: min(100%, calc((100vh - var(--iv-head) - 6.5rem) * var(--iv-ratio, 0.7546))); box-shadow: 0 0 0 1px var(--cp-line); cursor: zoom-in; background: #fff; }
.iv-sheet img { display: block; width: 100%; height: 100%; max-width: none; }
.iv-hit { position: absolute; border: 3px solid var(--cp-accent); border-radius: 2px; pointer-events: none; box-sizing: content-box; transform: translate(-3px, -3px); }

/* 右: 見積の下書き */
.iv-count { position: sticky; top: var(--iv-head); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; padding: .55rem 1rem; background: var(--cp-navy-deep); color: #fff; border-bottom: 2px solid var(--cp-accent); border-radius: 2px; }
.iv-count__main { display: flex; align-items: baseline; gap: .4rem; min-width: 0; white-space: nowrap; font-weight: 600; font-size: 1rem; }
.iv-count__num { font-family: var(--iv-sans); font-size: 2.1rem; font-weight: 700; line-height: 1.1; color: #fff; }
.iv-count__sub { min-width: 0; font-size: .92rem; color: #cbd5e1; overflow-wrap: anywhere; }
.iv-count__sub b { font-family: var(--iv-sans); font-size: 1.15rem; color: #fff; font-weight: 700; }
.iv-prior { margin-top: .35rem !important; font-size: .9rem; color: var(--cp-text); line-height: 1.7; }

.iv-head { margin-top: .75rem; padding: .7rem .9rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; }
.iv-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.iv-head__dl { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .1rem .9rem; margin: 0; font-size: .92rem; line-height: 1.7; }
.iv-head__dl dt { color: var(--iv-muted); }
.iv-head__dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.iv-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin-top: .75rem; }
.iv-rowitem { position: relative; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; padding: .6rem .9rem; }
.iv-rowitem.has-marks { border-left: 4px solid var(--cp-primary); box-shadow: var(--cp-shadow); padding: .8rem .95rem .95rem; }
.iv-rowitem.is-done { border-left: 4px solid var(--iv-ok-ink); }
/* 直した行を、少しの間だけ色で知らせる */
.is-just-fixed { animation: iv-fixed 2s ease-out; }
@keyframes iv-fixed { 0%, 35% { background-color: var(--iv-ok-bg); } 100% { background-color: var(--cp-white); } }
.iv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem .75rem; }
.iv-row__data { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; min-width: 0; }
.iv-name { font-weight: 600; font-size: 1rem; overflow-wrap: anywhere; }
.iv-diff { margin-top: .25rem !important; font-size: .82rem; color: var(--iv-ok-ink); line-height: 1.6; font-family: var(--iv-sans); overflow-wrap: anywhere; }
.iv-tags { display: flex; flex-wrap: wrap; gap: .3rem .4rem; }
.iv-rowitem .iv-tags--row, .iv-head .iv-tags--row { margin-top: .3rem; align-items: center; }
.iv-tags--row .iv-link { min-height: 44px; margin-left: .3rem; }

.iv-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; font-family: var(--iv-sans); font-size: .82rem; font-weight: 700; line-height: 1.6; border: 1px solid currentColor; border-radius: 2px; }
.iv-tag svg { width: .85rem; height: .85rem; flex: none; }
.iv-tag--unsure { color: var(--iv-unsure-ink); background: var(--iv-unsure-bg); }
.iv-tag--ok { color: var(--iv-ok-ink); background: var(--iv-ok-bg); }
.iv-by { font-size: .84rem; color: var(--iv-muted); font-family: var(--iv-sans); align-self: center; }

/* 確かめる所 */
.iv-block { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--cp-line); scroll-margin: 8rem; }
.iv-block__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .1rem; }
.iv-block__field { font-size: .92rem; font-weight: 600; color: var(--cp-primary); }
/* border を付けると内側の縦横比がずれて切り抜きが動くので、枠は box-shadow で描く */
.iv-crop { position: relative; overflow: hidden; margin: .5rem 1px 1px; background: #fff; box-shadow: 0 0 0 1px var(--cp-muted); max-width: calc(100% - 2px); }
.iv-crop img { position: absolute; max-width: none; height: auto; }
/* かすれの切り抜きは、FAX の点の集まりが字に見えるように少しなめらかにする。画像そのものは変えない */
.iv-crop--tight img { filter: blur(1.1px) contrast(1.5); }
/* スマホの幅で字が読める大きさにした切り抜き。入りきらない分は横に動かして見る */
.iv-crophint { margin-top: .5rem !important; font-size: .84rem; line-height: 1.6; color: var(--iv-muted); font-family: var(--iv-sans); }
.iv-cropscroll { overflow-x: auto; margin: .5rem 0 0; padding: 0 1px 1px; -webkit-overflow-scrolling: touch; }
.iv-cropscroll .iv-crop--wide { max-width: none; margin-top: 0; }
.iv-cropscroll:focus-visible { outline: 3px solid var(--cp-primary); outline-offset: 2px; }
.iv-say { margin-top: .5rem !important; font-size: .95rem; line-height: 1.75; overflow-wrap: anywhere; }
.iv-say b { display: inline-block; max-width: 100%; font-family: var(--iv-sans); font-weight: 700; }
.iv-why { margin-top: .15rem !important; font-size: .9rem; color: var(--iv-muted); line-height: 1.7; overflow-wrap: anywhere; font-family: var(--iv-sans); }
.iv-group-label { margin-top: .6rem !important; font-size: .88rem; font-weight: 600; color: var(--cp-text); }
.iv-choices { display: grid; gap: .4rem; margin-top: .35rem; }
.iv-choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.iv-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-width: 0; overflow-wrap: anywhere; min-height: 44px; padding: .45rem .95rem; font-weight: 600; font-size: .95rem; line-height: 1.5; letter-spacing: .02em; text-wrap: balance; border-radius: 2px; border: 1.5px solid var(--cp-primary); background: var(--cp-white); color: var(--cp-primary); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.iv-btn--primary { background: var(--cp-primary); color: #fff; }
.iv-btn--quiet { border-color: var(--cp-line); color: var(--cp-text); font-weight: 500; }
/* タッチの端末で押したあとに濃い色が残らないように */
@media (hover: hover) {
  .iv-btn:hover { background: var(--cp-primary); color: #fff; }
  .iv-btn--primary:hover { background: var(--cp-navy-deep); border-color: var(--cp-navy-deep); }
  .iv-btn--quiet:hover { background: var(--cp-cream); color: var(--cp-text); border-color: var(--cp-muted); }
}
.iv-btn--small { padding-inline: .7rem; font-size: .88rem; white-space: nowrap; }
.iv-btn:disabled, .iv-btn:disabled:hover { background: var(--cp-line); border-color: var(--cp-line); color: var(--iv-muted); cursor: not-allowed; }
.iv-type { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin-top: .35rem; }
.iv-input { width: 100%; min-height: 44px; padding: .4rem .65rem; font-family: var(--iv-sans); font-size: 16px; line-height: 1.4; background: #fff; border: 1.5px solid var(--cp-muted); border-radius: 2px; }
.iv-input[aria-invalid="true"] { border-color: var(--iv-sku-ink); }
.iv-err { margin-top: .3rem !important; font-size: .88rem; font-weight: 600; color: var(--iv-sku-ink); }
.iv-tools { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .4rem; }
.iv-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; color: var(--cp-primary); font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.iv-link:hover { color: var(--cp-navy-deep); }
.iv-block__top .iv-link { flex: none; white-space: nowrap; }
.iv-nowrap { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

/* 行を直す */
.iv-editor { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--cp-line); }
.iv-editor__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .75rem; margin-top: .5rem; }
.iv-editor__field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .15rem; }
.iv-editor__field--wide { grid-column: 1 / -1; }
.iv-editor__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }

/* 確定 */
.iv-finish { margin-top: .9rem; padding: .9rem 1rem 1rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-top: 3px solid var(--cp-accent); border-radius: 2px; }
.iv-finish.is-ready { position: sticky; bottom: 0; z-index: 4; box-shadow: 0 -6px 18px rgba(15, 23, 42, .12); }
.iv-finish__msg { font-size: .95rem; line-height: 1.75; margin-bottom: .6rem !important; text-wrap: pretty; word-break: auto-phrase; }
.iv-finish .iv-btn--primary { width: 100%; min-height: 50px; font-size: 1.02rem; }
.iv-done__title { font-size: 1.3rem; color: var(--cp-primary); text-wrap: balance; word-break: auto-phrase; }
.iv-done__save { margin-top: .85rem; }
.iv-done__title:focus { outline: none; }
.iv-done__lead { margin-top: .35rem !important; font-size: .95rem; line-height: 1.75; }
.iv-tablewrap { overflow-x: auto; margin-top: .75rem; background: var(--cp-white); border: 1px solid var(--cp-line); -webkit-overflow-scrolling: touch; }
.iv-table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.6; font-family: var(--iv-sans); }
.iv-table th, .iv-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--cp-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.iv-table thead th { background: var(--cp-cream); color: var(--cp-text); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.iv-table tr:last-child td { border-bottom: 0; }
.iv-table .is-num { text-align: right; white-space: nowrap; }
.iv-tnote { display: block; font-size: max(.86em, 12.5px); color: var(--iv-muted); }
.iv-tnote--edited { color: var(--iv-ok-ink); }
.iv-done__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.iv-done__saved { margin-top: .5rem !important; font-size: .9rem; color: var(--iv-ok-ink); font-weight: 600; font-family: var(--iv-sans); overflow-wrap: anywhere; }
.iv-done__next { margin-top: .85rem !important; padding-top: .75rem; border-top: 1px solid var(--cp-line); font-size: .92rem; line-height: 1.8; }
.iv-done__cta { margin-top: .6rem; min-height: 44px; text-wrap: balance; word-break: auto-phrase; }
.iv-reset { margin-top: 1rem; text-align: right; }

/* 照らし合わせの結果の形 */
.iv-paper { position: relative; margin-top: .75rem; padding: .9rem 1rem 1rem; background: #fff; border: 1px solid var(--cp-line); font-family: var(--iv-sans); }
.iv-paper__mark { position: absolute; right: .75rem; top: .75rem; padding: .05rem .5rem; border: 1px solid var(--cp-text); font-size: .8rem; font-weight: 700; }
.iv-paper__title { font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; padding-right: 8.5rem; }
.iv-paper__meta { margin-top: .35rem !important; font-size: .9rem; color: var(--iv-muted); overflow-wrap: anywhere; }
.iv-paper .iv-tablewrap { margin-top: .55rem; }
.iv-paper__foot { margin-top: .45rem !important; font-size: .84rem; line-height: 1.6; color: var(--iv-muted); }
.iv-table tfoot th { font-weight: 600; text-align: right; background: var(--cp-cream); }
.iv-table tfoot td { background: var(--cp-cream); }
.iv-table tbody tr:last-child td { border-bottom: 1px solid var(--cp-line); }

/* 全体を拡大して見る */
.iv-zoom { width: min(96vw, 1100px); height: min(94dvh, 100%); max-width: none; max-height: none; padding: 0; border: 1px solid var(--cp-line); border-radius: 2px; background: var(--cp-white); color: var(--cp-text); font-family: var(--ff-serif); overflow: hidden; }
.iv-zoom[open] { display: flex; flex-direction: column; }
.iv-zoom::backdrop { background: rgba(2, 6, 23, .72); }
.iv-zoom__bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .4rem .6rem; border-bottom: 1px solid var(--cp-line); background: var(--cp-white); }
.iv-zoom__title { font-size: .98rem; font-weight: 600; color: var(--cp-primary); margin: 0; }
.iv-zoom__ctrl { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.iv-zoom__pct { min-width: 3.2em; text-align: center; font-family: var(--iv-sans); font-size: .88rem; }
.iv-zoom__scroll { flex: 1; min-height: 0; overflow: auto; background: var(--cp-cream); -webkit-overflow-scrolling: touch; }
.iv-zoom__scroll:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: -3px; }
/* main.css の「動きを減らす」は全部に短い transition を付ける。大きさが遅れて変わると中心の計算がずれるので切る */
.iv-zoom__page { position: relative; margin-inline: auto; background: #fff; transition: none !important; }
.iv-zoom__page img { display: block; width: 100%; height: 100%; max-width: none; }
html.iv-noscroll { overflow: hidden; }

/* 相談へ */
.iv-next { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.iv-next__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.5rem; }
.iv-next__actions .can-cta { width: auto; flex: 0 1 auto; }
.iv-next__sub { min-height: 44px; }

@media (max-width: 1024px) {
  .iv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1025px) {
  .iv-note__list { columns: 2; column-gap: 2.5rem; }
  .iv-note__list li { break-inside: avoid; }
}
@media (max-width: 860px) {
  .iv-hero { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .iv-fig { min-height: 0; }
}
@media (max-width: 900px) {
  .iv-panel { grid-template-columns: minmax(0, 1fr); }
  .iv-srccol { position: static; display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .75rem; align-items: center; box-shadow: none; padding: .55rem .75rem; }
  .iv-srccol__head { display: block; margin: 0; grid-column: 2; grid-row: 1; }
  .iv-srccol__head .iv-btn { margin-top: .45rem; width: 100%; }
  .iv-sheet { grid-column: 1; grid-row: 1; width: 100%; margin: 0; }
  .iv-sheet .iv-hit { display: none; }
}
@media (max-width: 768px) {
  .policy-footer .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .iv-page { --iv-head: 63px; }
  .iv-table { font-size: .86rem; }
  .iv-table th, .iv-table td { padding: .5rem .4rem; }
  .iv-table td:first-child { min-width: 6.5em; }
  .policy-footer .site-footer__inner { grid-template-columns: 1fr; }
  .iv-lead { text-align: left; }
  .iv-steps { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .iv-step__text { font-size: .92rem; }
  .iv-hero .can-eyebrow { margin-bottom: .6rem !important; }
  .iv-note { padding: .85rem .9rem .9rem; }
  .iv-tool { padding-top: 1.1rem; scroll-margin-top: -1.25rem; }
  .iv-app { margin-top: .75rem; }
  .iv-tabs { gap: .3rem; }
  .iv-tab { padding: .4rem .45rem; }
  .iv-tab__label { font-size: .84rem; line-height: 1.35; }
  .iv-tab__who { display: none; }
  .iv-tab__state { font-size: .8rem; margin-top: auto; }
  .iv-count { padding: .35rem .75rem; gap: 0 .5rem; }
  .iv-count__main { font-size: .92rem; gap: .25rem; }
  .iv-count__sub { font-size: .86rem; }
  .iv-finish.is-ready { padding: .6rem .75rem .7rem; }
  .iv-finish.is-ready .iv-finish__msg { font-size: .88rem; line-height: 1.6; margin-bottom: .4rem !important; }
  .iv-count__num { font-size: 1.7rem; }
  .iv-rowitem { padding: .55rem .7rem; }
  .iv-rowitem.has-marks { padding: .7rem .75rem .85rem; }
  .iv-choices--2 { grid-template-columns: minmax(0, 1fr); }
  .iv-editor__grid { grid-template-columns: minmax(0, 1fr); }
  .iv-block__top { flex-wrap: wrap; gap: 0 .75rem; }
  .iv-paper__mark { position: static; width: fit-content; margin-bottom: .35rem !important; }
  .iv-paper__title { padding-right: 0; }
  .iv-next__actions .can-cta, .iv-next__sub { width: 100%; }
  .iv-reset { text-align: center; }
  .iv-zoom { width: 100vw; height: 100dvh; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-just-fixed { animation: none; }
  .iv-tab, .iv-btn, .can-cta, .can-cta svg { transition: none; }
  .can-cta:hover svg { transform: none; }
}
@media (max-width: 340px) {
  .iv-tab { padding-inline: .35rem; }
  .iv-tab__label { font-size: .8rem; }
  .iv-srccol { grid-template-columns: 4rem minmax(0, 1fr); }
  .iv-tool__lead { display: none; }
}
/* 高さのない画面では、固定の帯で作業の場所が狭くならないようにする。下の帯から先に固定を外し、件数が見える上の帯は横向きの高さまで残す */
@media (max-height: 700px) {
  .iv-finish.is-ready { position: static; box-shadow: none; }
  html:has(.iv-finish.is-ready) { scroll-padding-bottom: 1rem; }
}
@media (max-height: 500px) {
  .site-header, .iv-count { position: static; }
  html:has(#iv-app :focus-visible) { scroll-padding-top: 1rem; }
}
/* 見出しの近くの図（請求と記録の照らし合わせ） */
.iv-fig { margin: 0; padding: .85rem .95rem .95rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; box-shadow: var(--cp-shadow); }
.iv-fig__cap { font-size: .86rem; font-weight: 600; color: var(--cp-primary); margin-bottom: .4rem !important; line-height: 1.6; }
.iv-fig__rows { display: grid; font-family: var(--iv-sans); font-size: .84rem; border: 1px solid var(--cp-line); }
.iv-fig__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; align-items: baseline; padding: .35rem .55rem; border-top: 1px solid var(--cp-line); }
.iv-fig__row:first-child { border-top: 0; }
.iv-fig__row.is-marked { background: var(--iv-over-bg); }
.iv-fig__name { font-weight: 600; overflow-wrap: anywhere; }
.iv-fig__nums { text-align: right; line-height: 1.5; color: var(--cp-text); }
.iv-fig__mark { grid-column: 1 / -1; }
.iv-fig__ok { font-size: .82rem; color: var(--iv-ok-ink); font-weight: 600; }
.iv-fig__foot { margin-top: .4rem !important; font-size: .84rem; line-height: 1.6; color: var(--iv-muted); }

/* 行: 請求と記録を並べる */
.iv-row__data { display: grid; gap: .2rem; min-width: 0; }
.iv-row__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.iv-slip { font-family: var(--iv-sans); font-weight: 600; font-size: .9rem; color: var(--iv-muted); }
.iv-name { font-weight: 600; font-size: 1rem; overflow-wrap: anywhere; }
.iv-date { font-family: var(--iv-sans); font-size: .84rem; color: var(--iv-muted); }
.iv-pair { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .05rem .7rem; margin: 0; font-family: var(--iv-sans); font-size: .92rem; line-height: 1.65; }
.iv-pair dt { color: var(--iv-muted); font-weight: 600; }
.iv-pair dd { margin: 0; overflow-wrap: anywhere; }
.iv-pair dd b { display: inline-block; max-width: 100%; }
.iv-pair dd.is-empty { color: var(--iv-sku-ink); font-weight: 600; }
.iv-match { margin-top: .25rem !important; font-size: .9rem; color: var(--iv-ok-ink); font-family: var(--iv-sans); }
.iv-rowitem.is-ask, .iv-head.is-ask { border-left: 4px solid var(--iv-over-ink); }
.iv-head .iv-why { margin-top: .35rem !important; }

/* 印の色。照らし合わせの印は赤と橙、人が決めたものは緑と橙の枠 */
.iv-tag--find { color: var(--iv-sku-ink); background: var(--iv-sku-bg); }
.iv-tag--paid, .iv-tag--diff, .iv-tag--calc { color: var(--iv-over-ink); background: var(--iv-over-bg); }
.iv-tag--ask { color: var(--iv-over-ink); background: #fff; }

/* 問い合わせる内容 */
.iv-asks { margin-top: .75rem; padding: .7rem .9rem; background: var(--iv-over-bg); border-left: 4px solid var(--iv-over-ink); font-family: var(--iv-sans); font-size: .92rem; line-height: 1.7; }
.iv-asks__title { font-weight: 700; color: var(--iv-over-ink); margin-bottom: .25rem !important; }
.iv-asks ul { list-style: disc; padding-left: 1.2em; margin: 0; }
.iv-asks li { overflow-wrap: anywhere; }
.iv-paper__meta { margin-top: .35rem !important; }
.iv-table td { white-space: normal; word-break: auto-phrase; }
/* 確定後の表は、4 列に十分な幅でだけ 4 列にする。狭い 4 列（スマホの横向きや、2 列表示になったばかりの幅）では語が途中で割れるので、1 行ごとのカードの形にする */
@media (max-width: 760px), (min-width: 901px) and (max-width: 1199px) {
  .iv-table, .iv-table tbody, .iv-table tfoot { display: block; }
  .iv-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .iv-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .15rem .6rem; padding: .5rem .55rem; border-bottom: 1px solid var(--cp-line); }
  .iv-table tbody td, .iv-table tbody tr:last-child td { padding: 0; border: 0; }
  .iv-table tbody td:first-child, .iv-table tbody td:last-child { grid-column: 1 / -1; min-width: 0; }
  .iv-table tbody td:nth-child(2)::before { content: "請求 "; color: var(--iv-muted); }
  .iv-table tbody td:nth-child(3)::before { content: "記録 "; color: var(--iv-muted); }
  .iv-table tbody td:last-child { font-weight: 700; }
  .iv-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: baseline; background: var(--cp-cream); border-bottom: 1px solid var(--cp-line); }
  .iv-table tfoot tr:last-child { border-bottom: 0; }
  .iv-table tfoot th, .iv-table tfoot td { border: 0; }
  .iv-table tfoot tr.iv-tfoot-mark { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .iv-table tfoot tr.iv-tfoot-mark td { text-align: right; font-weight: 700; }
}
@media (max-width: 560px) {
  .iv-pair { font-size: .88rem; }
  .iv-fig__row { grid-template-columns: minmax(0, 1fr); }
  .iv-fig__nums { text-align: left; }
}
@media (min-width: 761px) and (max-width: 900px), (min-width: 1200px) {
  /* 長い文の列に幅を取られて、数字の列が細くなりすぎないように */
  .iv-table td:first-child, .iv-table td:nth-child(2), .iv-table td:last-child { min-width: 6.5em; }
}
/* PC の 2 列の幅では、請求の計算と発注の単価を 1 行に収める */
@media (min-width: 1200px) {
  .iv-table th, .iv-table td { padding-inline: .45rem; }
  .iv-table td:first-child { min-width: 8em; }
  .iv-table td:last-child { min-width: 8em; }
  /* 「（支払ってよい）」を 1 行に収める。字は表の注と同じ大きさ */
  .iv-table .iv-dec-note { font-size: max(.86em, 12.5px); }
  .iv-table td:nth-child(2) .iv-tnote, .iv-table td:nth-child(3) .iv-nowrap { white-space: nowrap; }
}
/* 320px の幅：表は 1 列に、「直す」は次の行に。確定のボタンは 1 行に収める */
@media (max-width: 340px) {
  .iv-table tbody tr { grid-template-columns: minmax(0, 1fr); }
  .iv-row, .iv-head__row { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .iv-row__data, .iv-head__dl { flex: 1 1 100%; }
  .iv-finish .iv-btn--primary { padding-inline: .5rem; font-size: .92rem; }
}
/* 見出し上の小さな文が 2 行に折れても崩れないように */
@media (max-width: 400px) {
  .iv-hero .can-eyebrow { letter-spacing: .08em; text-align: left; }
  .iv-hero .can-eyebrow::after { display: none; }
}

/* 全サンプル共通の整え（2026-11-06）: 最後の行に 1〜2 字だけ残さない・語の途中で折らない。押す所は 44px。word-break は Safari で効かないので、数字や日付など絶対に割りたくない所は nowrap の span にする */
main { text-wrap: pretty; }
main :where(p, li, h1, h2, h3, h4, dd, dt, figcaption, button, a, label, summary, caption) { word-break: auto-phrase; overflow-wrap: break-word; }
.policy-header__back { display: inline-flex; align-items: center; min-height: 44px; margin-block: -3px; }
.site-header .brand { min-height: 44px; margin-block: -3px; }
.policy-footer .site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* 共通の整えの打ち消し（3 周目）。ロゴが 48px の幅ではヘッダーが 6px 縮むので元に戻す */
@media (min-width: 561px) { .site-header .brand { margin-block: 0; } }
/* 表のセルは列が狭く、Safari の pretty で行が増えるので、表の中だけふつうの折り方に戻す */
.iv-table td, .iv-table th { text-wrap: wrap; }
/* 見出し横の図の説明の折れを左右そろえる（最後の行に 1〜2 字だけ残さない） */
.iv-fig__cap { text-wrap: balance; }
/* ページ下の文も、最後の行に 1〜2 字だけ残さない（main の外なので別に指定する） */
.policy-footer p { text-wrap: pretty; }
/* 説明の文は、<wbr> を入れた語の切れ目でだけ折る。Safari は word-break: auto-phrase が効かないので、keep-all で字の間では折らないようにする（Edge も同じ折り方になる） */
.iv-ph, .iv-ph > li { word-break: keep-all; overflow-wrap: anywhere; }
/* 入力欄へフォーカスが動いたとき、欄の名前まで帯の下に見えるようにする（Safari は入力の位置を基準に自分でも動かすので、余白を広げておく） */
@media (min-height: 501px) {
  html:has(#iv-app .iv-editor__field .iv-input:focus) { scroll-padding-top: 12rem; }
}
/* 見出し横の図の数字は、PC の幅では 1 行に収める（Safari は pretty の指定で列を細くして折ることがある） */
@media (min-width: 561px) { .iv-fig__nums { white-space: nowrap; } }

/* Safari（auto-phrase が効かない）では text-wrap の pretty / balance と wbr・nowrap が重なると同じ字が 2 回描かれるので、折り方を普通に戻す（2026-11-07） */
@supports not (word-break:auto-phrase){main,main *,.policy-footer,.policy-footer *{text-wrap-style:auto!important}}
