/* ============================================================
   お問い合わせ・体験申込みフォーム（/contact/ だけで読み込む）
   HTML は inc/contact-form.php、動きは assets/contact-form.js。

   ■ 決まり
   ・クラスは全部 tkf- で始める（短い名前は、過去に他のページとぶつかった）。
   ・:root に変数を足さない。全称セレクタのリセットを足さない。
     色は style.css の変数を使う。変数に無い色は 2つだけ:
       #c85000 … 送信ボタンと「必須」の札（.comiru-btn と同じ橙。白い字が読める濃さ）
       #c0392b … エラーの赤（style.css の .em-red と同じ）
   ・[hidden] を display で上書きしない（下の 1行で守っている）。
   ・フォームそのものに .ap / .rv（出現アニメ）は掛けない。JS が動かないと透明のままになるため。
   ・入力欄の文字は 16px 以上（iPhone が勝手に拡大するのを防ぐ）。押せるものは 44px 以上。
   ・動きは最後の「動きを減らす設定」のところで全部止めている。
   ============================================================ */

/* ---- この画面だけ: #contact への着地を「なめらか」にしない ----
   style.css の html{scroll-behavior:smooth} と @view-transition（ページ切り替えのクロスフェード）が
   重なると、Chrome では、ほかのページや送信のあとの 303 から /contact/…#contact に来たときに
   画面が #contact まで動かず、ページの頭で止まる（JS が動かないときの「受け付けました」や
   「送信できませんでした」が画面の外に残る）。この CSS は /contact/ でしか読まれないので、
   ここで既定の動き（すぐ着く）に戻す。カードの切り替えなどは JS が自分でなめらかに動かす。 */
html { scroll-behavior: auto; }

/* ---- 区画 ------------------------------------------------- */
.tkf { scroll-margin-top: 122px; }           /* #contact に飛んだとき、固定ヘッダー（72px）とパンくず（50px）の下に頭が出るように */
.tkf [hidden] { display: none !important; }  /* 下の display の指定が hidden に勝たないように */
/* 入力欄に focus が移ったとき、ブラウザ（とくに iPhone の Safari）が自分で画面を動かしても、
   欄の上のラベルごと、固定ヘッダーとパンくず（あわせて 122px）の下に出るように */
.tkf input, .tkf select, .tkf textarea { scroll-margin-top: 170px; }
.tkf-stage { max-width: 720px; }
.tkf-nb { display: inline-block; }           /* 見出しの中の、途中で折り返したくないひとかたまり */

/* demo の小さな札（手元でだけ出る） */
.tkf-demo-note {
  display: inline-block;
  margin: -22px 0 26px;
  padding: 4px 12px;
  font-family: 'DM Mono', 'Noto Sans JP', monospace;
  font-size: .72rem;
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--accent-deep);
  background: var(--gp);
  border: 1px dashed var(--accent);
  border-radius: 2px;
}

/* ---- フォーム --------------------------------------------- */
.tkf-form { position: relative; }

.tkf-lead {
  margin: 0 0 30px;
  font-size: .92rem;
  line-height: 1.95;
  color: var(--ink);
  text-wrap: pretty;
  line-break: strict;
}

.tkf-field {
  min-width: 0;          /* fieldset が中身の幅で広がって、スマホで横にはみ出すのを防ぐ */
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.tkf-label {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--black);
}

/* 「必須」「任意」の札 */
.tkf-req,
.tkf-opt {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .08em;
  border-radius: 2px;
  vertical-align: 2px;
}
.tkf-req { color: #fff; background: #c85000; border: 1px solid #c85000; }
.tkf-opt { color: var(--mid); background: #fff; border: 1px solid var(--line); }

/* 入力欄 */
.tkf-input,
.tkf-select,
.tkf-textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;       /* 16px より小さいと iPhone が画面を拡大する */
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--black);
  background-color: #fff;
  border: 1px solid var(--mid);
  border-radius: 3px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tkf-input { max-width: 460px; }
.tkf-select {
  max-width: 320px;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232A6B3F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}
.tkf-textarea { min-height: 150px; resize: vertical; }
.tkf-input::placeholder,
.tkf-textarea::placeholder { color: var(--mid); opacity: .9; }   /* 例の文字も読める濃さに（白地で 4.5:1 以上） */

.tkf-input:focus,
.tkf-select:focus,
.tkf-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--gp); }
.tkf-input:focus-visible,
.tkf-select:focus-visible,
.tkf-textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.tkf-hint {
  margin: 7px 0 0;
  font-size: .82rem;
  line-height: 1.75;
  color: var(--mid);
}
.tkf-hint a { color: var(--green); text-underline-offset: 3px; }

