/* 確定デザイン（mockup/ の 01〜06）の見た目は各テンプレートのインラインスタイルで再現している。
   ここには、インラインでは書けないもの（選択状態・動き・モーダル・スマホ幅の調整）だけを置く。 */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* 固定ナビの下に隠れないよう、ナビの高さぶん余白をとって止める */
#check-form { scroll-margin-top: 76px; }
body { margin: 0; font-family: 'Noto Sans JP', sans-serif; color: #15171F; background: #FBF9F4; overflow-wrap: anywhere; }
a { color: #1C2D5E; }
a:hover { color: #101D40; }
[hidden] { display: none !important; }

/* 待機画面：フッターを下に寄せる */
body.is-measuring { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- トップ：入力フォーム ---------- */
.field-input:focus { outline: 2px solid #1C2D5E; outline-offset: -1px; border-color: #1C2D5E !important; }
select.field-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #1C2D5E 50%), linear-gradient(135deg, #1C2D5E 50%, transparent 50%) !important;
  /* インラインの background 指定に上書きされないよう !important を付ける */
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50% !important; background-size: 5px 5px, 5px 5px !important; background-repeat: no-repeat !important; padding-right: 36px !important; }
select.field-input:disabled { color: #9C978E; background-color: #FBF9F4 !important; }
.form-error { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: #B23A28; }

/* 目的・業種のボタン（モック 01 の選択／未選択の見た目） */
.opt { position: relative; display: block; margin: 0; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; min-height: 49px;
  border: 1px solid #D9D3C7; background: #FFFFFF; border-radius: 9px; padding: 12px 8px; text-align: center; font-weight: 700; line-height: 1.3;
}
.opt-purpose span { font-size: 14.5px; }
.opt-purpose.is-acq span { color: #C0552B; }
.opt-purpose.is-job span { color: #1C2D5E; }
.opt-purpose.is-acq input:checked + span { border: 2px solid #E0702F; background: #E0702F; color: #FFFFFF; padding: 11px 7px; }
.opt-purpose.is-job input:checked + span { border: 2px solid #1C2D5E; background: #1C2D5E; color: #FFFFFF; padding: 11px 7px; }
.opt-purpose input:disabled { cursor: not-allowed; }
.opt-purpose input:disabled + span { color: #9C978E; }
.opt-genre span { font-size: 13.5px; padding: 12px 6px; }
.opt-genre input:checked + span { border: 2px solid #1C2D5E; background: #F0F2F7; padding: 11px 5px; }
.opt input:focus-visible + span, .opt-ai input:focus-visible + span { outline: 2px solid #1C2D5E; outline-offset: 2px; }
.soon { font-size: 10.5px; font-weight: 500; color: #86806F; background: #EFEBE1; border-radius: 5px; padding: 2px 7px; }

/* どのAIで調べるか */
.opt-ai { position: relative; display: inline-block; margin: 0; }
.opt-ai input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt-ai span { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #D9D3C7; color: #5A5648; border-radius: 8px; padding: 9px 13px; font-size: 12.5px; }
.opt-ai.is-free input:checked + span { border: 2px solid #1C2D5E; background: #1C2D5E; color: #FFFFFF; font-weight: 700; padding: 8px 12px; }

/* 駅の候補（駅名は左、路線は右） */
.suggest-item { padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; cursor: pointer; }
.suggest-item + .suggest-item { border-top: 1px solid #F2EFE8; }
.suggest-item.is-active, .suggest-item:hover { background: #F0F2F7; }
.suggest-name { font-size: 13.5px; font-weight: 500; }
.suggest-lines { font-size: 11px; color: #5A5648; text-align: right; }

/* ---------- 待機画面の段階表示 ---------- */
.step .step-done, .step .step-active, .step .step-todo { display: none; }
.step.is-done .step-done, .step.is-active .step-active, .step.is-todo .step-todo { display: block; }
.step.is-done .step-label { color: #5A5648; }
.step.is-active { background: #F0F2F7; }
.step.is-active .step-label { font-weight: 700; }
.step.is-todo .step-label { color: #9C978E; }
.step.is-active .step-active { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .step.is-active .step-active { animation: none; } }

/* ---------- 結果：全文モーダル ---------- */
.modal { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 48px); padding: 0; border: 1px solid #E5E0D5; border-radius: 14px; background: #FFFFFF; color: #15171F; }
.modal::backdrop { background: rgba(21, 23, 31, 0.55); }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; background: #FFFFFF; border-bottom: 1px solid #EFEBE1; }
.modal-close { flex: none; font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 15px; border-radius: 8px; border: 1px solid #D9D3C7; background: #FFFFFF; color: #15171F; cursor: pointer; }
.modal-body { padding: 20px 22px 24px; }
.answer-text { margin: 0; white-space: pre-line; font-size: 14.5px; line-height: 2; color: #3C3A36; }
.answer-text mark { background: #FBDCC4; color: #15171F; font-weight: 700; padding: 1px 3px; border-radius: 3px; }
.answer-last { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #EFEBE1; font-size: 14px; font-weight: 700; color: #B23A28; }
.answer-last.is-found { color: #1C2D5E; }

/* 横に長い表はその枠の中だけで横に動かす */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.report-table { min-width: 640px; }

/* ---------- 管理画面 ---------- */
.admin-tab { font: inherit; font-size: 11.5px; border-radius: 6px; padding: 5px 11px; cursor: pointer; background: #FFFFFF; border: 1px solid #D9D3C7; color: #3C3A36; }
.admin-tab[aria-selected="true"] { background: #1C2D5E; border-color: #1C2D5E; color: #FFFFFF; font-weight: 700; }

/* ---------- スマホ幅（モックは PC 幅で組まれているため、文字と余白だけ詰める） ---------- */
@media (max-width: 600px) {
  .pad-x { padding-left: 16px !important; padding-right: 16px !important; }
  .hero-inner { padding-top: 36px !important; padding-bottom: 40px !important; gap: 30px !important; }
  .hero-title { font-size: 31px !important; }
  .score-card { padding: 22px 20px 24px !important; }
  .sec-title { font-size: 23px !important; }
  .q-title { font-size: 23px !important; }
  .verdict-title { font-size: 20px !important; line-height: 1.5 !important; }
  .card-pad { padding-left: 20px !important; padding-right: 20px !important; }
  .ai-col { border-right: 0 !important; border-bottom: 1px solid #E5E0D5; }
  .ai-col:last-child { border-bottom: 0; }
  .site-nav-inner { padding-top: 8px !important; padding-bottom: 8px !important; }
  .site-nav-logo { font-size: 15px !important; }
  .site-nav-cta { padding: 8px 14px !important; font-size: 13px !important; }
  #check-form { scroll-margin-top: 60px; }
  .admin-nav { flex: 1 1 100% !important; padding: 16px 0 10px !important; }
  .admin-nav-links { flex-direction: row !important; flex-wrap: wrap; }
  .admin-main { padding: 22px 16px 40px !important; }
}
