@charset "UTF-8";
/* ==========================================================
   診断フォーム（チャット形式）・送信完了ページ
   ========================================================== */

.fp-col { display: flex; flex-direction: column; min-height: 100vh; }
.fp-body,
.fp-main { flex: 1; display: flex; flex-direction: column; }
.fp-aside { display: none; }

/* ---------- ヘッダー ---------- */
.fp-head {
  position: relative;
  isolation: isolate;
  padding: 18px var(--gutter) 26px;
  text-align: center;
  background: var(--white);
}
.fp-head__logo { display: inline-block; text-decoration: none; }
.fp-head__logo .brand { font-size: 20px; }
.fp-head__kicker {
  display: table;
  margin: 10px auto 0;
  padding: 3px 16px;
  border: 2.5px solid var(--sumi);
  border-radius: var(--pill);
  background: var(--white);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .12em;
}
.fp-head__title {
  margin-top: 10px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(28px, 8.4vw, 38px);
  line-height: 1.35;
  letter-spacing: .08em;
}
.fp-head__title em {
  font-style: normal;
  background: var(--grad-shu);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fp-head__pills { display: flex; justify-content: center; gap: 5px; margin-top: 14px; flex-wrap: wrap; }
.fp-head__pills li {
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--grad-shu);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}
.fp-head__pills .num { margin: 0 2px; font-size: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .fp-head__logo { animation: fp-rise .6s var(--ease-out) .05s both; }
  .fp-head__kicker { animation: fp-rise .6s var(--ease-out) .15s both; }
  .fp-head__title { animation: fp-rise .7s var(--ease-out) .25s both; }
  .fp-head__pills li:nth-child(1) { animation: fp-pop .5s var(--ease-spring) .45s both; }
  .fp-head__pills li:nth-child(2) { animation: fp-pop .5s var(--ease-spring) .53s both; }
  .fp-head__pills li:nth-child(3) { animation: fp-pop .5s var(--ease-spring) .61s both; }
}
@keyframes fp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fp-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ---------- 進み具合 ---------- */
.progress {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px var(--gutter) 12px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.progress__meta { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.progress__label { font-weight: 900; font-size: 13px; }
.progress__pct { font-size: 15px; color: var(--shu-deep); }
.progress__track { position: relative; height: 10px; border-radius: 10px; background: var(--band); overflow: hidden; }
.progress__bar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 6px, transparent 6px 12px),
    var(--grad-shu);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .5s var(--ease-out);
}

/* ---------- チャット ---------- */
.chat {
  flex: 1;
  padding: 26px 16px 56px;
  background: var(--soft);
}
.chat__log { display: grid; gap: 14px; }
.chat__noscript { padding: 20px; text-align: center; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.msg { display: flex; align-items: flex-end; gap: 10px; }
.msg--bot { padding-right: 16px; }
.msg__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--sumi);
  border-radius: 50%;
  background: var(--white);
}
.msg__avatar img { width: 28px; height: auto; }
.msg--follow .msg__avatar { visibility: hidden; }
.msg__body { min-width: 0; }
.msg__name { margin: 0 0 4px 4px; font-weight: 700; font-size: 11.5px; color: var(--muted); }
.msg__bubble {
  position: relative;
  padding: 12px 18px;
  border-radius: 20px 20px 20px 6px;
  background: var(--white);
  box-shadow: 0 2px 0 var(--line), 0 0 0 1px rgba(0, 0, 0, .06);
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.75;
}
.msg__bubble b { font-weight: 900; color: var(--shu-deep); }
.msg__hint { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }

.msg--user { justify-content: flex-end; padding-left: 48px; }
@media (max-width: 340px) { .msg--user { padding-left: 28px; } }
.msg--user .msg__bubble {
  border-radius: 20px 20px 6px 20px;
  background: var(--grad-shu);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 3px 0 #b8382b;
  word-break: normal;
  overflow-wrap: anywhere;
}
.msg__edit {
  flex: none;
  align-self: center;
  padding: 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  background: var(--white);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  order: -1;
  transition: border-color .2s, color .2s;
}
.msg__edit:hover { border-color: var(--sumi); color: var(--sumi); }