/* ---- チップ（ご用件・校舎。中身はラジオボタン） ----------- */
.tkf-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));   /* パソコンで 2列、スマホで 1列 */
  gap: 10px;
}
.tkf-field[data-tkf-field="school"] .tkf-chips {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));   /* 校舎は言葉が短いので、パソコンで 3列 */
}
.tkf-chip { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* ラジオボタンは消さずに、チップ全体に透明で重ねる（キーボードでもそのまま選べる） */
.tkf-chip input {
  position: absolute;
  top: 0; left: 0;
  z-index: 1;            /* 見た目（span）より手前に置き、押した所がいつもラジオボタンになるように */
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.tkf-chip span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 11px 16px 11px 14px;
  font-size: .95rem;
  line-height: 1.5;
  letter-spacing: .03em;
  word-break: auto-phrase;   /* 2行になるとき、言葉の途中で折り返さない（対応しているブラウザだけ） */
  line-break: strict;
  color: var(--black);
  background: #fff;
  border: 1px solid var(--mid);
  border-radius: 3px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
/* 選んだ印（色だけに頼らず、丸の中にチェックを出す） */
.tkf-chip span::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  background: #fff center / 13px no-repeat;
  border: 1px solid var(--mid);
  border-radius: 50%;
  transition: background-color .2s ease, border-color .2s ease;
}
.tkf-chip input:checked + span {
  color: var(--accent-deep);
  background: var(--gp);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.tkf-chip input:checked + span::before {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--accent);
}
.tkf-chip input:focus + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tkf-chip input:focus:not(:focus-visible) + span { outline: none; }
.tkf-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- 同意のチェック --------------------------------------- */
.tkf-consent { padding-top: 24px; border-top: 1px solid var(--line); }
.tkf-check {
  position: relative;
  display: block;
  min-height: 44px;
  padding: 9px 0 9px 38px;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--black);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tkf-check input {
  position: absolute;
  top: 9px; left: 0;
  z-index: 1;            /* 四角の絵（::before）より手前に置く */
  width: 26px; height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.tkf-check input + span::before {
  content: "";
  position: absolute;
  top: 9px; left: 0;
  width: 24px; height: 24px;
  background: #fff center / 14px no-repeat;
  border: 1px solid var(--mid);
  border-radius: 3px;
  transition: background-color .2s ease, border-color .2s ease;
}
.tkf-check input:checked + span::before {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--accent);
}
.tkf-check input:focus + span::before { outline: 2px solid var(--accent); outline-offset: 2px; }
.tkf-check input:focus:not(:focus-visible) + span::before { outline: none; }
.tkf-check input:focus-visible + span::before { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- エラーと知らせ --------------------------------------- */
.tkf-error {
  position: relative;
  margin: 8px 0 0;
  padding-left: 26px;
  font-size: .86rem;
  font-weight: 500;
  line-height: 1.7;
  color: #c0392b;
}
.tkf-error::before {            /* 色だけに頼らないよう、頭に「!」の印を付ける */
  content: "!";
  position: absolute;
  top: .22em; left: 0;
  width: 18px; height: 18px;
  font-family: 'DM Mono', monospace;
  font-size: .74rem;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-align: center;
  color: #fff;
  background: #c0392b;
  border-radius: 50%;
}
.tkf-has-error .tkf-input,
.tkf-has-error .tkf-select,
.tkf-has-error .tkf-textarea { border-color: #c0392b; box-shadow: inset 0 0 0 1px #c0392b; }
.tkf-has-error .tkf-chip span,
.tkf-has-error .tkf-check input + span::before { border-color: #c0392b; }

.tkf-alert {
  margin: 0 0 28px;
  padding: 16px 18px 16px 20px;
  background: #fff;
  border: 1px solid #c0392b;
  border-left-width: 4px;
  border-radius: 2px;
}
.tkf-alert:focus { outline: none; }
.tkf-alert-text {
  margin: 0;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.85;
  color: var(--black);
}

/* 校舎の電話と LINE（知らせの中・完了のカード・おわりのカード） */
.tkf-contacts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.tkf-contacts li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 14px;
  font-size: .9rem;
  line-height: 1.7;
  letter-spacing: .03em;
  color: var(--ink);
}
.tkf-contacts-name { font-weight: 500; }
.tkf-contacts-tel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: 'DM Mono', monospace;
  font-size: 1.08rem;
  letter-spacing: .04em;
  color: var(--green);
  text-underline-offset: 4px;
}
.tkf-contacts .tkf-contacts-hours { font-size: .8rem; color: var(--mid); }
.tkf-contacts-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 10px;
  padding: 8px 22px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--accent-deep);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 3px;
  transition: background-color .2s ease;
}

