/* ============================================================
   履歴書作成ツール スタイルシート
   resume-tool.css
   ============================================================ */

:root{
  /* アゲルキャリアに合わせた紫基調のパレット */
  --bg: #F5F3F9;
  --bg-deep: #EBE6F3;
  --surface: #FFFFFF;
  --ink: #2A2140;
--ink-soft: #5F6F86;
--primary: #2563B8;        /* ブランドの基調となる青 */
--primary-deep: #174A8B;   /* ホバー・濃色面 */
--primary-soft: #EAF2FC;   /* 淡い青の面 */
--accent: #2563B8;         /* CTAは基調色と揃える */
--accent-deep: #174A8B;
--success: #174A8B;
--success-bg: #EAF2FC;
--line: #D9E3F0;
--danger: #C0455F;
  --radius: 18px;
}
.resume-tool-root *{ box-sizing: border-box; }
.resume-tool-root{
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 64px;
}
.resume-tool-root h1,
.resume-tool-root h2,
.resume-tool-root h3{ font-family: "Noto Sans JP", sans-serif; margin:0; }

.page-header{
  width:100%;
  max-width: 640px;
  text-align:center;
  margin-bottom: 22px;
}
.page-header .eyebrow{
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 700;
}
.page-header h1{
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  margin-top: 6px;
}
.page-header p{
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.7;
}
.badge-row{
  display:flex;
  gap:8px;
  justify-content:center;
  margin-top:12px;
  flex-wrap: wrap;
}
.badge{
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}
.badge.real{ background: var(--success-bg); color: var(--success); }
.badge.mock{ background: #F5E9DA; color: var(--accent-deep); }

/* ------------------------------------------------------------
   フォーム本体のコンテナ
   スマホ：画面幅いっぱいのシンプルなカード
   PC   ：中央寄せの広めのカード（端末フレームは表示しない）
   ------------------------------------------------------------ */
.phone{
  width: 100%;
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 50px -24px rgba(42,33,64,0.25);
  overflow: hidden;
  position: relative;
}
.screen{
  min-height: 620px;
  display:flex;
  flex-direction:column;
  background: var(--surface);
}
/* JS側が生成するステップのラッパー。縦フレックスにして
   本文を伸縮させ、下部ボタンを最下部に固定する */
.step-wrap{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height: 620px;
}
.topbar{
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink:0;
}
@media (min-width: 768px){
  .topbar{ padding: 26px 32px 18px; }
}
.topbar .step-label{
  font-size: 11px;
  color: var(--ink-soft);
  font-weight:700;
  letter-spacing:0.05em;
}
.waypoints{
  display:flex;
  align-items:center;
  margin-top:10px;
}
.waypoint{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  position:relative;
}
.waypoint .dot{
  width:18px; height:18px;
  border-radius:50%;
  border:2px solid var(--line);
  background: var(--surface);
  display:flex; align-items:center; justify-content:center;
  font-size:9px; font-weight:700; color: var(--ink-soft);
  z-index:2;
  transition: all .25s ease;
}
.waypoint .label{
  font-size: 8.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  text-align:center;
  font-weight:600;
}
.waypoint::after{
  content:"";
  position:absolute;
  top:9px; left:50%;
  width:100%; height:2px;
  background: var(--line);
  z-index:1;
}
.waypoint:last-child::after{ display:none; }
.waypoint.done .dot{ background: var(--success); border-color: var(--success); color:#fff; }
.waypoint.done::after{ background: var(--success); }
.waypoint.current .dot{ background: var(--accent); border-color: var(--accent); color:#fff; transform: scale(1.15); }
.waypoint.current .label{ color: var(--ink); }

.content{
  flex:1;
  padding: 28px 22px 34px;
}
@media (min-width: 768px){
  .content{ padding: 40px 40px 44px; }
}
.content h2{
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
}
@media (min-width: 768px){
  .content h2{ font-size: 22px; }
  .content .hint{ font-size: 13px; }
}
.content .hint{
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 26px;
  line-height: 1.7;
}
.field{ margin-bottom: 22px; }
.field label{
  display:block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 9px;
  color: var(--ink);
}
.field label .req{ color: var(--danger); margin-left:3px; font-weight:700; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field select, .field textarea{
  width:100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{
  outline:none;
  border-color: var(--accent);
}
.field textarea{ resize: vertical; min-height: 96px; line-height:1.8; }
.row2{ display:flex; gap:10px; }
.row2 .field{ flex:1; }

.entry-card{
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 20px 18px;
  margin-bottom: 16px;
  background: #FAF8FD;
  position: relative;
}
.entry-card .remove{
  position:absolute; top:14px; right:14px;
  background:none; border:none;
  color: var(--ink-soft);
  font-size: 11px;
  cursor:pointer;
  font-weight:700;
}
.add-btn{
  width:100%;
  border: 1.5px dashed var(--line);
  background: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  font-weight:700;
  color: var(--ink-soft);
  cursor:pointer;
  font-family: inherit;
}
.add-btn:hover{ border-color: var(--accent); color: var(--accent-deep); }

.ai-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background: var(--primary);
  color:#fff;
  border:none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor:pointer;
  font-family: inherit;
  margin-top: 10px;
}
.ai-btn:disabled{ opacity:.55; cursor:default; }
.ai-btn .spark{ font-size:13px; }
.ai-result-label{
  font-size:11px;
  font-weight:700;
  color: var(--success);
  margin: 10px 0 6px;
  display:flex;
  align-items:center;
  gap:5px;
}
.ai-error{
  font-size: 11.5px;
  color: var(--danger);
  margin-top:8px;
  line-height:1.5;
}

/* コンテンツの高さが可変になったため、絶対配置ではなく
   sticky で「常に画面下に見える」挙動にする。
   PCでもスマホでも入力量に関わらずボタンが隠れない */
.bottombar{
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 18px 22px 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display:flex;
  gap:10px;
  z-index: 4;
}
@media (min-width: 768px){
  .bottombar{ padding: 20px 40px 26px; }
}
.btn{
  flex:1;
  border:none;
  border-radius: 14px;
  padding: 14px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: inherit;
  cursor:pointer;
  text-align:center;
}
.btn.primary{ background: var(--accent); color:#fff; }
.btn.primary:hover{ background: var(--accent-deep); }
.btn.primary:disabled{ background:#CFC8DC; cursor:not-allowed; }
.btn.ghost{ background: var(--surface); color: var(--ink-soft); border:1.5px solid var(--line); flex:0 0 84px; }

/* Intro screen */
.intro{
  flex:1;
  min-height: 620px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 48px 28px;
  background:linear-gradient(160deg, #2a6078 0%, #3f60a0 100%);
  color:#fff;
}
@media (min-width: 768px){
  .intro{ padding: 72px 56px; }
  .intro h2{ font-size: 32px; }
  .intro p{ font-size: 14.5px; }
}
.intro .kicker{
  font-size:11px; letter-spacing:0.15em; color:#e9e6ef; font-weight:700;
}
.intro h2{
  color:#fff; font-size: 26px; margin-top:14px; line-height:1.4;
}
.intro p{
  font-size: 13px; color:#fbfbfb; margin-top:14px; line-height:1.8;
}
.intro .start-btn{
  margin-top: 30px;
  background: #fff;
  color: var(--primary-deep);
  border:none;
  border-radius: 14px;
  padding: 15px 36px;
  font-size:15px;
  font-weight:700;
  font-family: inherit;
  cursor:pointer;
}
.intro .start-btn:hover{ background: var(--primary-soft); }
.intro .mini{ margin-top: 18px; font-size: 10.5px; color:#B5A6CE; }

/* Preview (resume look) */
.resume-sheet{
  border: 1.5px solid var(--ink);
  font-size: 11px;
}
.resume-sheet table{ width:100%; border-collapse: collapse; }
.resume-sheet td, .resume-sheet th{
  border: 1px solid #B7ADC9;
  padding: 6px 8px;
  vertical-align: top;
  font-size: 10.5px;
}
.resume-sheet th{ background:#F5F1FA; text-align:left; width: 70px; font-weight:700; }
.resume-title{
  text-align:center;
  font-weight:900;
  font-family:"Noto Sans JP",sans-serif;
  font-size:15px;
  padding: 10px 0;
  border-bottom: 1.5px solid var(--ink);
}

/* Lead gate */
.gate-note{
  background: var(--primary-soft);
  border: 1.5px solid #D8C9EC;
  border-radius: 12px;
  padding: 16px 16px;
  font-size: 11.5px;
  color: var(--primary-deep);
  line-height:1.7;
  margin-bottom: 24px;
  font-weight: 600;
}
.consent{
  display:flex;
  gap:8px;
  align-items:flex-start;
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height:1.6;
  margin-top: 18px;
}
.consent input{ margin-top:3px; }

/* Complete screen */
.complete{
  text-align:center;
  padding: 30px 4px;
}
.complete .check{
  width:56px; height:56px; border-radius:50%;
  background: var(--success-bg); color: var(--success);
  display:flex; align-items:center; justify-content:center;
  font-size: 26px; margin: 0 auto 16px;
}
.pdf-mock{
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 24px 16px;
  background: #FAF8FD;
  margin: 18px 0;
}
.pdf-mock .fname{ font-size:12px; font-weight:700; color:var(--ink); }
.pdf-mock .fsize{ font-size:10.5px; color:var(--ink-soft); margin-top:2px; }
.cta-consult{
  display:block;
  background: var(--surface);
  color: var(--primary-deep);
  border: 1.5px solid var(--primary);
  text-decoration:none;
  border-radius: 14px;
  padding: 14px;
  font-size: 14px;
  font-weight:700;
  margin-top: 14px;
}
.cta-consult:hover{ background: var(--primary-soft); }

.resume-tool-note{
  max-width: 640px;
  text-align:center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 26px;
  line-height:1.8;
}

/* ============================================================
   レスポンシブ調整
   ============================================================ */

/* --- スマホ（〜640px）：カードを画面幅いっぱいに使う --- */
@media (max-width: 640px){
  .resume-tool-root{
    padding: 20px 0 0;
  }
  .page-header{
    padding: 0 16px;
  }
  .phone{
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }
  .resume-tool-note{
    padding: 0 16px;
  }
}

/* --- PC・タブレット（768px〜）：入力しやすいサイズに拡大 --- */
@media (min-width: 768px){
  .resume-tool-root{
    padding: 48px 24px 80px;
  }
  .page-header{
    max-width: 760px;
  }
  .page-header h1{ font-size: 26px; }
  .page-header p{ font-size: 13.5px; }

  .waypoint .label{ font-size: 10px; }
  .waypoint .dot{ width: 22px; height: 22px; font-size: 10px; }
  .waypoint::after{ top: 11px; }

  .field label{ font-size: 13.5px; }
  .field input[type=text],
  .field input[type=tel],
  .field input[type=email],
  .field select,
  .field textarea{
    font-size: 15px;
    padding: 13px 14px;
  }
  .field textarea{ min-height: 96px; }

  /* 基本情報など短い項目はPCでは2カラムに並べる */
  .field-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }

  .entry-card{ padding: 20px; }
  .btn{ font-size: 15px; padding: 15px; }
  .btn.ghost{ flex: 0 0 120px; }

  /* 入力確認（履歴書プレビュー）はPCでは文字を大きく */
  .resume-sheet td, .resume-sheet th{ font-size: 12.5px; padding: 8px 10px; }
  .resume-sheet th{ width: 90px; }
  .resume-title{ font-size: 18px; }

  .complete{ padding: 48px 4px; }
  .cta-consult{ font-size: 15px; }
}

/* ============================================================
   アイコン（絵文字を使わずインラインSVGで統一）
   ============================================================ */
.rt-icon{
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.125em;
}
.waypoint .dot .rt-icon{ width: 11px; height: 11px; }
.complete .check .rt-icon{ width: 26px; height: 26px; }
.ai-btn .rt-icon{ width: 14px; height: 14px; }
.ai-result-label .rt-icon{ width: 13px; height: 13px; }
.pdf-mock .fname{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.pdf-mock .fname .rt-icon{ width: 16px; height: 16px; color: var(--primary); }
.gate-note{
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.gate-note .rt-icon{ width: 16px; height: 16px; margin-top: 2px; }

/* ============================================================
   年月セレクト・表形式プレビュー
   ============================================================ */
.ym-row{
  display: flex;
  align-items: center;
  gap: 6px;
}
.ym-row select{
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
}
.ym-row select:focus{ outline:none; border-color: var(--primary); }
.ym-row select:disabled{ background: #F4F1F8; color: #9C93B0; }
.ym-unit{
  font-size: 12.5px;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.inline-check{
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.inline-check input{ margin: 0; }

/* プレビュー表の年月列 */
.resume-sheet .col-ym{
  width: 42px;
  text-align: center;
  white-space: nowrap;
}
.resume-sheet td.is-heading{ font-weight: 700; text-align: center; }
.resume-sheet td.is-right{ text-align: right; }
/* 年月列はPCでも狭いまま保つ（th の既定幅指定を上書き） */
.resume-sheet th.col-ym,
.resume-sheet td.col-ym{ width: 46px; }

/* AI整形の適用状態表示 */
.ai-applied{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--primary-soft);
  border-radius: 10px;
}
.ai-applied-label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-deep);
}
.ai-applied-label .rt-icon{ width: 13px; height: 13px; }
.ai-undo{
  background: none;
  border: 1.5px solid var(--primary);
  color: var(--primary-deep);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.ai-undo:hover{ background: #fff; }

/* ============================================================
   確認画面：実際のPDF（JIS規格シンプルタイプ）と同じ体裁のプレビュー
   ============================================================ */
.jis-sheet{
  background: #fff;
  border: 1.5px solid var(--ink);
  padding: 14px;
  font-size: 11px;
  line-height: 1.5;
  color: #111;
}
.jis-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.jis-title{ font-size: 17px; font-weight: 900; letter-spacing: 0.12em; }
.jis-date{ font-size: 10px; color: #333; }

.jis-table{ width: 100%; border-collapse: collapse; table-layout: fixed; }
.jis-table th,
.jis-table td{
  border: 1px solid #555;
  padding: 5px 7px;
  font-size: 10.5px;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.jis-table th{
  background: #F6F3FA;
  font-weight: 700;
  text-align: center;
  width: 74px;
}

/* 氏名ブロックと写真欄を横並びに */
.jis-top{ display: flex; align-items: stretch; }
.jis-name{ flex: 1; }
.jis-name tr:nth-child(1) td{ height: 20px; }
.jis-name tr:nth-child(2) td{ height: 40px; }
.jis-kana{ font-size: 10px; }
.jis-fullname{ font-size: 15px; font-weight: 700; }
.jis-photo{
  width: 84px;
  flex-shrink: 0;
  border: 1px solid #555;
  border-left: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.jis-photo img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.jis-photo-empty{
  font-size: 8.5px;
  color: #999;
  text-align: center;
  line-height: 1.6;
}

.jis-addr{ margin-top: 6px; }
.jis-addr td{ height: 22px; }
.jis-table td.jis-address{ height: 34px; }
.jis-table th.jis-mail-label{ width: 52px; }

.jis-hist{ margin-top: 6px; }
.jis-hist td{ height: 21px; }
.jis-table th.jis-ym,
.jis-table td.jis-ym{ width: 40px; text-align: center; }
.jis-hist td.is-heading{ text-align: center; font-weight: 700; }
.jis-hist td.is-right{ text-align: right; }

.jis-pr{ margin-top: 6px; }
.jis-pr th{ width: auto; }
.jis-table td.jis-pr-body{ height: 92px; vertical-align: top; line-height: 1.7; padding-top: 8px; }

@media (min-width: 768px){
  .jis-sheet{ padding: 20px; font-size: 12px; }
  .jis-table th, .jis-table td{ font-size: 11.5px; padding: 6px 9px; }
  .jis-title{ font-size: 20px; }
  .jis-fullname{ font-size: 17px; }
  .jis-photo{ width: 104px; }
  .jis-table th{ width: 88px; }
  .jis-table th.jis-ym,
  .jis-table td.jis-ym{ width: 54px; }
}

/* ============================================================
   証明写真アップロード
   ============================================================ */
.photo-row{
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.photo-preview{
  width: 84px;
  height: 112px;          /* 3:4 */
  flex-shrink: 0;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #FAF8FD;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-preview img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-empty{ font-size: 11px; color: var(--ink-soft); }
.photo-actions{ flex: 1; min-width: 0; }
.photo-actions input[type=file]{ display: none; }
.photo-btn{
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.photo-btn:hover{ background: var(--primary-deep); }
.photo-remove{
  background: none;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-left: 8px;
}
.photo-note{
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 10px 0 0;
}
.photo-error{
  font-size: 11.5px;
  color: var(--danger);
  margin: 6px 0 0;
  line-height: 1.5;
}

/* ============================================================
   様式（テンプレート）選択・追加入力項目
   ============================================================ */
.tpl-choices{
  display: grid;
  gap: 10px;
}
@media (min-width: 768px){
  .tpl-choices{ grid-template-columns: 1fr 1fr; }
}
.tpl-choice{
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color .15s ease, background .15s ease;
}
.tpl-choice:hover{ border-color: var(--primary); }
.tpl-choice.is-selected{
  border-color: var(--primary);
  background: var(--primary-soft);
}
.tpl-choice-name{
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.tpl-choice.is-selected .tpl-choice-name{ color: var(--primary-deep); }
.tpl-choice-desc{
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* 性別などのラジオ */
.radio-row{
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.radio-item{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.radio-item input{ margin: 0; }

/* 郵便番号など短い入力欄 */
.field input.input-short{ max-width: 180px; }

/* 折りたたみの任意入力ブロック */
.optional-block{
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
  background: #FAF8FD;
}
.optional-block summary{
  padding: 14px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.optional-block summary::marker{ color: var(--primary); }
.optional-body{ padding: 4px 16px 16px; }
.optional-body .field:last-child{ margin-bottom: 0; }

.field-note{
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: -3px 0 9px;
}


.footer::before {
  content: none;
}

.footer {
  padding: 40px 0 12px !important;
}

/* 確認画面の本人希望欄 */
.jis-table td.jis-wish-body{ height: 56px; }