@media (prefers-reduced-motion: no-preference) {
  .msg--bot { animation: msg-in .45s var(--ease-out) both; transform-origin: left bottom; }
  .msg--user { animation: msg-in .4s var(--ease-spring) both; transform-origin: right bottom; }
  .ans { animation: fp-rise .45s var(--ease-out) both; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }

/* 入力中の点々 */
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); background: var(--line); } 40% { transform: translateY(-5px); background: var(--orange); } }

/* ---------- 回答エリア ---------- */
.ans {
  margin: 4px 0 6px 54px;
  padding: 16px;
  border: 2.5px solid var(--sumi);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 4px 5px 0 var(--sumi);
}
.ans__opts { display: grid; gap: 8px; }
.ans__opts--2 { grid-template-columns: 1fr 1fr; }
.opt {
  min-height: 52px;
  padding: 10px 8px;
  border: 2px solid var(--sumi);
  border-radius: 14px;
  background: var(--white);
  font-weight: 900;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .15s, color .15s, transform .15s var(--ease-out), box-shadow .15s;
  box-shadow: 0 3px 0 var(--sumi);
}
.opt:hover { background: #fff3e6; }
.opt:active { transform: translateY(3px); box-shadow: 0 0 0 var(--sumi); }
.opt[aria-pressed="true"] { background: var(--grad-shu); color: #fff; border-color: var(--sumi); }

.field { display: grid; gap: 6px; }
.field__label { font-weight: 900; font-size: 13px; }
.field__label small { margin-left: 6px; padding: 1px 8px; border-radius: var(--pill); background: var(--band); font-size: 11px; font-weight: 700; color: var(--muted); }
.field__label .req { background: var(--shu); color: #fff; }
.input,
.select,
.textarea {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 700;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 110px; line-height: 1.7; resize: vertical; }
.select {
  padding-right: 44px;
  background:
    linear-gradient(45deg, transparent 50%, var(--sumi) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--sumi) 50%) calc(100% - 15px) 50% / 7px 7px no-repeat,
    #fff;
}
.input:focus,
.select:focus,
.textarea:focus { outline: none; border-color: var(--shu); box-shadow: 0 0 0 4px rgba(224, 74, 58, .16); }
.input::placeholder,
.textarea::placeholder { color: #a9a9a9; font-weight: 500; }
.input[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: var(--shu); background-color: #fff6f4; }
.field-error { margin-top: 6px; font-weight: 700; font-size: 13px; color: var(--shu-deep); }
.field-error[hidden] { display: none; }

.next {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--pill);
  background: var(--sumi);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.next .ic { font-size: 20px; color: var(--yamabuki); stroke-width: 4.5; }
.next:hover { background: var(--sumi-2); }
.next:active { transform: translateY(2px); }

/* ---------- 確認と送信 ---------- */
.confirm { margin-left: 0; padding: 22px 18px 20px; }
.confirm__ttl {
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .1em;
}
.confirm__list { margin-bottom: 18px; }
.confirm__list > div {
  display: grid;
  grid-template-columns: 7.4em 1fr;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
  line-height: 1.55;
}
.confirm__list dt { font-weight: 700; color: var(--muted); }
.confirm__list dd { font-weight: 900; overflow-wrap: anywhere; }
@media (max-width: 340px) { .confirm__list > div { grid-template-columns: 1fr; gap: 2px; } }
.confirm__agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 4px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.confirm__agree input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--shu);
  cursor: pointer;
}
.confirm__agree a { color: var(--shu-deep); }
.confirm .field-error { text-align: center; }
.confirm .cta { margin-top: 18px; max-width: none; }
.confirm .cta[disabled] { cursor: progress; opacity: .7; animation: none; }
.confirm__fine { margin-top: 14px; text-align: center; font-size: 12px; line-height: 1.7; color: var(--muted); }
.submit-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1ee;
  color: var(--shu-deep);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.7;
  text-align: center;
  white-space: pre-line;
}
.submit-error[hidden] { display: none; }

/* ---------- フッター ---------- */
.foot--form { padding-bottom: 40px; }

/* ---------- 診断後の流れ（PCで右に表示） ---------- */
.next-panel {
  padding: 26px 22px 22px;
  border: 3px solid var(--sumi);
  border-radius: 26px;
  background: var(--white);
  box-shadow: 8px 10px 0 var(--sumi);
}
.next-panel__ttl { margin-bottom: 14px; text-align: center; font-family: var(--f-display); font-weight: 900; font-size: 22px; letter-spacing: .08em; }
.next-panel__list { display: grid; gap: 14px; }
.next-panel__list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.next-panel__list .num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-shu);
  color: #fff;
  font-size: 12px;
}
.next-panel__list p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.next-panel__list b { display: block; font-weight: 900; font-size: 15px; color: var(--sumi); }
.next-panel__note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.next-panel__note .ic { font-size: 18px; margin-top: 2px; stroke-width: 3.5; color: var(--shu); }