/* ---- 送信ボタン（.comiru-btn と同じくらいの存在感） -------- */
.tkf-actions { margin-top: 34px; }
.tkf-submit {
  display: block;
  width: 100%;
  max-width: 420px;
  min-height: 62px;
  margin: 0;
  padding: 18px 28px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: center;
  color: #fff;
  background: #c85000;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(200, 80, 0, .25);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s var(--tk-ease, cubic-bezier(.22, 1, .36, 1)), box-shadow .25s ease, opacity .2s ease;
}
.tkf-submit:active { transform: scale(.97); }
.tkf-submit[disabled] { opacity: .72; box-shadow: none; cursor: progress; transform: none; }
/* 送信中の小さな輪 */
.tkf-is-sending .tkf-submit::before {
  content: "";
  display: inline-block;
  width: 16px; height: 16px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tkf-spin .8s linear infinite;
}

/* ---- ふつうのボタン（答える・次へ・スキップ・戻る など） ---- */
.tkf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 48px;
  margin: 0;
  padding: 10px 26px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .08em;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease,
              transform .18s var(--tk-ease, cubic-bezier(.22, 1, .36, 1));
}
.tkf-btn:active { transform: scale(.97); }
.tkf-btn--ghost { color: var(--black); background: #fff; border-color: var(--mid); }
.tkf-btn--text {
  min-width: 0;
  padding: 10px 12px;
  letter-spacing: .06em;
  color: var(--mid);
  text-decoration: underline;
  text-underline-offset: 4px;
  background: transparent;
  border-color: transparent;
}

/* キーボードで動かしたときの枠 */
.tkf-submit:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; }
.tkf-btn:focus-visible,
.tkf-choice:focus-visible,
.tkf-stage a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* マウスを乗せたとき（指で触る端末では、色が残ってしまうので掛けない） */
@media (hover: hover) {
  .tkf-submit:hover:not([disabled]) { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(200, 80, 0, .35); }
  .tkf-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
  .tkf-btn--ghost:hover { color: var(--accent-deep); background: var(--gp); border-color: var(--accent); }
  .tkf-btn--text:hover { color: var(--accent-deep); background: transparent; border-color: transparent; }
  .tkf-chip:hover input:not(:checked) + span,
  .tkf-choice:hover:not([aria-pressed="true"]) { background: var(--bg); border-color: var(--accent); }
  .tkf-contacts-line:hover { background: var(--gp); }
}

/* ---- カード（完了・ヒアリング・おわり） ------------------- */
.tkf-panel { overflow: hidden; }   /* カードが横に滑るあいだ、はみ出した分で横スクロールが出ないように */

.tkf-card,
.tkf-done-static {
  max-width: 640px;
  padding: 34px 32px 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 3px;
}
.tkf-card--done,
.tkf-card--end,
.tkf-done-static { text-align: center; }

.tkf-card-title,
.tkf-done-title {
  margin: 0 0 14px;
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--black);
  text-wrap: balance;
  word-break: auto-phrase;   /* 言葉の途中で折り返さない（対応しているブラウザだけ。ほかは今までどおり） */
  line-break: strict;
}
.tkf-card-title:focus { outline: none; }   /* 切り替えのたびに JS がここへフォーカスを動かす（読み上げ用。枠は出さない） */

.tkf-card-text,
.tkf-done-text {
  margin: 0 0 6px;
  font-size: .92rem;
  line-height: 1.9;
  color: var(--ink);
  text-wrap: balance;
  word-break: auto-phrase;
  line-break: strict;
}

