/* Proposal Factory 申込ページ。必須情報を先に、補助情報を静かに見せる。 */

.apply-main { background: #f6f8fa; }
.apply-header { background: rgba(255,255,255,.98); }
.apply-header-back {
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
}
.apply-header-back b { display: none; }
.apply-header-back:hover { color: var(--navy-900); }

.apply-intro {
  padding: calc(var(--header-height) + 38px) 0 34px;
  border-bottom: 1px solid var(--line); background: white;
}
.apply-intro-inner {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,.58fr);
  gap: 56px; align-items: end;
}
.apply-intro .eyebrow { margin-bottom: 20px; }
.apply-intro h1 {
  margin: 0; max-width: 15em; color: var(--navy-950);
  font-size: clamp(34px,3.65vw,48px); line-height: 1.35; letter-spacing: -.025em;
}
.apply-lead {
  margin: 18px 0 0; max-width: 45em; color: var(--ink-soft);
  font-size: 15px; line-height: 1.9;
}
.apply-assurance {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.apply-assurance div { min-width: 0; padding: 16px 14px; }
.apply-assurance div + div { border-left: 1px solid var(--line); }
.apply-assurance dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.apply-assurance dd { margin: 4px 0 0; color: var(--navy-950); font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }

.apply-section { padding: 36px 0 88px; }
.apply-layout {
  display: grid; grid-template-columns: minmax(0,780px) minmax(260px,1fr);
  gap: 48px; align-items: start;
}
.apply-form, .apply-done {
  min-width: 0; padding: 34px 38px 38px; border: 1px solid var(--line);
  background: white; box-shadow: 0 10px 32px rgba(3,37,74,.045);
}
.apply-form-head {
  display: flex; justify-content: space-between; gap: 24px; align-items: end;
  margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line-strong);
}
.apply-form-head > div { min-width: 0; }
.apply-form-head h2 { overflow-wrap: anywhere; }
.apply-form-head h2 { margin: 4px 0 0; color: var(--navy-950); font-size: 25px; line-height: 1.4; }
.apply-form-head > p { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.apply-form-head > p span, .req { color: #9b2c2c; font-weight: 800; }
.apply-kicker {
  margin: 0; color: var(--navy-700); font-size: 11px !important;
  font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}

.apply-block { margin: 0; padding: 0; border: 0; }
.apply-block + .apply-block { margin-top: 40px; }
.apply-block legend {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 24px; color: var(--navy-950);
  font-size: 16px; font-weight: 800;
}
.apply-step-number {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--navy-950); color: white; font-size: 11px;
}
.apply-contact { padding-top: 36px; border-top: 1px solid var(--line); }

.field { min-width: 0; margin-bottom: 26px; }
.field-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; }
.field-row-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.field > label, .field-label {
  display: flex; align-items: center; gap: 7px; margin-bottom: 9px;
  color: var(--navy-950); font-size: 13.5px; font-weight: 800;
}
.field .opt { margin-left: 4px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.field-note {
  margin: 7px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7;
}
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field select, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 13px;
  border: 1px solid #bccad7; border-radius: 6px; background: white;
  color: var(--navy-950); font-family: inherit; font-size: 15px; line-height: 1.65;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 126px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(23,103,166,.12);
}
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid,
.apply-consent input.is-invalid + span {
  border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179,38,30,.1);
}
.field-error { display: block; margin: 7px 0 0; color: #9b2c2c; font-size: 12px; font-weight: 700; }

.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy-900); }
.check span { color: var(--ink-soft); font-size: 13.5px; line-height: 1.7; }
.checks-chips .check { position: relative; }
.checks-chips .check input { position: absolute; opacity: 0; pointer-events: none; }
.checks-chips .check span {
  display: block; padding: 9px 13px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: white; color: var(--ink-soft); font-weight: 700;
}
.checks-chips .check input:checked + span { border-color: var(--navy-900); background: #edf4fa; color: var(--navy-950); }
.checks-chips .check input:focus-visible + span { outline: 3px solid rgba(23,103,166,.18); outline-offset: 2px; }
.deck-mode-field { margin: 28px 0; padding: 0; border: 0; }
.deck-mode-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.deck-mode-card { position: relative; cursor: pointer; }
.deck-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.deck-mode-card span {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; min-height: 148px; padding: 20px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: white; transition: .18s ease;
}
.deck-mode-card b { color: var(--navy-950); font-size: 17px; }
.deck-mode-card em { align-self: center; color: var(--navy-700); font-size: 11px; font-style: normal; font-weight: 800; }
.deck-mode-card small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.deck-mode-card input:checked + span { border-color: var(--navy-900); background: var(--blue-050); box-shadow: inset 0 0 0 1px var(--navy-900); }
.deck-mode-card input:focus-visible + span { outline: 3px solid rgba(23,103,166,.18); outline-offset: 2px; }
.deck-mode-card input.is-invalid + span { border-color: #b3261e; background: #fff5f4; }
.deck-volume-field { margin: -6px 0 28px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.deck-volume-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.deck-volume-card { position: relative; cursor: pointer; }
.deck-volume-card input { position: absolute; opacity: 0; pointer-events: none; }
.deck-volume-card span {
  display: flex; min-height: 78px; padding: 12px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: white; flex-direction: column; justify-content: center; gap: 5px;
  text-align: center; transition: .18s ease;
}
.deck-volume-card b { color: var(--navy-950); font-size: 13px; }
.deck-volume-card small { color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.deck-volume-card input:checked + span { border-color: var(--navy-900); background: var(--blue-050); box-shadow: inset 0 0 0 1px var(--navy-900); }
.deck-volume-card input:focus-visible + span { outline: 3px solid rgba(23,103,166,.18); outline-offset: 2px; }
.deck-volume-caveat { margin-top: 11px; }
.materials-status-field { padding: 0; border: 0; }
.materials-status-field .field-label { margin-bottom: 0; }
.materials-status-note { margin: 6px 0 11px; }
.materials-status-options { align-items: stretch; }
.materials-status-options .check span { border-radius: 6px; }

.dropzone {
  display: grid; place-items: center; min-height: 112px; padding: 22px;
  border: 1.5px dashed #9cb0c3; border-radius: 8px; background: #fbfcfd;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus { outline: 0; border-color: var(--navy-700); background: var(--blue-050); }
.dropzone.is-over { border-color: var(--navy-900); background: var(--blue-100); }
.dropzone-main { margin: 0; color: var(--navy-900); font-size: 14px; font-weight: 800; }
.dropzone-sub { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.file-list { margin: 12px 0 0; padding: 0; list-style: none; font-size: 12.5px; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-info { min-width: 0; overflow-wrap: anywhere; }
.file-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.file-design { border: 1px solid var(--navy-700); border-radius: 999px; padding: 5px 9px; background: white; color: var(--navy-900); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.file-design[aria-pressed="true"] { border-color: var(--navy-900); background: var(--navy-900); color: white; }
.design-reference-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-050); }
.design-reference-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.design-reference-head b { color: var(--navy-950); font-size: 13px; }
.design-reference-head p, .design-reference-empty { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.design-reference-head > span { flex: 0 0 auto; border-radius: 999px; padding: 3px 8px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; }
.design-reference-options { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.design-reference-options .field-row { margin: 0; }
.design-reference-authority { margin-top: 12px; }
.file-remove { border: 0; background: none; color: #9b2c2c; font: inherit; cursor: pointer; }
.file-wait, .file-err { font-size: 12px; font-style: normal; }
.file-wait { color: var(--muted); }
.file-err { color: #9b2c2c; }
.file-total { margin: 9px 0 0; color: var(--muted); font-size: 12px; }

.apply-optional { margin: 8px 0 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.apply-optional summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0; list-style: none; cursor: pointer;
}
.apply-optional summary::-webkit-details-marker { display: none; }
.apply-optional summary b { display: block; color: var(--navy-950); font-size: 14px; }
.apply-optional summary small { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.apply-optional-action { color: var(--navy-700); font-size: 12px; font-weight: 800; }
.apply-optional[open] .apply-optional-action { font-size: 0; }
.apply-optional[open] .apply-optional-action::after { content: "閉じる"; font-size: 12px; }
.apply-optional-body { padding: 28px 0 6px; border-top: 1px solid var(--line); }
.option-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.check-panel { padding: 15px 0; }
.check-panel + .check-panel { border-top: 1px solid var(--line); }
.check-panel span b, .check-panel span small { display: block; }
.check-panel span b { color: var(--navy-950); font-size: 13px; }
.check-panel span small { margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.nested-field { margin: 0 0 10px 28px; padding: 16px; border-left: 2px solid var(--navy-700); background: var(--blue-050); }

.apply-consent { margin-top: 28px; padding: 18px 20px; border-radius: 6px; background: #f4f6f8; }
.apply-consent .check span { color: var(--ink-soft); font-size: 12.5px; line-height: 1.8; }
.apply-consent a { color: var(--navy-700); font-weight: 800; }
.apply-consent > p { margin: 8px 0 0 28px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.apply-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-top: 28px; }
.apply-actions .button { min-width: 280px; min-height: 54px; justify-content: center; border-radius: 6px; }
.apply-actions .button[disabled] { opacity: .62; cursor: progress; }
.apply-actions p { margin: 0; color: var(--muted); font-size: 12px; }
.apply-error {
  margin: 0 0 26px; padding: 14px 16px; border-left: 3px solid #b3261e;
  background: #fff5f4; color: #8c1d18; font-size: 13px; line-height: 1.75;
}

.apply-side { position: sticky; top: calc(var(--header-height) + 28px); padding: 12px 0; }
.apply-side h2 { margin: 8px 0 24px; color: var(--navy-950); font-size: 21px; line-height: 1.55; }
.apply-side ol { margin: 0; padding: 0; list-style: none; }
.apply-side li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 0 0 22px; position: relative; }
.apply-side li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line-strong); }
.apply-side li > span {
  display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong);
  border-radius: 50%; background: white; color: var(--navy-700); font-size: 11px; font-weight: 800;
}
.apply-side li b { color: var(--navy-950); font-size: 13.5px; }
.apply-side li p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.apply-side-note { margin: 4px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; line-height: 1.75; }

.apply-done { grid-column: 1; }
.apply-done-mark {
  display: inline-block; margin: 0 0 18px !important; padding: 5px 10px;
  border-radius: 999px; background: #e8f5ec; color: #246b3b !important;
  font-size: 11px !important; font-weight: 800; letter-spacing: .05em;
}
.apply-done h2 { margin: 0 0 12px; color: var(--navy-950); font-size: 30px; }
.apply-done > p { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.apply-done-id { color: var(--muted) !important; font-size: 12px !important; }
.apply-done-next { margin: 30px 0 18px; padding: 24px; border-left: 4px solid var(--navy-900); background: var(--blue-050); }
.apply-done-next h3 { margin: 5px 0 8px; color: var(--navy-950); font-size: 20px; }
.apply-done-next p { margin: 0 0 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.apply-done-next .button { min-height: 50px; border-radius: 6px; }
.apply-done-details { margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.apply-done-details summary { padding: 15px 0; color: var(--navy-700); font-size: 13px; font-weight: 800; cursor: pointer; }
.apply-done-details > div { padding: 0 0 18px; }
.apply-quote-plan { margin: 0; color: var(--ink-soft); font-size: 13px; }
.apply-quote-total { margin: 4px 0 0; color: var(--navy-950); font-size: 27px; font-weight: 800; }
.apply-quote-caveats { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.apply-done-case { margin: 16px 0 0 !important; }
.apply-done-case a { color: var(--navy-700); font-size: 13px; font-weight: 800; }

.apply-footer { border-top: 1px solid var(--line); background: white; }
.apply-footer > div { display: flex; justify-content: space-between; gap: 24px; padding-top: 26px; padding-bottom: 26px; }
.apply-footer p, .apply-footer nav { margin: 0; color: var(--muted); font-size: 11.5px; }
.apply-footer nav { display: flex; gap: 20px; }

@media (max-width: 980px) {
  .apply-intro-inner { grid-template-columns: 1fr; gap: 30px; }
  .apply-assurance { max-width: 620px; }
  .apply-layout { grid-template-columns: 1fr; gap: 28px; }
  .apply-side { position: static; padding: 22px 24px; border: 1px solid var(--line); background: white; }
  .apply-side h2 { display: none; }
  .apply-side ol { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
  .apply-side li { padding: 0; }
  .apply-side li::after { display: none; }
}

@media (max-width: 680px) {
  .apply-header-back { font-size: 12px; }
  .apply-header-back span { display: none; }
  .apply-header-back b { display: inline; }
  .apply-intro { padding: calc(var(--header-height) + 32px) 0 30px; }
  .apply-intro h1 { font-size: 32px; line-height: 1.4; }
  .apply-lead { font-size: 14px; }
  .apply-assurance { width: 100%; min-width: 0; }
  .apply-assurance div { min-width: 0; padding: 12px 7px; }
  .apply-assurance dt { font-size: 10px; }
  .apply-assurance dd { font-size: 12px; }
  .apply-section { padding: 20px 0 112px; }
  .apply-layout { gap: 16px; }
  .apply-side { padding: 18px; }
  .apply-side ol { grid-template-columns: 1fr; gap: 0; }
  .apply-side li { padding-bottom: 14px; }
  .apply-side li:not(:last-child)::after { display: block; }
  .apply-side-note { display: none; }
  .apply-form, .apply-done { padding: 26px 20px 30px; box-shadow: none; }
  .apply-form-head { flex-direction: column; align-items: start; gap: 8px; margin-bottom: 26px; }
  .apply-form-head h2 { font-size: 22px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 22px; }
  .field input[type="text"], .field input[type="email"], .field input[type="tel"],
  .field input[type="date"], .field select { min-height: 52px; font-size: 16px; }
  .field textarea { font-size: 16px; }
  .checks-chips { gap: 7px; }
  .checks-chips .check span { padding: 9px 12px; }
  .deck-mode-options { grid-template-columns: 1fr; }
  .deck-mode-card span { min-height: 0; }
  .deck-volume-field { margin-top: -2px; padding: 16px; }
  .deck-volume-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .materials-status-options .check { width: 100%; }
  .materials-status-options .check span { width: 100%; }
  .dropzone { min-height: 96px; padding: 18px; }
  .apply-optional summary { align-items: flex-start; }
  .apply-consent { padding: 16px; }
  .apply-consent > p { margin-left: 0; }
  .apply-actions {
    position: fixed; z-index: 900; left: 0; right: 0; bottom: 0;
    margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 24px rgba(3,37,74,.08);
  }
  .apply-actions .button { width: 100%; min-height: 52px; }
  .apply-actions p { display: none; }
  .apply-footer > div { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .field input, .field select, .field textarea, .dropzone { transition: none; }
}

.apply-form.is-confirming > :not(.apply-confirm):not(.apply-error) { display: none; }
.apply-confirm {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: clamp(24px, 4vw, 42px);
}
.apply-confirm dl { margin: 24px 0; border-top: 1px solid var(--line); }
.apply-confirm dt { padding: 14px 0 3px; color: #526476; font-size: .84rem; font-weight: 700; }
.apply-confirm dd { margin: 0; padding: 0 0 14px; white-space: pre-wrap; border-bottom: 1px solid #e5eaf0; }
.apply-confirm-note,.apply-done-plan,.apply-done-duplicate { color: #526476; }
.apply-confirm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.apply-confirm-actions .button { flex: 1 1 220px; }

/* 受付停止のお知らせ。エラーではないので赤くしない。 */
.apply-notice { margin: 0 0 18px; padding: 12px 14px; border: 1px solid #d9c47a; border-radius: 8px; background: #fdf8e7; color: #6b551b; font-size: 13px; line-height: 1.8; }

/* 添付の役割指定（指定様式）。ロゴ／デザイン見本は .file-design を使う。 */
.file-template { display: inline-flex; align-items: center; gap: 5px; color: var(--navy-900); font-size: 11px; font-weight: 800; cursor: pointer; }
.file-template input { margin: 0; }

/* 受付完了画面の案件URL。メールを送っていない場合だけ出す。 */
.apply-done-url { margin: 16px 0; padding: 14px; border: 1px solid #e5eaf0; border-radius: 8px; background: #f7f9fc; }
.apply-done-url label { display: block; margin-bottom: 6px; color: #526476; font-size: 12px; font-weight: 700; }
.apply-done-url-row { display: flex; flex-wrap: wrap; gap: 8px; }
.apply-done-url-row input { flex: 1 1 260px; min-width: 0; padding: 9px 10px; border: 1px solid #d5dde6; border-radius: 6px; background: white; font: inherit; font-size: 12.5px; }
.apply-done-url-row .button { flex: 0 0 auto; }
.apply-case-link { margin-top: 12px; }
