/*
 * 上本町子の会話。styles.css / reform.css / machiko-guide.css の後に読み込む。
 * 人物画像のポーズ・原本の透過と比率は HTML が担当する。
 * 共通化するのは読みやすさだけ。形・構図・色・しっぽは各シーンで指定。
 * 背景画像、文字領域の clip-path、固定高さ、追加モーションは使わない。
 */

.machiko-talk {
  --talk-art: 150px;
  --talk-gap: 26px;
  --talk-paper: #fffdf8;
  --talk-edge: #e3d8c6;
  --talk-accent: #75573e;
  --talk-stack-tip: 58px;
  container-name: machiko-talk;
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px var(--talk-gap);
  width: 100%;
  max-width: 780px;
  min-width: 0;
  margin: 28px auto 34px;
  padding: 6px 0;
  color: var(--ink, #473d34);
  font-family: var(--body, sans-serif);
  font-size: 13px;
  line-height: 1.95;
  text-align: left;
}

.machiko-talk,
.machiko-talk *,
.machiko-talk *::before,
.machiko-talk *::after {
  box-sizing: border-box;
}

.machiko-talk > .machiko-talk__art {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--talk-art);
  width: var(--talk-art);
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  align-self: flex-start;
  background: transparent;
}

.machiko-talk > .machiko-talk__art > img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  mix-blend-mode: normal;
}