.tkf-card--done .tkf-contacts,
.tkf-card--end .tkf-contacts,
.tkf-done-static .tkf-contacts { align-items: center; margin-top: 18px; }
.tkf-card--done .tkf-contacts li,
.tkf-card--end .tkf-contacts li,
.tkf-done-static .tkf-contacts li { justify-content: center; }

.tkf-done-again { margin: 14px 0 0; font-size: .86rem; }
.tkf-done-again a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--green);
  text-underline-offset: 4px;
}
.tkf-card-again { margin-top: 14px; }

/* チェックの印（丸が描かれてから、チェックが描かれる） */
.tkf-check-svg { display: block; width: 60px; height: 60px; margin: 0 auto 16px; }
.tkf-check-circle {
  fill: var(--gp);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 152;
  stroke-dashoffset: 0;
}
.tkf-check-mark {
  fill: none;
  stroke: var(--accent-deep);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;
  stroke-dashoffset: 0;
}
.tkf-card--done .tkf-check-circle { animation: tkf-draw-circle .6s var(--tk-ease, cubic-bezier(.22, 1, .36, 1)) both; }
.tkf-card--done .tkf-check-mark { animation: tkf-draw-mark .4s .5s ease-out both; }

/* 受付番号 */
.tkf-ref {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin: 4px 0 16px;
  padding: 8px 20px;
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.tkf-ref-label { font-size: .74rem; letter-spacing: .14em; color: var(--mid); }
.tkf-ref-num {
  font-family: 'DM Mono', monospace;
  font-size: 1.25rem;
  letter-spacing: .16em;
  color: var(--accent-deep);
}

/* 完了のカードの下の「よろしければ、あと少しだけ…」 */
.tkf-invite { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.tkf-invite-text {
  margin: 0 0 18px;
  font-size: .92rem;
  line-height: 1.9;
  color: var(--ink);
  text-wrap: balance;
  word-break: auto-phrase;
  line-break: strict;
}
.tkf-invite-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---- ヒアリングの 1問 ------------------------------------- */
.tkf-progress { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; }
.tkf-progress-num {
  flex: none;
  font-family: 'DM Mono', 'Noto Sans JP', monospace;
  font-size: .74rem;
  line-height: 1.6;
  letter-spacing: .14em;
  color: var(--gm);
}
.tkf-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.tkf-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .45s var(--tk-ease, cubic-bezier(.22, 1, .36, 1));
}

.tkf-q-title { margin-bottom: 18px; font-size: 1.18rem; }
.tkf-q-hint {
  margin: -8px 0 16px; font-size: .84rem; line-height: 1.75; color: var(--mid);
  word-break: auto-phrase;   /* 問いの補足（例: 電話の受付時間）も、言葉の途中で折り返さない（対応しているブラウザだけ） */
  line-break: strict;
}

/* 選択肢（大きなチップ。中身は button） */
.tkf-choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 10px;
}
.tkf-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 11px 16px 11px 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .03em;
  word-break: auto-phrase;   /* 2行になるとき、言葉の途中で折り返さない（対応しているブラウザだけ） */
  line-break: strict;
  text-align: left;
  color: var(--black);
  background: #fff;
  border: 1px solid var(--mid);
  border-radius: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease;
}
/* 選んだ印。1つだけ選ぶ問いは丸、いくつでも選べる問いは四角 */
.tkf-choice::before {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  background: #fff center / 13px no-repeat;
  border: 1px solid var(--mid);
  border-radius: 50%;
  transition: background-color .2s ease, border-color .2s ease;
}
.tkf-choice-list--multi .tkf-choice::before { border-radius: 3px; }
.tkf-choice[aria-pressed="true"] {
  color: var(--accent-deep);
  background: var(--gp);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.tkf-choice[aria-pressed="true"]::before {
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color: var(--accent);
  animation: tkf-pop .28s var(--tk-ease, cubic-bezier(.22, 1, .36, 1));
}

.tkf-q-text { min-height: 140px; }

/* [戻る] ………… [スキップ] [次へ] */
.tkf-q-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.tkf-q-actions .tkf-q-skip { margin-left: auto; }
/* 自由記入に文字があるあいだは [スキップ] を隠す（JS）。そのときも [送る] が右端から動かないように */
.tkf-q-actions .tkf-q-skip[hidden] + .tkf-btn { margin-left: auto; }

/* 出したばかりのカード（JS が 0.5秒だけ付ける）: 選択肢とリンクを、指やマウスで押せなくする。
   同じ位置に次の問いの選択肢が出るので、続けて触れた指が次の問いの答えにならないように。
   キーボードの操作と [戻る][スキップ][次へ] は止めない */
.tkf-card--fresh .tkf-choice,
.tkf-card--fresh a { pointer-events: none; }

/* ---- カードの切り替え（横に滑る） ------------------------- */
.tkf-card.tkf-in-next  { animation: tkf-in-next .34s var(--tk-ease, cubic-bezier(.22, 1, .36, 1)) both; }
.tkf-card.tkf-in-prev  { animation: tkf-in-prev .34s var(--tk-ease, cubic-bezier(.22, 1, .36, 1)) both; }
.tkf-card.tkf-out-next { animation: tkf-out-next .16s ease-in both; }
.tkf-card.tkf-out-prev { animation: tkf-out-prev .16s ease-in both; }
.tkf-card.tkf-in-up    { animation: tkf-in-up .45s var(--tk-ease, cubic-bezier(.22, 1, .36, 1)) both; }

@keyframes tkf-in-next  { from { opacity: 0; transform: translateX(36px); }  to { opacity: 1; transform: none; } }
@keyframes tkf-in-prev  { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes tkf-out-next { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-28px); } }
@keyframes tkf-out-prev { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(28px); } }
@keyframes tkf-in-up    { from { opacity: 0; transform: translateY(14px); }  to { opacity: 1; transform: none; } }
@keyframes tkf-draw-circle { from { stroke-dashoffset: 152; fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 1; } }
@keyframes tkf-draw-mark   { from { stroke-dashoffset: 34; } to { stroke-dashoffset: 0; } }
@keyframes tkf-pop  { from { transform: scale(.55); } to { transform: scale(1); } }
@keyframes tkf-spin { to { transform: rotate(360deg); } }

