/* KISSFORM 回答画面（公開フォーム / トップのデモ / プレビューで共通） */
.kf, .kf-done {
  --kf-accent: #DB2455;
  --kf-on-accent: #fff;
  --kf-ink: #17142B;
  --kf-mute: #6F6A86;
  --kf-line: #D9D5E6;
  --kf-tint: color-mix(in srgb, var(--kf-accent) 9%, #fff);
  color: var(--kf-ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  text-align: left;
}
.kf *, .kf-done * { box-sizing: border-box; }

/* ---- ページ ---- */
body.kf-page { margin: 0; background: #fff; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; -webkit-text-size-adjust: 100%; }
.kf-wrap { flex: 1; width: 100%; max-width: 688px; margin: 0 auto; padding: clamp(40px, 12vh, 120px) 24px 48px; }
.kf-preview-bar { background: #17142B; color: #fff; font: 500 13px/1.5 "Zen Kaku Gothic New", sans-serif; text-align: center; padding: 8px 16px; }
.kf-powered { align-self: center; margin: 0 0 24px; padding: 6px 14px; border-radius: 99px; font: 500 12px/1.4 "Zen Kaku Gothic New", sans-serif; color: #6F6A86; text-decoration: none; border: 1px solid #E4E0EE; }
.kf-powered:hover { color: #17142B; border-color: #17142B; }
.kf-foot { align-self: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; margin: 0 0 24px; padding: 0 16px; }
.kf-foot .kf-powered { margin: 0; }
.kf-report { font: 400 12px/1.4 "Zen Kaku Gothic New", sans-serif; color: #8F8AA5; }
.kf-report:hover { color: #17142B; }
body.kf-embed { background: transparent; min-height: 0; }
body.kf-embed .kf-wrap { padding: 16px 16px 32px; }

/* ---- 見出し ---- */
.kf-head { margin-bottom: 40px; }
.kf-head h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.35; font-weight: 700; margin: 0; letter-spacing: .01em; }
.kf-head p { margin: 12px 0 0; color: var(--kf-mute); }

/* ---- 質問 ---- */
.kf-q { margin: 0 0 44px; }
.kf-label { font-size: 20px; line-height: 1.5; font-weight: 700; margin: 0; }
.kf-num { display: inline-block; min-width: 1.6em; color: var(--kf-accent); font-variant-numeric: tabular-nums; }
.kf-req { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 6px; background: var(--kf-tint); color: var(--kf-accent); font-size: 12px; font-weight: 700; vertical-align: .2em; }
.kf-desc { margin: 6px 0 0; color: var(--kf-mute); font-size: 15px; }
.kf-q[data-type=section] .kf-label { font-size: 24px; }
.kf-q[data-type=section] .kf-desc { font-size: 17px; color: var(--kf-ink); }
.kf-input { margin-top: 16px; }
.kf-note { margin: 8px 0 0; font-size: 13px; color: var(--kf-mute); }

.kf-text {
  display: block; width: 100%; padding: 13px 16px; font: inherit; font-size: 18px; color: inherit;
  background: #fff; border: 1.5px solid var(--kf-line); border-radius: 12px; outline: 0; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.kf-text { resize: vertical; min-height: 120px; line-height: 1.7; }
select.kf-text { padding-right: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236F6A86' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
input[type=date].kf-text { min-height: 54px; max-width: 280px; }
.kf-text::placeholder { color: #B4AFC6; }
.kf-text:hover { border-color: #B4AFC6; }
.kf-text:focus { border-color: var(--kf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--kf-accent) 18%, transparent); }

/* 選択肢 */
.kf-opts { display: grid; gap: 10px; }
.kf-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--kf-line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.kf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kf-opt kbd { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--kf-line); font: 700 12px/1 ui-sans-serif, system-ui, sans-serif; color: var(--kf-mute); background: #fff; }
.kf-opt span { flex: 1; overflow-wrap: anywhere; }
.kf-opt:hover { border-color: #B4AFC6; }
.kf-opt:active { transform: scale(.99); }
.kf-opt:has(input:checked) { border-color: var(--kf-accent); background: var(--kf-tint); }
.kf-opt:has(input:checked) kbd { background: var(--kf-accent); border-color: var(--kf-accent); color: var(--kf-on-accent); }
.kf-opt:has(input:focus-visible) { box-shadow: 0 0 0 4px color-mix(in srgb, var(--kf-accent) 22%, transparent); }
.kf-yesno { grid-template-columns: 1fr 1fr; max-width: 420px; }
@media (hover: none) { .kf-opt kbd { display: none; } .kf-opt { padding: 14px 16px; } }

/* 星 */
.kf-stars { display: flex; flex-wrap: wrap; gap: 4px; }
.kf-stars label { cursor: pointer; padding: 4px; border-radius: 10px; }
.kf-stars input { position: absolute; opacity: 0; pointer-events: none; }
.kf-stars svg { display: block; width: 40px; height: 40px; fill: #fff; stroke: #B4AFC6; stroke-width: 1.5; stroke-linejoin: round; transition: fill .12s, stroke .12s, transform .12s; }
.kf-stars label:has(input:checked) svg, .kf-stars label:has(~ label input:checked) svg { fill: var(--kf-accent); stroke: var(--kf-accent); }
.kf-stars:hover label:hover svg, .kf-stars:hover label:has(~ label:hover) svg { stroke: var(--kf-accent); }
.kf-stars label:active svg { transform: scale(.88); }
.kf-stars label:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--kf-accent) 30%, transparent); }

/* 数字で評価 */
.kf-scale { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.kf-scale label { cursor: pointer; }
.kf-scale input { position: absolute; opacity: 0; pointer-events: none; }
.kf-scale span { display: grid; place-items: center; height: 48px; border: 1.5px solid var(--kf-line); border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s, color .15s; }
.kf-scale label:hover span { border-color: #B4AFC6; }
.kf-scale input:checked + span { background: var(--kf-accent); border-color: var(--kf-accent); color: var(--kf-on-accent); }
.kf-scale input:focus-visible + span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--kf-accent) 22%, transparent); }
.kf-scale-ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--kf-mute); }
@media (max-width: 480px) { .kf-scale { gap: 3px; } .kf-scale span { height: 42px; font-size: 14px; border-radius: 8px; } }

/* エラー */
.kf-err, .kf-formerr { margin: 10px 0 0; color: #C4183C; font-size: 14px; font-weight: 500; }
.kf-q.has-err .kf-text { border-color: #C4183C; }
.kf-q.shake .kf-input { animation: kf-shake .3s; }
@keyframes kf-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.kf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- ボタン ---- */
.kf-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.kf-nav button { font: inherit; font-weight: 700; font-size: 16px; border-radius: 99px; padding: 12px 28px; cursor: pointer; border: 1.5px solid transparent; transition: transform .1s, filter .15s, border-color .15s; }
.kf-next, .kf-submit { background: var(--kf-accent); color: var(--kf-on-accent); }
.kf-next:hover, .kf-submit:hover { filter: brightness(.94); }
.kf-nav button:active { transform: scale(.97); }
.kf-nav button:focus-visible { outline: 3px solid color-mix(in srgb, var(--kf-accent) 40%, transparent); outline-offset: 2px; }
.kf-nav button:disabled { opacity: .6; cursor: default; }
.kf-back { order: 3; background: none; color: var(--kf-mute); padding: 12px 16px !important; }
.kf-back:hover { color: var(--kf-ink); }
.kf-hint { font-size: 13px; color: var(--kf-mute); }
.kf-formerr { flex-basis: 100%; }
.kf-nav [hidden], .kf-err[hidden], .kf[hidden], .kf-done[hidden] { display: none !important; }
@media (hover: none) { .kf-hint { display: none; } }

/* ---- 1問ずつ ---- */
.kf-progress { display: none; }
.kf.is-steps .kf-progress { display: block; position: fixed; inset: 0 0 auto 0; height: 4px; background: color-mix(in srgb, var(--kf-accent) 14%, #fff); z-index: 5; }
.kf-progress i { display: block; height: 100%; width: 0; background: var(--kf-accent); border-radius: 0 4px 4px 0; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.kf.is-steps:not(.at-first) .kf-head { display: none; }
.kf.is-steps .kf-q { display: none; margin-bottom: 32px; }
.kf.is-steps .kf-q.on { display: block; animation: kf-in .42s cubic-bezier(.2, .8, .2, 1); }
.kf.is-steps[data-dir=back] .kf-q.on { animation-name: kf-in-back; }
.kf.is-steps .kf-label { font-size: clamp(22px, 4.4vw, 28px); line-height: 1.45; }
.kf.is-steps .kf-desc { font-size: 16px; }
.kf.is-steps .kf-input { margin-top: 24px; }
@keyframes kf-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes kf-in-back { from { opacity: 0; transform: translateY(-28px); } }

/* ---- 完了 ---- */
.kf-done { text-align: center; padding: 8vh 0 0; outline: 0; }
.kf-done h2 { font-size: 26px; line-height: 1.4; margin: 20px 0 0; }
.kf-done p { margin: 10px auto 0; max-width: 34em; color: var(--kf-mute); }
.kf-seal { width: 96px; height: 96px; }
.kf-seal .disc { fill: var(--kf-accent); transform-origin: center; animation: kf-stamp .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.kf-seal .ring { fill: none; stroke: var(--kf-accent); stroke-width: 2; transform-origin: center; animation: kf-ring .7s .12s ease-out both; }
.kf-seal .tick { fill: none; stroke: var(--kf-on-accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: kf-tick .35s .3s ease-out forwards; }
@keyframes kf-stamp { from { transform: scale(1.7) rotate(-14deg); opacity: 0; } }
@keyframes kf-ring { from { transform: scale(.8); opacity: .8; } to { transform: scale(1.08); opacity: 0; } }
@keyframes kf-tick { to { stroke-dashoffset: 0; } }
.kf-demo-note { font-size: 14px; }
.kf-again { font: inherit; font-weight: 700; color: var(--kf-accent); background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .kf *, .kf-done * { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}

/* ---- 迷惑フォーム営業撃退の同意 ---- */
.kf-consent { flex-basis: 100%; margin-bottom: 4px; padding: 14px 16px; border-radius: 12px; background: var(--kf-tint); font-size: 14px; line-height: 1.6; }
.kf-consent label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.kf-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--kf-accent); cursor: pointer; }
.kf-consent a { color: inherit; text-underline-offset: 3px; }
.kf-consent p { margin: 6px 0 0 30px; font-size: 13px; color: var(--kf-mute); }
.kf-formerr { order: 99; }
.kf-q[hidden] { display: none !important; }
.kf-guard { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0 !important; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--kf-tint); color: var(--kf-mute) !important; font-size: 12px; font-weight: 700; }
.kf-guard svg { width: 13px; height: 13px; fill: none; stroke: var(--kf-accent); stroke-width: 1.8; }
.kf-guard a { margin-left: 8px; color: var(--kf-accent); text-underline-offset: 3px; }

/* 広告（直接開かれたフォームの下の AdSense・送信完了の PR 枠。埋め込みでは出さない） */
.ad-unit { max-width: 640px; margin: 24px auto 0; padding: 0 16px; }
.ad-label { display: inline-block; font-size: 11px; letter-spacing: .08em; opacity: .65; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-bottom: 4px; }
.pr-slot { margin: 20px auto 0; max-width: 520px; padding: 8px 12px; border: 1px dashed rgba(127,127,127,.45); border-radius: 10px; font-size: 14px; text-align: left; }
.pr-slot .mute { opacity: .65; }