.machiko-talk > .machiko-talk__speech {
  position: relative;
  isolation: isolate;
  flex: 1 1 320px;
  min-width: min(150px, 100%);
  max-width: 100%;
  margin: 0;
  padding: 25px 30px 27px;
  border: 1px solid var(--talk-edge);
  background: var(--talk-paper);
  color: var(--ink, #473d34);
  line-height: inherit;
  text-align: left;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* 名札は吹き出しの内側の通常フロー。本文やしっぽと重ねない。 */
.machiko-talk .machiko-talk__speech > .machiko-talk__speaker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 7px;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #ffffffc4;
  color: var(--talk-accent);
  font-family: var(--round, sans-serif);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.machiko-talk .machiko-talk__speaker small {
  font-size: 10px;
  font-weight: 500;
}

.machiko-talk .machiko-talk__speech > :is(h2, h3) {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--brown, #69452f);
  font-family: var(--round, sans-serif);
  font-size: clamp(17px, 1.7vw, 20px);
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: .01em;
}

.machiko-talk .machiko-talk__speech > p {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.machiko-talk .machiko-talk__speech > p:last-of-type {
  margin-bottom: 0;
}

.machiko-talk .machiko-talk__speech strong {
  color: var(--brown, #69452f);
  font-weight: 700;
}

.machiko-talk .machiko-talk__speech :is(ul, ol) {
  padding-inline-start: 1.4em;
  margin-block: 12px;
}

.machiko-talk .machiko-talk__speech p a {
  color: var(--green, #568741);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* CTA の色と既存フォーカスを継承。狭い吹き出しでもラベルを折り返す。 */
.machiko-talk .machiko-talk__speech :is(a, button) {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.machiko-talk .machiko-talk__speech > :is(a, button),
.machiko-talk .machiko-talk__speech > p > :is(.line-button, .reform-home-button) {
  position: relative;
  z-index: 1;
  margin-top: 17px;
}

.machiko-talk .machiko-talk__speech :is(.line-button, .reform-home-button, .text-cta) {
  min-height: 44px;
  gap: 8px;
  padding: 11px 16px;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
  white-space: normal;
}

.machiko-talk .machiko-talk__speech .reform-home-button {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: fit-content;
  margin-bottom: 0;
}

.machiko-talk .machiko-talk__speech .line-button > :not(.icon) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.machiko-talk .machiko-talk__speech .line-button > .icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.machiko-talk .machiko-talk__speech .line-button b {
  flex-shrink: 0;
  font-size: 19px;
}

.machiko-talk .machiko-talk__speech :is(a, button):focus-visible {
  outline: 3px solid var(--blue, #3d7b90);
  outline-offset: 4px;
}

/* しっぽだけは絶対配置。本文パディングの外へ張り出す。 */
.machiko-talk .machiko-talk__tail {
  position: absolute;
  z-index: 0;
  top: 54px;
  left: -11px;
  display: block;
  width: 21px;
  height: 21px;
  border: 0;
  border-left: 1px solid var(--talk-edge);
  border-bottom: 1px solid var(--talk-edge);
  background: var(--talk-paper);
  transform: rotate(45deg);
  pointer-events: none;
}

/* 01 / HOME — のぞき見。人物は右、白い斜めの声は右へ。 */
.machiko-talk--home-welcome {
  --talk-art: 160px;
  --talk-gap: 32px;
  --talk-paper: #fff;
  --talk-edge: #e9e2d5;
  --talk-accent: #80624c;
  --talk-stack-tip: calc(100% - 83px);
  align-items: center;
  padding-inline: 2px;
}

.machiko-talk--home-welcome > .machiko-talk__art {
  order: 2;
  align-self: center;
}

.machiko-talk--home-welcome > .machiko-talk__speech {
  order: 1;
  border-radius: 42px 55px 36px 20px / 37px 43px 30px 23px;
  border-color: #ede6da;
  padding: 24px 31px;
  box-shadow: 0 4px 14px #69452f06;
}

.machiko-talk--home-welcome .machiko-talk__speaker {
  background: #f8f2e8;
  transform: rotate(-2deg);
}

.machiko-talk--home-welcome .machiko-talk__tail {
  top: calc(50% - 18px);
  right: -30px;
  left: auto;
  width: 32px;
  height: 29px;
  border: 0;
  clip-path: polygon(0 0, 100% 30%, 0 100%);
  transform: none;
}

/* 02 / HOME — リフォームへのお誘い。青い上下のゆるやかな弧。 */
.machiko-talk--home-remodel {
  --talk-art: 140px;
  --talk-gap: 30px;
  --talk-paper: #edf7fa;
  --talk-edge: #cbdfe5;
  --talk-accent: #507e88;
  --talk-stack-tip: 53px;
  align-items: center;
}

.machiko-talk--home-remodel > .machiko-talk__art {
  align-self: center;
  margin-top: 8px;
}

.machiko-talk--home-remodel > .machiko-talk__speech {
  border-radius: 48% 42% 40% 46% / 22px 32px 28px 32px;
  padding: 28px 32px 30px;
  border-top: 2px solid #d4e8ed;
  border-bottom: 2px solid #bfdbe2;
}

.machiko-talk--home-remodel .machiko-talk__speaker {
  background: #fff;
  border-bottom: 1px solid #c6dfe4;
}

.machiko-talk--home-remodel .machiko-talk__tail {
  top: 44px;
  left: -16px;
  width: 25px;
  height: 18px;
  border-radius: 0 0 0 7px;
  transform: skewY(-17deg);
}

/* 03 / HOME — 虫眼鏡の問いかけ。クリームの楕円と茶色の線。 */
.machiko-talk--home-value {
  --talk-art: 145px;
  --talk-gap: 24px;
  --talk-paper: #fff9e9;
  --talk-edge: #ae8f66;
  --talk-accent: #7f613c;
  --talk-stack-tip: 56px;
  align-items: center;
}

.machiko-talk--home-value > .machiko-talk__art {
  align-self: center;
}

.machiko-talk--home-value > .machiko-talk__speech {
  border: 1.5px solid var(--talk-edge);
  border-radius: 50% / 39px;
  padding: 26px 30px;
}

.machiko-talk--home-value .machiko-talk__speaker {
  padding-inline: 6px;
  border-radius: 0;
  background: transparent;
  border-bottom: 2px dotted #d3bc92;
}

.machiko-talk--home-value .machiko-talk__tail {
  top: calc(50% - 12px);
  left: -13px;
  width: 24px;
  height: 18px;
  border-left-width: 1.5px;
  border-bottom-width: 1.5px;
  border-radius: 0 0 0 11px;
  transform: rotate(23deg);
}

/* 04 / HOME — ぶら下がる町子と、レールの下の不規則な雲。 */
.machiko-talk--home-comfort {
  --talk-art: 150px;
  --talk-gap: 30px;
  --talk-paper: #fffdf7;
  --talk-edge: #e7dbc3;
  --talk-accent: #7e7957;
  --talk-stack-tip: 69px;
  padding-top: 16px;
  border-top: 2px solid #d9e3ca;
}

.machiko-talk--home-comfort > .machiko-talk__art {
  margin-top: -16px;
}

.machiko-talk--home-comfort > .machiko-talk__speech {
  margin-top: 21px;
  padding: 28px 33px;
  border-radius: 69px 42px 58px 35px / 39px 60px 38px 54px;
  box-shadow: 5px 5px 0 #f3efdf;
}

.machiko-talk--home-comfort > .machiko-talk__speech::before,
.machiko-talk--home-comfort > .machiko-talk__speech::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid var(--talk-edge);
  background: var(--talk-paper);
  border-radius: 50%;
  pointer-events: none;
}

.machiko-talk--home-comfort > .machiko-talk__speech::before {
  top: -9px;
  left: 25%;
  width: 52px;
  height: 25px;
  border-bottom: 0;
}

.machiko-talk--home-comfort > .machiko-talk__speech::after {
  right: 21%;
  bottom: -7px;
  width: 39px;
  height: 19px;
  border-top: 0;
}

.machiko-talk--home-comfort .machiko-talk__speaker {
  background: #edf2e3;
  border-radius: 12px 17px 11px 16px;
}

.machiko-talk--home-comfort .machiko-talk__tail {
  top: 71px;
  left: -19px;
  width: 28px;
  height: 15px;
  border-radius: 0 0 0 14px;
  transform: rotate(14deg);
}

/* 05 / HOME — スマホの横で話す、小さな LINE 風チャット。 */
.machiko-talk--home-line {
  --talk-art: 135px;
  --talk-gap: 28px;
  --talk-paper: #eaf4e2;
  --talk-edge: #bacead;
  --talk-accent: #55774a;
  --talk-stack-tip: 51px;
  max-width: 710px;
}

.machiko-talk--home-line > .machiko-talk__art {
  margin-top: 10px;
}

.machiko-talk--home-line > .machiko-talk__speech {
  align-self: center;
  border-radius: 20px 24px 24px 7px;
  padding: 21px 25px;
  border-bottom: 3px solid #d4e5c7;
}

.machiko-talk--home-line .machiko-talk__speaker {
  background: transparent;
  border-radius: 0;
  padding-inline: 0;
  margin-bottom: 6px;
  letter-spacing: .08em;
}

.machiko-talk--home-line .machiko-talk__tail {
  top: 48px;
  left: -18px;
  width: 23px;
  height: 21px;
  border: 0;
  clip-path: polygon(100% 0, 0 48%, 100% 100%);
  transform: none;
}

/* コンパクト指定は FAQ / お問い合わせの4シーンだけに適用する。 */
.machiko-talk:where(.machiko-talk--home-faq, .machiko-talk--home-contact, .machiko-talk--reform-faq, .machiko-talk--reform-key) {
  --talk-art: 94px;
  --talk-gap: 24px;
  font-size: 12px;
}

.machiko-talk:where(.machiko-talk--home-faq, .machiko-talk--home-contact, .machiko-talk--reform-faq, .machiko-talk--reform-key) > .machiko-talk__speech {
  flex-basis: 170px;
  padding: 20px 21px;
}

.machiko-talk:where(.machiko-talk--home-faq, .machiko-talk--home-contact, .machiko-talk--reform-faq, .machiko-talk--reform-key) .machiko-talk__speech > :is(h2, h3) {
  font-size: 17px;
}

/* 06 / HOME — 考え中。ぽわぽわの輪郭と3つの思考泡。 */
.machiko-talk--home-faq {
  --talk-paper: #fbfcf5;
  --talk-edge: #d6d9c4;
  --talk-accent: #747752;
  --talk-stack-tip: 48px;
  align-items: center;
}

.machiko-talk--home-faq > .machiko-talk__art {
  align-self: center;
  margin-top: 15px;
}

.machiko-talk--home-faq > .machiko-talk__speech {
  border-radius: 42px 36px 48px 32px / 34px 44px 33px 42px;
  border-style: dotted;
  border-width: 2px;
}

.machiko-talk--home-faq .machiko-talk__speaker {
  background: #eef0df;
  padding: 1px 8px;
  border-radius: 16px 9px 14px 10px;
  font-size: 11px;
}

.machiko-talk--home-faq .machiko-talk__tail {
  top: 58px;
  left: -20px;
  width: 12px;
  height: 12px;
  border: 1px solid #cbd0b6;
  border-radius: 50%;
  transform: none;
}

.machiko-talk--home-faq .machiko-talk__tail::before,
.machiko-talk--home-faq .machiko-talk__tail::after {
  content: "";
  position: absolute;
  border: 1px solid #cbd0b6;
  border-radius: 50%;
  background: var(--talk-paper);
}

.machiko-talk--home-faq .machiko-talk__tail::before {
  top: -13px;
  left: 12px;
  width: 18px;
  height: 18px;
}

.machiko-talk--home-faq .machiko-talk__tail::after {
  top: 13px;
  left: -8px;
  width: 6px;
  height: 6px;
}

/* 07 / HOME — ハートのポーズ。淡い桃色、左右ふっくらの声。 */
.machiko-talk--home-contact {
  --talk-art: 86px;
  --talk-paper: #fff4ef;
  --talk-edge: #e8cfc4;
  --talk-accent: #936d64;
  --talk-stack-tip: 43px;
  align-items: center;
  padding-top: 11px;
}

.machiko-talk--home-contact > .machiko-talk__art {
  align-self: center;
  margin-top: 3px;
}

.machiko-talk--home-contact > .machiko-talk__speech {
  border-radius: 43% 48% 45% 41% / 35px 37px 49px 43px;
  padding: 23px 27px;
  border-bottom: 2px solid #ebd5ca;
}

.machiko-talk--home-contact .machiko-talk__speaker {
  background: #fffdf6;
  border: 1px solid #ecd7cb;
  font-size: 11px;
}

.machiko-talk--home-contact .machiko-talk__tail {
  top: 46px;
  left: -10px;
  width: 19px;
  height: 20px;
  border-radius: 0 0 0 12px;
  transform: rotate(35deg);
}

/* 08 / REFORM — ご挨拶の手紙。縦の便箋と切手風の名札。 */
.machiko-talk--reform-letter {
  --talk-art: 142px;
  --talk-gap: 34px;
  --talk-paper: #fffdf5;
  --talk-edge: #d8c9a9;
  --talk-accent: #897448;
  --talk-stack-tip: calc(100% - 67px);
  align-items: center;
  padding-inline: 3px;
}

.machiko-talk--reform-letter > .machiko-talk__art {
  order: 2;
  align-self: center;
  margin-top: 28px;
}

.machiko-talk--reform-letter > .machiko-talk__speech {
  order: 1;
  padding: 28px 30px 33px;
  border-radius: 9px 7px 32px 7px;
  border-top: 4px double #d5c3a0;
  border-bottom: 4px double #ded0b3;
  box-shadow: 4px 6px 0 #f2ead9;
}

.machiko-talk--reform-letter .machiko-talk__speech > .machiko-talk__speaker {
  padding: 5px 12px;
  border: 2px dotted #baa885;
  border-radius: 0;
  background: #f5f0df;
  letter-spacing: .08em;
}

.machiko-talk--reform-letter .machiko-talk__tail {
  top: 78px;
  right: -12px;
  left: auto;
  width: 24px;
  height: 25px;
  border: 0;
  border-top: 1px solid var(--talk-edge);
  border-right: 1px solid var(--talk-edge);
  transform: rotate(32deg);
}

/* 09 / REFORM — 工事範囲を確認。左のクリップボードと出っ張り。 */
.machiko-talk--reform-scope {
  --talk-art: 145px;
  --talk-gap: 25px;
  --talk-paper: #f4f7f0;
  --talk-edge: #cbd6bf;
  --talk-accent: #647957;
  --talk-stack-tip: 61px;
  align-items: flex-start;
}

.machiko-talk--reform-scope > .machiko-talk__art {
  margin-top: 18px;
}

.machiko-talk--reform-scope > .machiko-talk__speech {
  border-radius: 13px 13px 23px 13px;
  padding: 26px 27px;
  border-top: 3px solid #bacba8;
}

.machiko-talk--reform-scope .machiko-talk__speaker {
  background: #e5ecd9;
  border-radius: 4px;
}

.machiko-talk--reform-scope .machiko-talk__tail {
  top: 57px;
  left: -19px;
  width: 20px;
  height: 25px;
  border: 1px solid var(--talk-edge);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  transform: none;
}

/* 10 / REFORM — 寸法を測る横長の青い声。右下へ小さなしっぽ。 */
.machiko-talk--reform-size {
  --talk-art: 160px;
  --talk-gap: 30px;
  --talk-paper: #eef6f8;
  --talk-edge: #bfd6dc;
  --talk-accent: #567e87;
  --talk-stack-tip: calc(100% - 78px);
  align-items: flex-end;
}

.machiko-talk--reform-size > .machiko-talk__art {
  order: 2;
  align-self: flex-end;
  margin-bottom: 17px;
}

.machiko-talk--reform-size > .machiko-talk__speech {
  order: 1;
  padding: 22px 29px 35px;
  border-radius: 34px 22px 17px 29px / 29px 21px 21px 25px;
  border-bottom: 2px solid #9ebfc8;
}

.machiko-talk--reform-size > .machiko-talk__speech::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 29px;
  width: min(98px, calc(100% - 58px));
  height: 8px;
  border-bottom: 1px solid #9ebdc5;
  background: repeating-linear-gradient(90deg, #adc9d0 0 1px, transparent 1px 10px);
  pointer-events: none;
}

.machiko-talk--reform-size .machiko-talk__speaker {
  background: transparent;
  border-bottom: 1px solid #b5cdd4;
  border-radius: 0;
  padding-inline: 0;
}

.machiko-talk--reform-size .machiko-talk__tail {
  top: auto;
  right: -17px;
  bottom: 36px;
  left: auto;
  width: 25px;
  height: 19px;
  border: 0;
  border-top: 1px solid var(--talk-edge);
  border-right: 1px solid var(--talk-edge);
  border-radius: 0 9px 0 0;
  transform: skewY(-22deg);
}

/* 11 / REFORM — 大切な注意。折り目のあるクリームの吹き出し。 */
.machiko-talk--reform-caution {
  --talk-art: 135px;
  --talk-gap: 32px;
  --talk-paper: #fff7e5;
  --talk-edge: #bd9a62;
  --talk-accent: #8e6b37;
  --talk-stack-tip: calc(100% - 59px);
  align-items: flex-start;
  padding-top: 16px;
}

.machiko-talk--reform-caution > .machiko-talk__art {
  order: 2;
  margin-top: -10px;
  transform: rotate(2deg);
  transform-origin: center bottom;
}

.machiko-talk--reform-caution > .machiko-talk__speech {
  order: 1;
  margin-top: 20px;
  padding: 30px 33px 27px;
  border: 1.5px solid var(--talk-edge);
  border-radius: 7px 27px 9px 22px;
}

.machiko-talk--reform-caution > .machiko-talk__speech::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 23px;
  height: 23px;
  border-left: 1px solid #cfb17f;
  border-bottom: 1px solid #cfb17f;
  border-radius: 0 25px 0 5px;
  background: #f1dfbb;
  pointer-events: none;
}

.machiko-talk--reform-caution .machiko-talk__speaker {
  border-radius: 4px 11px 4px 8px;
  background: #f3e3c2;
}

.machiko-talk--reform-caution .machiko-talk__tail {
  top: 35px;
  right: -20px;
  left: auto;
  width: 29px;
  height: 17px;
  border: 0;
  border-top: 1.5px solid var(--talk-edge);
  border-right: 1.5px solid var(--talk-edge);
  transform: rotate(-24deg);
}

/* 12 / REFORM — 最初の相談。大きな声と下の小さなお返事の二段。 */
.machiko-talk--reform-first {
  --talk-art: 145px;
  --talk-gap: 28px;
  --talk-paper: #fffaf0;
  --talk-edge: #e6d7b8;
  --talk-accent: #8b7047;
  --talk-stack-tip: 61px;
  align-items: center;
}

.machiko-talk--reform-first > .machiko-talk__art {
  align-self: center;
  margin-top: 25px;
}

.machiko-talk--reform-first > .machiko-talk__speech {
  padding: 25px 28px 27px;
  border-radius: 34px 34px 16px 30px;
  border-bottom: 3px solid #efdfbb;
}

.machiko-talk--reform-first .machiko-talk__speaker {
  background: #f3e6c9;
  border-radius: 14px 14px 14px 5px;
}

.machiko-talk--reform-first .machiko-talk__tail {
  top: 60px;
  left: -17px;
  width: 25px;
  height: 23px;
  border-radius: 0 0 0 13px;
  transform: rotate(26deg);
}

.machiko-talk--reform-first .machiko-talk__speech .machiko-talk__echo,
.machiko-talk--reform-first .machiko-talk__speech > p + p {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 20px 0 0 auto;
  padding: 11px 15px;
  border: 1px solid #cfdbc1;
  border-radius: 17px 17px 5px 17px;
  background: #f0f5e9;
  color: #617753;
  font-size: 12px;
  line-height: 1.85;
}

.machiko-talk--reform-first .machiko-talk__speech .machiko-talk__echo::before,
.machiko-talk--reform-first .machiko-talk__speech > p + p::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 20px;
  width: 11px;
  height: 11px;
  border-top: 1px solid #cfdbc1;
  border-left: 1px solid #cfdbc1;
  background: #f0f5e9;
  transform: rotate(45deg);
  pointer-events: none;
}

/* 13 / REFORM — FAQ の短い返答。思考泡とは違う白い輪郭線。 */
.machiko-talk--reform-faq {
  --talk-art: 89px;
  --talk-gap: 23px;
  --talk-paper: #fff;
  --talk-edge: #b9c9c7;
  --talk-accent: #5d7774;
  --talk-stack-tip: 40px;
  align-items: flex-start;
}

.machiko-talk--reform-faq > .machiko-talk__art {
  margin-top: 8px;
}

.machiko-talk--reform-faq > .machiko-talk__speech {
  margin-top: 13px;
  padding: 18px 20px;
  border: 1.5px solid var(--talk-edge);
  border-radius: 17px 21px 20px 5px;
  box-shadow: 0 3px 0 #edf2f0;
}

.machiko-talk--reform-faq .machiko-talk__speaker {
  padding: 0 0 3px;
  border-radius: 0;
  border-bottom: 1px solid #d8e3df;
  background: transparent;
  font-size: 11px;
}

.machiko-talk--reform-faq .machiko-talk__tail {
  top: 30px;
  left: -14px;
  width: 22px;
  height: 17px;
  border-left-width: 1.5px;
  border-bottom-width: 1.5px;
  border-radius: 0 0 0 13px;
  transform: rotate(27deg);
}

/* 14 / REFORM — 住まいの鍵。右の人物とリネン色の横長楕円。 */
.machiko-talk--reform-key {
  --talk-art: 95px;
  --talk-gap: 26px;
  --talk-paper: #f7f5eb;
  --talk-edge: #d5dbc7;
  --talk-accent: #72815c;
  --talk-stack-tip: calc(100% - 42px);
  align-items: center;
}

.machiko-talk--reform-key > .machiko-talk__art {
  order: 2;
  align-self: center;
  margin-top: 12px;
}

.machiko-talk--reform-key > .machiko-talk__speech {
  order: 1;
  padding: 23px 27px;
  border-radius: 50% / 29px;
  border-bottom: 3px solid #b7c89d;
}

.machiko-talk--reform-key .machiko-talk__speaker {
  background: #eaf0df;
  border-radius: 6px 12px 6px 12px;
  font-size: 11px;
}

.machiko-talk--reform-key .machiko-talk__tail {
  top: 46px;
  right: -13px;
  left: auto;
  width: 22px;
  height: 19px;
  border: 0;
  border-top: 1px solid var(--talk-edge);
  border-right: 1px solid var(--talk-edge);
  border-radius: 0 11px 0 0;
  transform: rotate(28deg);
}

/*
 * 親が 490px の査定欄でも、画面幅に関係なく通常シーンを縦積みに。
 * 自分自身はクエリ対象にできないため、子の basis / order で折り返す。
 * コンパクト4種は 360px まで人物と本文を横に並べられる。
 */
@container machiko-talk (max-width: 520px) {
  .machiko-talk:not(.machiko-talk--compact):not(.machiko-talk--home-faq):not(.machiko-talk--home-contact):not(.machiko-talk--reform-faq):not(.machiko-talk--reform-key) > .machiko-talk__art {
    order: 0;
    align-self: flex-start;
    margin-top: 0;
    margin-bottom: 0;
    transform: none;
  }

  .machiko-talk:not(.machiko-talk--compact):not(.machiko-talk--home-faq):not(.machiko-talk--home-contact):not(.machiko-talk--reform-faq):not(.machiko-talk--reform-key) > .machiko-talk__speech {
    order: 1;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0;
  }

  .machiko-talk:not(.machiko-talk--compact):not(.machiko-talk--home-faq):not(.machiko-talk--home-contact):not(.machiko-talk--reform-faq):not(.machiko-talk--reform-key) .machiko-talk__tail {
    top: -11px;
    right: auto;
    bottom: auto;
    left: var(--talk-stack-tip);
    width: 21px;
    height: 21px;
    border: 0;
    border-top: 1px solid var(--talk-edge);
    border-left: 1px solid var(--talk-edge);
    border-radius: 4px 0 0;
    clip-path: none;
    transform: rotate(45deg);
  }

  .machiko-talk--home-welcome > .machiko-talk__art,
  .machiko-talk--reform-letter > .machiko-talk__art,
  .machiko-talk--reform-size > .machiko-talk__art,
  .machiko-talk--reform-caution > .machiko-talk__art {
    margin-left: auto;
  }

  .machiko-talk--home-value > .machiko-talk__speech {
    padding-inline: 27px;
    border-radius: 50% / 35px;
  }

  .machiko-talk--home-comfort > .machiko-talk__speech {
    padding-inline: 28px;
  }
}

/* 狭い親のコンパクト会話も、しっぽと本文を分離して縦積みにする。 */
@container machiko-talk (max-width: 360px) {
  .machiko-talk > .machiko-talk__art {
    order: 0;
    align-self: flex-start;
    margin-top: 0;
    margin-bottom: 0;
    transform: none;
  }

  .machiko-talk > .machiko-talk__speech {
    order: 1;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding-inline: 22px;
  }

  .machiko-talk--reform-key > .machiko-talk__art {
    margin-left: auto;
  }

  .machiko-talk .machiko-talk__tail {
    top: -11px;
    right: auto;
    bottom: auto;
    left: var(--talk-stack-tip);
    width: 21px;
    height: 21px;
    border: 0;
    border-top: 1px solid var(--talk-edge);
    border-left: 1px solid var(--talk-edge);
    border-radius: 4px 0 0;
    clip-path: none;
    transform: rotate(45deg);
  }

  .machiko-talk--home-faq .machiko-talk__tail {
    top: -20px;
    left: 43px;
    width: 11px;
    height: 11px;
    border: 1px solid #cbd0b6;
    border-radius: 50%;
    transform: none;
  }

  .machiko-talk--home-faq .machiko-talk__tail::before {
    top: 8px;
    left: 9px;
    width: 17px;
    height: 17px;
  }

  .machiko-talk--home-faq .machiko-talk__tail::after {
    top: -10px;
    left: -4px;
    width: 6px;
    height: 6px;
  }
}

/* 画面幅によるフォールバック。形は残し、縦積みの人物位置も別々に。 */
@media (max-width: 640px) {
  .machiko-talk {
    --talk-art: 135px;
    --talk-gap: 22px;
    gap: 23px var(--talk-gap);
    margin-block: 28px 32px;
    padding-inline: 0;
    font-size: 12px;
  }

  .machiko-talk > .machiko-talk__art {
    order: 0;
    align-self: flex-start;
    margin-top: 0;
    margin-bottom: 0;
    transform: none;
  }

  .machiko-talk > .machiko-talk__speech {
    order: 1;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding: 23px 26px;
  }

  .machiko-talk .machiko-talk__speech > :is(h2, h3) {
    font-size: 18px;
    letter-spacing: 0;
  }

  .machiko-talk .machiko-talk__tail {
    top: -11px;
    right: auto;
    bottom: auto;
    left: var(--talk-stack-tip);
    width: 21px;
    height: 21px;
    border: 0;
    border-top: 1px solid var(--talk-edge);
    border-left: 1px solid var(--talk-edge);
    border-radius: 4px 0 0;
    clip-path: none;
    transform: rotate(45deg);
  }

  .machiko-talk--home-welcome { --talk-art: 150px; }
  .machiko-talk--home-remodel { --talk-art: 125px; }
  .machiko-talk--home-value { --talk-art: 140px; }
  .machiko-talk--home-comfort { --talk-art: 135px; padding-top: 14px; }
  .machiko-talk--home-line { --talk-art: 120px; }
  .machiko-talk--reform-letter { --talk-art: 130px; }
  .machiko-talk--reform-scope { --talk-art: 133px; }
  .machiko-talk--reform-size { --talk-art: 150px; }
  .machiko-talk--reform-caution { --talk-art: 120px; }
  .machiko-talk--reform-first { --talk-art: 135px; }

  .machiko-talk--home-welcome > .machiko-talk__art,
  .machiko-talk--reform-letter > .machiko-talk__art,
  .machiko-talk--reform-size > .machiko-talk__art,
  .machiko-talk--reform-caution > .machiko-talk__art,
  .machiko-talk--reform-key > .machiko-talk__art {
    margin-left: auto;
  }

  .machiko-talk--home-value > .machiko-talk__art {
    margin-left: 6px;
  }

  .machiko-talk--home-comfort > .machiko-talk__art {
    margin-top: -14px;
    margin-left: 13px;
  }

  .machiko-talk--home-line > .machiko-talk__art {
    margin-left: 8px;
  }

  .machiko-talk--reform-first > .machiko-talk__art {
    margin-left: 10px;
  }

  .machiko-talk--home-welcome > .machiko-talk__speech {
    border-radius: 32px 45px 29px 16px / 30px 35px 26px 20px;
  }

  .machiko-talk--home-remodel > .machiko-talk__speech {
    border-radius: 43% 48% 42% 45% / 19px 27px 25px 28px;
    padding-block: 26px;
  }

  .machiko-talk--home-value > .machiko-talk__speech {
    border-radius: 50% / 33px;
    padding-block: 25px;
  }

  .machiko-talk--home-comfort > .machiko-talk__speech {
    border-radius: 47px 33px 45px 28px / 32px 46px 31px 41px;
    padding: 26px 28px;
  }

  .machiko-talk--home-line > .machiko-talk__speech {
    border-radius: 8px 23px 23px 23px;
    padding: 21px 24px;
  }

  .machiko-talk--reform-letter > .machiko-talk__speech {
    padding-block: 27px 30px;
    border-radius: 7px 7px 25px 7px;
  }

  .machiko-talk--reform-scope > .machiko-talk__speech {
    border-radius: 11px 11px 22px 11px;
  }

  .machiko-talk--reform-size > .machiko-talk__speech {
    padding-bottom: 35px;
    border-radius: 28px 19px 14px 24px;
  }

  .machiko-talk--reform-caution > .machiko-talk__speech {
    padding-top: 29px;
    border-radius: 6px 26px 8px 20px;
  }

  .machiko-talk--reform-first > .machiko-talk__speech {
    border-radius: 30px 30px 14px 25px;
  }

  .machiko-talk:where(.machiko-talk--home-faq, .machiko-talk--home-contact, .machiko-talk--reform-faq, .machiko-talk--reform-key) {
    --talk-art: 90px;
    font-size: 12px;
  }

  .machiko-talk--home-faq { --talk-stack-tip: 43px; }
  .machiko-talk--home-contact { --talk-stack-tip: 42px; }
  .machiko-talk--reform-faq { --talk-stack-tip: 40px; }
  .machiko-talk--reform-key { --talk-stack-tip: calc(100% - 43px); }

  .machiko-talk--home-faq > .machiko-talk__art {
    margin-left: 3px;
  }

  .machiko-talk--home-contact > .machiko-talk__art {
    width: 83px;
    flex-basis: 83px;
    margin-left: 9px;
  }

  .machiko-talk--reform-faq > .machiko-talk__art {
    width: 86px;
    flex-basis: 86px;
  }

  .machiko-talk--home-faq > .machiko-talk__speech {
    border-radius: 37px 32px 42px 28px / 31px 39px 30px 36px;
  }

  .machiko-talk--home-contact > .machiko-talk__speech {
    border-radius: 44% 47% 44% 42% / 31px 35px 44px 39px;
    padding: 24px 27px;
  }

  .machiko-talk--reform-faq > .machiko-talk__speech {
    border-radius: 8px 21px 19px 19px;
  }

  .machiko-talk--reform-key > .machiko-talk__speech {
    border-radius: 50% / 25px;
    padding-block: 24px;
  }

  .machiko-talk--home-faq .machiko-talk__tail {
    top: -20px;
    left: 43px;
    width: 11px;
    height: 11px;
    border: 1px solid #cbd0b6;
    border-radius: 50%;
    transform: none;
  }

  .machiko-talk--home-faq .machiko-talk__tail::before {
    top: 8px;
    left: 9px;
    width: 17px;
    height: 17px;
  }

  .machiko-talk--home-faq .machiko-talk__tail::after {
    top: -10px;
    left: -4px;
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 380px) {
  .machiko-talk {
    gap: 24px 0;
  }

  .machiko-talk > .machiko-talk__speech {
    padding-inline: 21px;
  }

  .machiko-talk .machiko-talk__speech > :is(h2, h3) {
    font-size: 17px;
  }

  .machiko-talk .machiko-talk__speech :is(.line-button, .reform-home-button) {
    gap: 7px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .machiko-talk--home-comfort > .machiko-talk__speech {
    padding-inline: 24px;
  }

  .machiko-talk--reform-caution > .machiko-talk__speech {
    padding-inline: 24px;
  }

  .machiko-talk--reform-first .machiko-talk__speech .machiko-talk__echo,
  .machiko-talk--reform-first .machiko-talk__speech > p + p {
    padding-inline: 12px;
  }
}

/*
 * ページ案内。旧 guide CSS が後から読み込まれても、修飾クラスを持つ
 * ローカルセレクターで上書きする。本文・リンクはすべて通常フロー。
 */
.machiko-page-guide.machiko-page-guide--home {
  margin: 0;
  padding: 20px 0 23px;
  border: 0;
  background: #fff;
}

.machiko-page-guide--home .machiko-page-guide__inner {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 18px 22px;
  min-width: 0;
  padding-block: 0;
}

.machiko-page-guide--home .machiko-page-guide__icon {
  grid-row: 1;
  grid-column: 1;
  width: 48px;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  margin: 0 auto;
}

.machiko-page-guide--home .machiko-page-guide__copy {
  position: relative;
  grid-column: 2;
  min-width: 0;
  padding: 13px 18px;
  border: 1px solid #ebe5d9;
  border-radius: 25px 31px 27px 9px;
  background: #fffefa;
}

.machiko-page-guide--home .machiko-page-guide__copy::before {
  content: "";
  position: absolute;
  top: 30px;
  left: -7px;
  width: 13px;
  height: 13px;
  border-left: 1px solid #ebe5d9;
  border-bottom: 1px solid #ebe5d9;
  background: #fffefa;
  transform: rotate(45deg);
  pointer-events: none;
}

.machiko-page-guide--home .machiko-page-guide__name {
  font-size: 13px;
  line-height: 1.7;
  gap: 3px 8px;
}

.machiko-page-guide--home .machiko-page-guide__name small {
  padding: 1px 7px;
  border-radius: 10px;
  background: #edf3e6;
  color: #697959;
  font-size: 9px;
}

.machiko-page-guide--home .machiko-page-guide__copy p {
  margin: 4px 0 0;
  color: var(--muted, #71695f);
  font-size: 11px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.machiko-page-guide--home .machiko-page-guide__links {
  display: flex;
  flex-wrap: wrap;
  grid-row: 1;
  grid-column: 3;
  align-items: center;
  gap: 7px 13px;
  max-width: 420px;
  min-width: 0;
}

.machiko-page-guide--home .machiko-page-guide__links a {
  flex: 1 1 calc(50% - 13px);
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #e5e7db;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.machiko-page-guide--home .machiko-page-guide__links a:hover {
  background: #f8fbf3;
  border-bottom-color: #a8bf93;
}

/* リフォームは象牙色の道しるべ。薄い破線のシートで整理する。 */
.machiko-page-guide.machiko-page-guide--reform {
  margin: 0;
  padding: 20px 0 26px;
  border: 0;
  background: #fffdf7;
}

.machiko-page-guide--reform .machiko-page-guide__inner {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(220px, 1fr) minmax(290px, 430px);
  align-items: center;
  gap: 17px 23px;
  min-width: 0;
  padding: 18px 23px;
  border: 1px dashed #d4c5a5;
  border-left: 4px solid #cbd6b5;
  border-radius: 3px 18px 5px 3px;
  background: #faf6e9;
}

.machiko-page-guide--reform .machiko-page-guide__icon {
  grid-row: 1;
  grid-column: 1;
  width: 49px;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  margin: 0 auto;
}

.machiko-page-guide--reform .machiko-page-guide__copy {
  grid-column: 2;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.machiko-page-guide--reform .machiko-page-guide__name {
  font-size: 13px;
  line-height: 1.7;
  gap: 4px 8px;
}

.machiko-page-guide--reform .machiko-page-guide__name small {
  padding: 1px 7px;
  border: 1px solid #ddcfb5;
  border-radius: 3px;
  background: #fffdf6;
  color: #897956;
  font-size: 9px;
}

.machiko-page-guide--reform .machiko-page-guide__copy p {
  margin: 6px 0 0;
  color: #786d5d;
  font-size: 11px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.machiko-page-guide--reform .machiko-page-guide__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 3;
  grid-row: 1;
  gap: 8px 12px;
  max-width: 430px;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px dashed #d6c9ae;
}

.machiko-page-guide--reform .machiko-page-guide__links a {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 9px 18px 9px 11px;
  border: 1px solid #dfd3b8;
  border-right: 3px solid #c6d1b1;
  border-radius: 3px 12px 12px 3px;
  background: #fffdf5;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.machiko-page-guide--reform .machiko-page-guide__links a::after {
  content: "";
  position: absolute;
  right: 7px;
  top: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-top: 1px solid #8c9d71;
  border-right: 1px solid #8c9d71;
  transform: rotate(45deg);
  pointer-events: none;
}

.machiko-page-guide--reform .machiko-page-guide__links a:hover {
  background: #f0f4e6;
  border-color: #b6c39d;
}

.machiko-page-guide:is(.machiko-page-guide--home, .machiko-page-guide--reform) .machiko-page-guide__links a:focus-visible {
  outline: 3px solid var(--blue, #3d7b90);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .machiko-page-guide--home .machiko-page-guide__inner {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px 20px;
  }

  .machiko-page-guide--home .machiko-page-guide__icon {
    grid-row: 1;
    align-self: center;
  }

  .machiko-page-guide--home .machiko-page-guide__links {
    grid-column: 2;
    grid-row: 2;
    max-width: none;
  }

  .machiko-page-guide--home .machiko-page-guide__links a {
    flex-basis: 130px;
  }

  .machiko-page-guide--reform .machiko-page-guide__inner {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px 20px;
  }

  .machiko-page-guide--reform .machiko-page-guide__icon {
    grid-row: 1 / 3;
  }

  .machiko-page-guide--reform .machiko-page-guide__links {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
    padding-left: 0;
    border-left: 0;
    padding-top: 11px;
    border-top: 1px dashed #d6c9ae;
  }
}

@media (max-width: 640px) {
  .machiko-page-guide.machiko-page-guide--home {
    padding: 18px 0 22px;
  }

  .machiko-page-guide--home .machiko-page-guide__inner {
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 13px 15px;
  }

  .machiko-page-guide--home .machiko-page-guide__icon {
    width: 39px;
    grid-row: 1;
  }

  .machiko-page-guide--home .machiko-page-guide__copy {
    padding: 12px 15px;
    border-radius: 21px 26px 23px 7px;
  }

  .machiko-page-guide--home .machiko-page-guide__links {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 6px 10px;
  }

  .machiko-page-guide--home .machiko-page-guide__links a {
    flex-basis: calc(50% - 10px);
    min-height: 44px;
    padding: 10px 8px;
    font-size: 11px;
  }

  .machiko-page-guide--home .machiko-page-guide__name,
  .machiko-page-guide--reform .machiko-page-guide__name {
    font-size: 12px;
    gap: 3px 6px;
  }

  .machiko-page-guide--home .machiko-page-guide__copy p,
  .machiko-page-guide--reform .machiko-page-guide__copy p {
    font-size: 11px;
    line-height: 1.85;
  }

  .machiko-page-guide.machiko-page-guide--reform {
    padding: 15px 0 22px;
  }

  .machiko-page-guide--reform .machiko-page-guide__inner {
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 13px 14px;
    padding: 15px 14px;
    border-radius: 3px 14px 4px 3px;
  }

  .machiko-page-guide--reform .machiko-page-guide__icon {
    width: 39px;
    grid-row: 1;
  }

  .machiko-page-guide--reform .machiko-page-guide__links {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .machiko-page-guide--reform .machiko-page-guide__links a {
    min-height: 44px;
    padding: 10px 17px 10px 9px;
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .machiko-page-guide--home .machiko-page-guide__inner {
    column-gap: 11px;
  }

  .machiko-page-guide--home .machiko-page-guide__copy {
    padding-inline: 12px;
  }

  .machiko-page-guide--reform .machiko-page-guide__inner {
    padding-inline: 11px;
    column-gap: 11px;
  }

  .machiko-page-guide--home .machiko-page-guide__links a,
  .machiko-page-guide--reform .machiko-page-guide__links a {
    font-size: 10px;
  }
}
