/*
 * テンプレDL（/tools/template/・完了画面・記入例）の画面。0.7.0
 * 並べ方は CRO のモック（テンプレDLページ_mock.html）。色・書体は 0.6.0 の年収診断（assets/salary.css）と同じ。
 * 色：オレンジ #EC6A1E（濃い #C9560F・薄い #FFF1E6）、ネイビー #1D3557、紙の色 #F7F5F1
 * デザインの決まり：英字の小見出しを使わない／枠の左や上に色の線を付けない／赤は誤りの表示だけ。
 */

.trj-tpl-main {
  --tp-orange: #EC6A1E; --tp-orange-d: #C9560F; --tp-orange-t: #FFF1E6;
  --tp-navy: #1D3557; --tp-navy-soft: #EAF0F8; --tp-ink: #1F2937; --tp-text-2: #4B5563; --tp-muted: #6B7280;
  --tp-line: #DCE2EA; --tp-line-2: #CBD5E1; --tp-paper: #F7F5F1; --tp-red: #DC2626;
  --tp-head: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  background: #fff; color: var(--tp-ink);
}
.trj-tpl-main *, .trj-tpl-main *::before, .trj-tpl-main *::after { box-sizing: border-box; }
.trj-nb { display: inline-block; }
.trj-tpl-container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.trj-tpl-sp-inline { display: none; }