/* ==========================================================
   送信完了ページ
   ========================================================== */
.thanks { flex: 1; padding: 48px var(--gutter) 64px; text-align: center; }
.thanks__stamp {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: 0 auto 26px;
  border: 5px solid var(--shu);
  border-radius: 50%;
  color: var(--shu);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: .1em;
  rotate: -10deg;
  box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 6px rgba(224, 74, 58, .5);
}
@media (prefers-reduced-motion: no-preference) {
  .thanks__stamp { animation: thanks-stamp .6s var(--ease-spring) .2s both; }
  .thanks__title { animation: fp-rise .6s var(--ease-out) .6s both; }
  .thanks__lead { animation: fp-rise .6s var(--ease-out) .75s both; }
}
@keyframes thanks-stamp { from { opacity: 0; transform: scale(2.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
.thanks__title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(26px, 7.6vw, 34px);
  line-height: 1.45;
  letter-spacing: .04em;
}
.thanks__lead { margin-top: 16px; font-size: 15.5px; line-height: 1.9; }
.thanks__card {
  max-width: 460px;
  margin: 32px auto 0;
  padding: 22px 20px;
  border: 2.5px solid var(--sumi);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 5px 6px 0 var(--sumi);
  text-align: left;
}
.thanks__card-ttl { margin-bottom: 12px; text-align: center; font-weight: 900; font-size: 16px; }
.thanks__docs { display: grid; gap: 10px; }
.thanks__docs li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.thanks__docs .ic { font-size: 22px; margin-top: 1px; color: var(--shu); stroke-width: 4.5; }
.thanks__docs b { display: block; font-weight: 900; }
.thanks__docs small { font-size: 12.5px; color: var(--muted); }
.thanks__note { margin-top: 26px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.thanks__back {
  display: inline-block;
  margin-top: 26px;
  padding: 10px 26px;
  border: 2px solid var(--sumi);
  border-radius: var(--pill);
  font-weight: 900;
  font-size: 14px;
  text-decoration: none;
}
.thanks__back:hover { background: var(--sumi); color: #fff; }

/* ==========================================================
   PC（1024px以上）：左に診断 右に診断後の流れ
   ========================================================== */
@media (min-width: 1024px) {
  html { scroll-padding-top: calc(var(--bar-h) + 1px + 80px + 16px); }
  .fp-col { min-height: calc(100vh - var(--bar-h) - 1px); }
  .fp-head { padding: 52px 40px 44px; }
  /* ロゴとサービス名は上部のバーにあるので見出しでは省く */
  .fp-head__logo,
  .fp-head__kicker,
  .fp-head--logo { display: none; }
  .fp-head__title { margin-top: 0; font-size: 44px; }
  .fp-head__pills { gap: 8px; margin-top: 20px; }
  .fp-head__pills li { padding: 5px 16px; font-size: 14px; }
  .fp-head__pills .num { font-size: 19px; }

  .fp-body {
    display: grid;
    grid-template-columns: minmax(0, 760px) 320px;
    justify-content: center;
    align-items: start;
    gap: 40px;
    padding: 0 40px 88px;
  }
  .fp-main { border-radius: 28px; background: var(--soft); overflow: clip; }
  .progress { top: calc(var(--bar-h) + 1px); padding: 16px 32px 18px; }
  .chat { padding: 34px 32px 56px; background: transparent; }
  .ans { max-width: 580px; }
  .confirm { max-width: none; }
  .confirm__list > div { grid-template-columns: 10.5em 1fr; gap: 16px; font-size: 15px; }
  .fp-aside { display: block; position: sticky; top: calc(var(--bar-h) + 28px); }
  .foot--form { padding: 44px 40px; }

  .thanks { padding: 88px 40px 104px; }
  .thanks__title { font-size: 40px; }
  .thanks__lead { font-size: 17px; }
  .thanks__card { max-width: 560px; padding: 28px 32px; }
}