/* ---- わな（人には見えない欄）。display:none ではなく、画面の外へ出す ---- */
.tkf-hp {
  position: absolute !important;
  top: auto !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---- スマホ ----------------------------------------------- */
@media (max-width: 560px) {
  .tkf-input,
  .tkf-select,
  .tkf-submit { max-width: none; }
  .tkf-card,
  .tkf-done-static { padding: 26px 18px 24px; }
  .tkf-card-title,
  .tkf-done-title { font-size: 1.16rem; }
  .tkf-q-title { margin-bottom: 14px; font-size: 1.08rem; }
  .tkf-progress { margin-bottom: 16px; }
  /* 選択肢が 7つの問いでも、なるべく 1画面に収まるように少し詰める（44px 以上は保つ） */
  .tkf-choice-list { gap: 8px; }
  .tkf-choice { min-height: 50px; padding-top: 9px; padding-bottom: 9px; }
  .tkf-q-actions { margin-top: 20px; padding-top: 14px; }
  .tkf-invite-actions .tkf-btn { flex: 1 1 100%; }
  .tkf-q-actions .tkf-btn { min-width: 96px; padding-right: 18px; padding-left: 18px; }
  .tkf-q-actions .tkf-btn--text { min-width: 0; padding-right: 10px; padding-left: 10px; }
}

/* とても狭い画面（320px）でも、[戻る] [スキップ] [次へ] が 1列に並ぶように */
@media (max-width: 340px) {
  .tkf-q-actions { gap: 6px 4px; }
  .tkf-q-actions .tkf-btn { min-width: 80px; padding-right: 12px; padding-left: 12px; letter-spacing: .04em; }
  .tkf-q-actions .tkf-btn--text { min-width: 0; padding-right: 8px; padding-left: 8px; }
}

/* ---- 動きを減らす設定のとき ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tkf-card,
  .tkf-check-circle,
  .tkf-check-mark,
  .tkf-choice[aria-pressed="true"]::before,
  .tkf-is-sending .tkf-submit::before { animation: none !important; }
  .tkf-input,
  .tkf-select,
  .tkf-textarea,
  .tkf-chip span,
  .tkf-chip span::before,
  .tkf-check input + span::before,
  .tkf-choice,
  .tkf-choice::before,
  .tkf-submit,
  .tkf-btn,
  .tkf-contacts-line,
  .tkf-progress-fill { transition: none !important; }
  .tkf-submit:hover:not([disabled]),
  .tkf-submit:active,
  .tkf-btn:active { transform: none; }
}