.trj-tpl-preview { background: var(--tp-navy); color: #fff; font-size: 13px; text-align: center; padding: 6px 16px; }

/* ---------- パンくず ---------- */
.trj-tpl-crumbs { background: var(--tp-paper); border-bottom: 1px solid var(--tp-line); padding: 14px 0 2px; }
.trj-tpl-crumbs .tr-breadcrumb { margin-bottom: 12px; }

/* ---------- 配布ページ（PCは2カラム。右のフォームは追従） ---------- */
.trj-tpl-entry {
  display: grid; grid-template-columns: minmax(0, 628fr) minmax(0, 440fr);
  grid-template-areas: "intro form" "rest form"; column-gap: 48px; align-items: start;
  padding-top: 28px; padding-bottom: 64px;
}
.trj-tpl-intro { grid-area: intro; }
.trj-tpl-rest { grid-area: rest; }
.trj-tpl-aside { grid-area: form; align-self: stretch; }

.trj-tpl-chip { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1.7; color: var(--tp-orange-d); background: #fff; border: 1px solid #F3B48C; border-radius: 999px; padding: 4px 14px; }
.trj-tpl-title { font-family: var(--tp-head); font-weight: 900; font-size: 36px; line-height: 1.45; color: var(--tp-navy); margin: 14px 0 12px; }
.trj-tpl-lead { font-size: 15px; line-height: 1.9; color: var(--tp-text-2); margin: 0; }
.trj-tpl-jump { display: none; }

.trj-tpl-gets { background: var(--tp-orange-t); border-radius: 14px; padding: 18px 22px; margin: 22px 0 0; }
.trj-tpl-gets h2 { font-family: var(--tp-head); font-weight: 900; font-size: 17px; color: var(--tp-navy); margin: 0 0 12px; line-height: 1.5; }
.trj-tpl-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.trj-tpl-card { background: #fff; border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: start; }
.trj-tpl-card h3 { font-size: 15px; font-weight: 900; color: var(--tp-navy); margin: 0 0 4px; line-height: 1.5; }
.trj-tpl-card p { font-size: 13px; line-height: 1.75; color: #374151; margin: 0; }
.trj-tpl-thumb { display: block; width: 100%; height: auto; border: 1px solid var(--tp-line-2); border-radius: 3px; box-shadow: 0 4px 10px rgba(17,24,39,.08); background: #fff; margin: 0 !important; }
.trj-tpl-card .trj-tpl-exlinks { margin: 6px 0 0; font-size: 12.5px; }
.trj-tpl-exlinks a, .trj-tpl-exlink { color: var(--tp-navy); font-weight: 700; text-decoration: underline; }
.trj-tpl-fmt { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--tp-orange-d); background: var(--tp-orange-t); border-radius: 4px; padding: 0 6px; margin-top: 6px; }

.trj-tpl-sec { margin-top: 34px; }
.trj-tpl-sec h2 { font-family: var(--tp-head); font-weight: 900; font-size: 21px; color: var(--tp-navy); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--tp-line); }
.trj-tpl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.trj-tpl-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.8; color: #374151; margin: 0; }
.trj-tpl-n { width: 28px; height: 28px; border-radius: 50%; background: var(--tp-orange); color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.trj-tpl-steps a { color: var(--tp-navy); font-weight: 700; text-decoration: underline; }
.trj-tpl-faq { border: 1px solid var(--tp-line); border-radius: 10px; margin: 0 0 10px; background: #fff; }
.trj-tpl-faq summary { font-size: 15px; font-weight: 700; padding: 14px 16px; cursor: pointer; list-style: none; display: flex; gap: 8px; color: var(--tp-ink); }
.trj-tpl-faq summary::-webkit-details-marker { display: none; }
.trj-tpl-faq summary::before { content: "Q"; color: var(--tp-orange); font-weight: 900; }
.trj-tpl-faq summary::after { content: "＋"; margin-left: auto; color: var(--tp-muted); font-weight: 400; }
.trj-tpl-faq[open] summary::after { content: "－"; }
.trj-tpl-faq div { font-size: 14px; color: #374151; padding: 0 16px 14px 34px; line-height: 1.85; }
.trj-tpl-faq a { color: var(--tp-navy); font-weight: 700; text-decoration: underline; }

/* ---------- フォーム ---------- */
.trj-tpl-formcard { position: sticky; top: 84px; background: #fff; border: 1px solid var(--tp-line); border-radius: 16px; box-shadow: 0 10px 26px rgba(29,53,87,.10); padding: 24px 22px 22px; scroll-margin-top: 76px; }
.trj-tpl-formtitle { font-family: var(--tp-head); font-weight: 900; font-size: 19px; line-height: 1.55; color: var(--tp-navy); margin: 0 0 16px; }
.trj-tpl-errsum { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; color: #991B1B; margin: 0 0 14px; }
.trj-tpl-row { margin-bottom: 16px; }
.trj-tpl-row > label { display: block; font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--tp-ink); }
.trj-tpl-req { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; line-height: 1.8; color: #fff; background: var(--tp-orange); border-radius: 4px; padding: 0 6px; vertical-align: 1px; }
.trj-tpl-row input[type="text"], .trj-tpl-row input[type="tel"], .trj-tpl-row input[type="email"] {
  width: 100%; height: 48px; border: 1.5px solid var(--tp-line-2); border-radius: 8px; padding: 0 12px; font-size: 16px; color: #000; background: #fff; margin: 0;
}
.trj-tpl-row input:focus { outline: none; border-color: var(--tp-orange); box-shadow: 0 0 0 3px rgba(236,106,30,.18); }
.trj-tpl-row.has-error input[type="text"], .trj-tpl-row.has-error input[type="tel"], .trj-tpl-row.has-error input[type="email"] { border-color: var(--tp-red); background: #FEF2F2; }
.trj-tpl-help { font-size: 12.5px; color: var(--tp-muted); margin: 6px 0 0; line-height: 1.6; }
.trj-tpl-error { font-size: 13px; font-weight: 700; color: var(--tp-red); margin: 6px 0 0; line-height: 1.6; }
.trj-tpl-error[hidden] { display: none; }
.trj-tpl-agree { margin: 4px 0 10px; }
.trj-tpl-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.6; cursor: pointer; }
.trj-tpl-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--tp-orange); }
.trj-tpl-check a { color: var(--tp-navy); text-decoration: underline; }

/* オレンジの立体ボタン（年収診断・共通部品のボタンと同じ形） */
.trj-tpl-submit {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin: 6px 0 0; position: relative;
  background: var(--tp-orange) !important; color: #fff !important; border: 0; border-radius: 6px; box-shadow: 0 4px 0 var(--tp-orange-d);
  padding: 14px 46px 14px 30px; font-size: 17px !important; font-weight: 700; line-height: 1.35; text-align: center; text-decoration: none !important; cursor: pointer;
}
.trj-tpl-submit::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-top: 3px solid #fff; border-right: 3px solid #fff; transform: translateY(-50%) rotate(45deg); }
.trj-tpl-submit:hover { background: #F07A33 !important; }
.trj-tpl-submit:disabled { opacity: .6; cursor: default; }
.trj-tpl-note { font-size: 12.5px; color: var(--tp-text-2); line-height: 1.7; margin: 12px 0 0; }

/* ---------- 完了画面 ---------- */
.trj-tpl-done { max-width: 760px; margin: 0 auto; padding: 36px 0 64px; }
.trj-tpl-done-head { text-align: center; }
.trj-tpl-done-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--tp-navy-soft); color: var(--tp-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; }
.trj-tpl-done-title { font-family: var(--tp-head); font-weight: 900; font-size: 28px; line-height: 1.45; color: var(--tp-navy); margin: 10px 0 6px; }
.trj-tpl-done-sub { font-size: 14.5px; color: var(--tp-text-2); margin: 0; }
.trj-tpl-dl-list { display: grid; gap: 12px; margin: 24px 0 12px; }
.trj-tpl-dl { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--tp-line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(17,24,39,.05); }
.trj-tpl-dl-info h2 { font-size: 16px; font-weight: 900; color: var(--tp-navy); margin: 0; line-height: 1.5; }
.trj-tpl-dl-info p { font-size: 12.5px; color: var(--tp-muted); margin: 2px 0 0; }
.trj-tpl-dl-info .trj-tpl-exlink { display: inline-block; margin-top: 4px; font-size: 13px; }
.trj-tpl-dl-btns { display: flex; gap: 8px; }
.trj-tpl-dlbtn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 96px; min-height: 46px; padding: 10px 18px; border-radius: 6px;
  background: var(--tp-orange); color: #fff !important; font-size: 15px; font-weight: 700; text-decoration: none !important; box-shadow: 0 3px 0 var(--tp-orange-d);
}
.trj-tpl-dlbtn:hover { background: #F07A33; }
.trj-tpl-dlbtn.is-sub { background: #fff; color: var(--tp-orange-d) !important; border: 1.5px solid var(--tp-orange); box-shadow: none; }
.trj-tpl-dlbtn.is-sub:hover { background: var(--tp-orange-t); }
.trj-tpl-filenote { font-size: 13px; color: var(--tp-text-2); line-height: 1.8; margin: 0 0 12px; }
.trj-tpl-mailnote { font-size: 13.5px; color: var(--tp-text-2); background: var(--tp-paper); border-radius: 8px; padding: 10px 14px; margin: 0; line-height: 1.8; }
.trj-tpl-next { margin-top: 30px; }
.trj-tpl-next > h2 { font-family: var(--tp-head); font-weight: 900; font-size: 20px; color: var(--tp-navy); margin: 0 0 12px; }
.trj-tpl-linebox { background: #EAF8EF; border-radius: 14px; padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.trj-tpl-linebox h3 { font-size: 16.5px; font-weight: 900; color: var(--tp-ink); margin: 0 0 4px; line-height: 1.5; }
.trj-tpl-linebox p { font-size: 13.5px; color: #374151; margin: 0; line-height: 1.8; }
.trj-tpl-linebtn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; border-radius: 999px; background: #06C755; color: #fff !important; font-size: 15px; font-weight: 700; text-decoration: none !important; white-space: nowrap; box-shadow: 0 6px 18px rgba(6,199,85,.25); }
.trj-tpl-linebtn:hover { background: #05B34C; }
.trj-tpl-links { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.trj-tpl-links li { font-size: 14.5px; margin: 0; }
.trj-tpl-links a { color: var(--tp-navy); font-weight: 700; text-decoration: underline; }
.trj-tpl-links span { color: var(--tp-muted); font-size: 12.5px; margin-left: 8px; }

/* ---------- 記入例 ---------- */
.trj-tpl-ex { max-width: 860px; margin: 0 auto; padding: 26px 0 56px; }
.trj-tpl-ex-title { font-family: var(--tp-head); font-weight: 900; font-size: 27px; line-height: 1.45; color: var(--tp-navy); margin: 0 0 8px; }
.trj-tpl-ex-lead { font-size: 14.5px; color: var(--tp-text-2); line-height: 1.85; margin: 0 0 16px; }
.trj-tpl-ex-dl { max-width: 360px; }
.trj-tpl-ex-bar { position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; align-items: center; justify-content: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--tp-line); padding: 8px 0; margin: 20px 0 0; }
.trj-tpl-ex-bar button { min-width: 44px; height: 44px; border: 1px solid var(--tp-line-2); background: #fff; border-radius: 8px; font-size: 16px; font-weight: 700; color: var(--tp-ink); cursor: pointer; padding: 0 12px; }
.trj-tpl-ex-bar button:hover { border-color: var(--tp-orange); }
.trj-tpl-ex-zoom { font-size: 13px; color: var(--tp-muted); min-width: 52px; text-align: center; }
/* 描く前から1ページ目（A4縦）の高さぶんを空けておく。空けないと、描いたときに下のボタンが押し下げられて
   CLS が大きくなる（0.7.1 の本番で 0.255。0.7.2）。高さは本文の幅（PC 860px・スマホは画面幅－左右の余白）× √2 */
.trj-tpl-ex-pages { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 14px 0; min-height: min(1216px, calc((100vw - 32px) * 1.4143)); box-sizing: border-box; }
/* 拡大したら横にスクロールさせる（テーマ・親テーマの max-width:100% が効くと、縦につぶれて見える） */
.trj-tpl-ex-page { display: block; max-width: none !important; margin: 0 auto 16px; background: #fff; border: 1px solid var(--tp-line); box-shadow: 0 4px 14px rgba(17,24,39,.08); }
.trj-tpl-ex-status { font-size: 14px; color: var(--tp-muted); text-align: center; padding: 28px 0; margin: 0; }
.trj-tpl-ex .trj-tpl-links { margin-top: 24px; }

/* ---------- スマホ ---------- */
@media (max-width: 900px) {
  .trj-tpl-entry { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "form" "rest"; row-gap: 26px; padding-top: 20px; }
  .trj-tpl-formcard { position: static; }
  .trj-tpl-pc { display: none; }
  .trj-tpl-pc-inline { display: none; }
  .trj-tpl-sp-inline { display: inline; }
  .trj-tpl-jump { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; height: 48px; border-radius: 8px; border: 1.5px solid var(--tp-orange); color: var(--tp-orange-d) !important; background: #fff; font-size: 15px; font-weight: 700; text-decoration: none !important; }
  .trj-tpl-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .trj-tpl-card { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .trj-tpl-card h3 { font-size: 14px; margin-bottom: 2px; }
  .trj-tpl-card p { font-size: 12.5px; line-height: 1.65; }
  .trj-tpl-gets { padding: 14px; margin-top: 16px; }
  .trj-tpl-sec { margin-top: 6px; }
}
@media (max-width: 640px) {
  .trj-tpl-container { padding: 0 16px; }
  .trj-tpl-title { font-size: 25px; }
  .trj-tpl-sec h2 { font-size: 19px; }
  .trj-tpl-formcard { padding: 20px 16px; }
  .trj-tpl-done { padding: 24px 0 44px; }
  .trj-tpl-done-title { font-size: 22px; }
  .trj-tpl-dl { grid-template-columns: 52px minmax(0, 1fr); padding: 12px; }
  .trj-tpl-dl-btns { grid-column: 1 / -1; }
  .trj-tpl-dlbtn { flex: 1; }
  .trj-tpl-linebox { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .trj-tpl-linebtn { white-space: normal; }
  .trj-tpl-links span { display: block; margin-left: 0; }
  .trj-tpl-ex { padding: 20px 0 44px; }
  .trj-tpl-ex-title { font-size: 21px; }
  .trj-tpl-ex-dl { max-width: none; }
  .trj-tpl-ex-bar { top: 56px; }
}
