/* サンプル「FAX・注文書の読み取り」専用の見た目。色と書体は main.css の変数を使う */
.fx-page {
  --fx-head: 73px;
  --fx-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --fx-unsure-ink: #92400E; --fx-unsure-bg: #FEF3C7;
  --fx-sku-ink: #991B1B; --fx-sku-bg: #FEE2E2;
  --fx-over-ink: #9A3412; --fx-over-bg: #FFEDD5;
  --fx-ok-ink: #115E59; --fx-ok-bg: #CCFBF1;
  --fx-muted: #475569;
}
.fx-page *:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 2px; }
.fx-page p { margin: 0; }
:where(.fx-page) :where(button, input) { font: inherit; color: inherit; }
html:has(#fx-app :focus-visible) { scroll-padding-top: 9.75rem; }
html:has(.fx-finish.is-ready) { scroll-padding-bottom: 10rem; }
.skip-link { top: -5rem; }
.fx-wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); width: 100%; }
.fx-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); }

/* プライバシーポリシーと同じヘッダーの戻るリンクとフッター */
/* 押す所は 44px。下線は文字に持たせ、押す範囲の下端へ離れないようにする。ヘッダーの高さは変えない */
.policy-header__back { display: inline-flex; align-items: center; min-height: 44px; margin-block: -3px; font-size: 0.92rem; font-weight: 600; letter-spacing: 0.04em; color: var(--cp-primary); text-decoration: underline; text-underline-offset: .25em; 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; }

/* 説明 */
.fx-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%); }
.fx-hero { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.fx-hero .can-eyebrow { justify-content: flex-start; }
.fx-hero .can-eyebrow::before { display: none; }
.fx-hero .can-title { text-align: left; font-size: clamp(1.7rem, 2.9vw, 2.45rem); }
.fx-hero .can-title::after { margin-left: 0; }
.fx-lead { margin: 1.1rem 0 0 !important; font-size: 1.02rem; line-height: 1.9; text-wrap: pretty; }
.fx-lead-act { margin-top: 1.25rem !important; }
/* 見出しの近くの図（FAX の一部 → 読んだ結果） */
.fx-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); min-height: 16rem; }
.fx-fig__cap { font-size: .86rem; font-weight: 600; color: var(--cp-primary); margin-bottom: .3rem !important; }
.fx-fig__crop { position: relative; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--cp-line); }
.fx-fig__crop img { position: absolute; max-width: none; height: auto; }
.fx-fig__arrow { text-align: center; font-size: 1.1rem; line-height: 1.5; color: var(--cp-accent); font-family: var(--fx-sans); }
.fx-fig__rows { display: grid; font-family: var(--fx-sans); font-size: .86rem; border: 1px solid var(--cp-line); }
.fx-fig__row { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: .1rem .6rem; align-items: baseline; padding: .3rem .55rem; border-top: 1px solid var(--cp-line); }
.fx-fig__row:first-child { border-top: 0; }
.fx-fig__row.is-marked { background: var(--fx-over-bg); }
.fx-fig__sku { color: var(--fx-muted); }
.fx-fig__name { font-weight: 600; overflow-wrap: anywhere; }
.fx-fig__qty { font-weight: 700; white-space: nowrap; }
.fx-fig__mark { grid-column: 1 / -1; }
.fx-fig__note { margin-top: .4rem !important; font-size: .86rem; line-height: 1.6; color: var(--fx-muted); font-family: var(--fx-sans); text-wrap: balance; }
.fx-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); }
.fx-step { display: flex; align-items: baseline; gap: .55rem; }
.fx-step__no { flex: none; font-family: var(--ff-display); font-size: .95rem; font-weight: 600; letter-spacing: .06em; color: var(--cp-accent-ink); }
.fx-step__text { font-size: .95rem; font-weight: 600; line-height: 1.6; color: var(--cp-text); word-break: auto-phrase; text-wrap: balance; }
.fx-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; }
.fx-note__title { font-size: .98rem; color: var(--cp-primary); margin-bottom: .45rem; }
.fx-note__list { list-style: disc; padding-left: 1.3em; }
.fx-note__list li { font-size: .92rem; line-height: 1.75; margin-bottom: .2em; overflow-wrap: anywhere; text-wrap: pretty; }
.fx-note__list li::marker { color: var(--cp-primary); }
.fx-run { margin-top: .55rem !important; font-size: .82rem; line-height: 1.6; color: var(--fx-muted); font-family: var(--fx-sans); }

/* 触ってみる */
.fx-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); }
.fx-tool__title { font-size: clamp(1.35rem, 2.6vw, 1.8rem); color: var(--cp-primary); }
.fx-tool__lead { margin-top: .25rem !important; font-size: .98rem; color: var(--cp-text); }
.fx-tool__notice { margin-top: .35rem !important; font-size: .9rem; line-height: 1.7; color: var(--cp-text); }
.fx-noscript { margin-top: 1rem !important; padding: 1rem; background: var(--cp-white); border: 1px solid var(--cp-line); }
.fx-app { margin-top: 1rem; }

/* FAX を選ぶ */
.fx-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.fx-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; }
.fx-tab:hover { border-bottom-color: var(--cp-accent); }
.fx-tab[aria-selected="true"] { background: var(--cp-navy-deep); border-color: var(--cp-navy-deep); border-bottom-color: var(--cp-accent); color: #fff; }
.fx-tab__label { font-weight: 600; font-size: .95rem; word-break: auto-phrase; }
.fx-tab__who { font-size: .82rem; color: var(--fx-muted); }
.fx-tab[aria-selected="true"] .fx-tab__who { color: #cbd5e1; }
.fx-tab__state { font-size: .86rem; font-weight: 600; color: var(--cp-accent-ink); font-family: var(--fx-sans); }
.fx-tab[aria-selected="true"] .fx-tab__state { color: #bfdbfe; }

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

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

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

.fx-head { margin-top: .75rem; padding: .7rem .9rem; background: var(--cp-white); border: 1px solid var(--cp-line); border-radius: 2px; }
.fx-head__row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.fx-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; }
.fx-head__dl dt { color: var(--fx-muted); }
.fx-head__dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

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

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

/* 確かめる所 */
.fx-block { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--cp-line); scroll-margin: 8rem; }
.fx-block__top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .1rem; }
.fx-block__field { font-size: .92rem; font-weight: 600; color: var(--cp-primary); }
/* border を付けると内側の縦横比がずれて切り抜きが動くので、枠は box-shadow で描く */
.fx-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); }
.fx-crop img { position: absolute; max-width: none; height: auto; }
/* かすれの切り抜きは、FAX の点の集まりが字に見えるように少しなめらかにする。画像そのものは変えない */
.fx-crop--tight img { filter: blur(1.1px) contrast(1.5); }
.fx-say { margin-top: .5rem !important; font-size: .95rem; line-height: 1.75; overflow-wrap: anywhere; }
.fx-say b { font-family: var(--fx-sans); font-weight: 700; }
.fx-why { margin-top: .15rem !important; font-size: .9rem; color: var(--fx-muted); line-height: 1.7; overflow-wrap: anywhere; font-family: var(--fx-sans); text-wrap: pretty; }
.fx-group-label { margin-top: .6rem !important; font-size: .88rem; font-weight: 600; color: var(--cp-text); }
.fx-choices { display: grid; gap: .4rem; margin-top: .35rem; }
.fx-choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fx-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; 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; }
.fx-btn--primary { background: var(--cp-primary); color: #fff; }
.fx-btn--quiet { border-color: var(--cp-line); color: var(--cp-text); font-weight: 500; }
/* タッチの端末で押したあとに濃い色が残らないように */
@media (hover: hover) {
  .fx-btn:hover { background: var(--cp-primary); color: #fff; }
  .fx-btn--primary:hover { background: var(--cp-navy-deep); border-color: var(--cp-navy-deep); }
  .fx-btn--quiet:hover { background: var(--cp-cream); color: var(--cp-text); border-color: var(--cp-muted); }
}
.fx-btn--small { padding-inline: .7rem; font-size: .88rem; white-space: nowrap; }
.fx-btn:disabled, .fx-btn:disabled:hover { background: var(--cp-line); border-color: var(--cp-line); color: var(--fx-muted); cursor: not-allowed; }
.fx-cand { justify-content: flex-start; text-align: left; flex-wrap: wrap; gap: .1rem .6rem; }
.fx-cand__sku { font-family: var(--fx-sans); font-weight: 700; }
.fx-cand__why { font-size: .86rem; font-weight: 500; opacity: .85; font-family: var(--fx-sans); }
.fx-type { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; margin-top: .35rem; }
.fx-input { width: 100%; min-height: 44px; padding: .4rem .65rem; font-family: var(--fx-sans); font-size: 16px; line-height: 1.4; background: #fff; border: 1.5px solid var(--cp-muted); border-radius: 2px; }
.fx-input[aria-invalid="true"] { border-color: var(--fx-sku-ink); }
.fx-err { margin-top: .3rem !important; font-size: .88rem; font-weight: 600; color: var(--fx-sku-ink); }
.fx-tools { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .4rem; }
.fx-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; }
.fx-link:hover { color: var(--cp-navy-deep); }

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

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

/* 全体を拡大して見る */
.fx-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; }
.fx-zoom[open] { display: flex; flex-direction: column; }
.fx-zoom::backdrop { background: rgba(2, 6, 23, .72); }
.fx-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); }
.fx-zoom__title { font-size: .98rem; font-weight: 600; color: var(--cp-primary); margin: 0; }
.fx-zoom__ctrl { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.fx-zoom__pct { min-width: 3.2em; text-align: center; font-family: var(--fx-sans); font-size: .88rem; }
.fx-zoom__scroll { flex: 1; min-height: 0; overflow: auto; background: var(--cp-cream); -webkit-overflow-scrolling: touch; }
.fx-zoom__scroll:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: -3px; }
/* main.css の「動きを減らす」は全部に短い transition を付ける。大きさが遅れて変わると中心の計算がずれるので切る */
.fx-zoom__page { position: relative; aspect-ratio: 1728 / 2290; margin-inline: auto; background: #fff; transition: none !important; }
.fx-zoom__page img { display: block; width: 100%; height: 100%; max-width: none; }
html.fx-noscroll { overflow: hidden; }

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

@media (max-width: 1024px) {
  .fx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1025px) {
  .fx-note__list { columns: 2; column-gap: 2.5rem; }
  .fx-note__list li { break-inside: avoid; }
}
@media (max-width: 860px) {
  .fx-hero { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .fx-fig { min-height: 0; }
}
@media (max-width: 900px) {
  .fx-panel { grid-template-columns: minmax(0, 1fr); }
  .fx-faxcol { position: static; display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .75rem; align-items: center; box-shadow: none; padding: .55rem .75rem; }
  .fx-faxcol__head { display: block; margin: 0; grid-column: 2; grid-row: 1; }
  .fx-faxcol__head .fx-btn { margin-top: .45rem; width: 100%; }
  .fx-sheet { grid-column: 1; grid-row: 1; width: 100%; margin: 0; }
  .fx-sheet .fx-hit { display: none; }
}
@media (max-width: 768px) {
  .policy-footer .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .fx-page { --fx-head: 63px; }
  .site-header .brand { min-height: 44px; margin-block: -3px; }
  .fx-table { font-size: .86rem; }
  .fx-table th, .fx-table td { padding: .5rem .4rem; }
  .fx-table td:nth-child(2) { min-width: 6.5em; }
  .fx-table th:nth-child(4), .fx-table th:nth-child(5), .fx-table .is-unit, .fx-table .is-note { display: none; }
  .fx-tnote { display: block; font-size: .92em; color: var(--fx-muted); }
  .fx-tunit { display: inline; }
  .fx-table .is-sku { white-space: normal; overflow-wrap: anywhere; min-width: 4.8em; }
  .policy-footer .site-footer__inner { grid-template-columns: 1fr; }
  .fx-lead { text-align: left; }
  .fx-steps { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .fx-step__text { font-size: .92rem; }
  .fx-hero .can-eyebrow { margin-bottom: .6rem !important; }
  .fx-note { padding: .85rem .9rem .9rem; }
  .fx-tool { padding-top: 1.1rem; scroll-margin-top: -1.25rem; }
  .fx-app { margin-top: .75rem; }
  .fx-tabs { gap: .3rem; }
  .fx-tab { padding: .4rem .45rem; }
  .fx-tab__label { font-size: .84rem; line-height: 1.35; }
  .fx-tab__who { display: none; }
  .fx-tab__state { font-size: .8rem; margin-top: auto; }
  .fx-count { padding: .35rem .75rem; gap: .5rem; }
  .fx-count__main { font-size: .92rem; gap: .25rem; }
  .fx-count__sub { font-size: .86rem; }
  .fx-finish.is-ready { padding: .6rem .75rem .7rem; }
  .fx-finish.is-ready .fx-finish__msg { font-size: .88rem; line-height: 1.6; margin-bottom: .4rem !important; }
  .fx-count__num { font-size: 1.7rem; }
  .fx-rowitem { padding: .55rem .7rem; }
  .fx-rowitem.has-marks { padding: .7rem .75rem .85rem; }
  .fx-choices--2 { grid-template-columns: minmax(0, 1fr); }
  .fx-editor__grid { grid-template-columns: minmax(0, 1fr); }
  .fx-next__actions .can-cta, .fx-next__sub { width: 100%; }
  .fx-done__cta { width: 100%; padding-inline: .75rem; }
  .fx-reset { text-align: center; }
  .fx-zoom { width: 100vw; height: 100dvh; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-just-fixed { animation: none; }
  .fx-tab, .fx-btn, .can-cta, .can-cta svg { transition: none; }
  .can-cta:hover svg { transform: none; }
}
/* 見出し上の小さな文が折れても、飾りの線が離れないようにする保険 */
@media (max-width: 400px) {
  .fx-hero .can-eyebrow { letter-spacing: .08em; text-align: left; }
  .fx-hero .can-eyebrow::after { display: none; }
}
@media (max-width: 340px) {
  .fx-tab { padding-inline: .35rem; }
  .fx-tab__label { font-size: .79rem; }
  .fx-faxcol { grid-template-columns: 4rem minmax(0, 1fr); }
  .fx-tool__lead { display: none; }
}
/* 横向きなど高さのない画面では、固定の帯で作業の場所が狭くならないようにする */
@media (max-height: 500px) {
  .site-header, .fx-count, .fx-finish.is-ready { position: static; }
  html:has(#fx-app :focus-visible), html:has(.fx-finish.is-ready) { scroll-padding-top: 1rem; scroll-padding-bottom: 1rem; }
}
/* 小さなスマホでは、上の帯と合わせて画面の 30% を超えないよう、確定の帯を固定しない */
@media (max-height: 700px) {
  .fx-finish.is-ready { position: static; }
  html:has(.fx-finish.is-ready) { scroll-padding-bottom: 1rem; }
}

/* 全サンプル共通の整え（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 周目）: Safari は word-break:auto-phrase が効かないので、説明の文は入れてある <wbr> の所だけで折る。入りきらないときだけ語の途中で折る */
.can-title, .can-invite__title, .can-invite__text, .fx-lead, .fx-step__text, .fx-note__list li, .fx-tool__lead, .fx-tool__notice, .fx-fig__note, .fx-tab__label, .fx-say, .fx-why, .fx-finish__msg, .fx-prior, .fx-done__saved, .fx-done__lead, .fx-done__next p, .fx-diff, .fx-err { word-break: keep-all; overflow-wrap: anywhere; }
/* ボタンの語も入れてある <wbr> の所だけで折る。フッターの文も同じ（main の外なので共通の整えは効かない） */
.can-cta__text, .fx-finish .fx-btn--primary, .site-footer__tagline, .site-footer__contact p { word-break: keep-all; overflow-wrap: anywhere; }
.site-footer__tagline, .site-footer__contact p { text-wrap: pretty; }
/* 取引先を直して別の行についた印の知らせ */
.fx-newmark { margin-top: .35rem !important; color: var(--fx-over-ink); font-weight: 600; }
/* 数と単位、AI が読んだ値は 1 まとまりで折る */
.fx-say b { display: inline-block; }
/* かぎかっことその後ろの助詞は値と同じまとまりにする。値は入りきらないときだけ途中で折り、閉じかっこを行の頭に残さない */
.fx-say .fx-nobr b { display: inline; }
/* 共通の整えの brand の負の余白は、ロゴが 38px のスマホ向け。ロゴが 48px の PC ではヘッダーが 6px 縮み、--fx-head の 73px とずれるので打ち消す */
@media (min-width: 769px) {
  .site-header .brand { margin-block: 0; }
}
/* 狭い幅では取引先の名前が欄に入らないので、「直す」を下へ回して名前の幅を取る */
@media (max-width: 340px) {
  .fx-head__row { flex-wrap: wrap; }
  .fx-head__dl { flex-basis: 100%; }
  .fx-head__row > .fx-btn { margin-left: auto; }
}

/* 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}}
