@charset "utf-8";
/* ==========================================================
   エントリーフォーム・完了画面
   ボタン・色は position-detail.css（.pd-btn / :root の変数）を共用
   入力欄は高さ54px以上・文字16px（iOSの自動ズーム防止）
   モバイルファースト。SPは375px基準、PCは1366px基準のvw
   ========================================================== */

.ef {
  font-family: YakuHanJP_Noto, 'Noto Sans JP', sans-serif;
  color: var(--pd-ink);
}
.ef [hidden] { display: none !important; }

.ef-alert {
  margin: 0 0 calc(24 / 375 * 100vw);
  padding: calc(14 / 375 * 100vw) calc(16 / 375 * 100vw);
  border-left: 4px solid #d93025;
  border-radius: 6px;
  background: #fdecea;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: #a1251b;
}
.ef-lead {
  margin: 0 0 calc(24 / 375 * 100vw);
  font-size: clamp(14px, calc(15 / 375 * 100vw), 16px);
  line-height: 1.8;
  text-align: center;
}

/* スパム対策の隠し項目（人には見せない） */
.ef-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- グループ ---- */
.ef-group {
  margin: 0 0 calc(28 / 375 * 100vw);
  padding: 0;
  border: 0;
}
.ef-group__ttl {
  width: 100%;
  margin: 0 0 calc(16 / 375 * 100vw);
  padding: 0 0 calc(8 / 375 * 100vw);
  border-bottom: 2px solid var(--pd-forest);
  font-size: clamp(16px, calc(17 / 375 * 100vw), 20px);
  font-weight: 700;
  color: var(--pd-forest-dark);
}

/* ---- 項目 ---- */
.ef-field { margin: 0 0 calc(20 / 375 * 100vw); }
.ef-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.ef-req,
.ef-opt {
  flex-shrink: 0;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  background: #d93025;
}
.ef-opt { background: #8a8a8a; }

.ef-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid #c9c9c9;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--pd-ink);
  transition: border-color .2s, box-shadow .2s;
}
select.ef-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231f7f76' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
}
select.ef-input:disabled { background-color: #f3f3f3; color: #888; }
.ef-input--area {
  min-height: 140px;
  padding: 12px 14px;
  line-height: 1.7;
  resize: vertical;
}
.ef-input::placeholder { color: #aaa; }
.ef-input:focus {
  outline: none;
  border-color: var(--pd-forest);
  box-shadow: 0 0 0 3px rgba(54, 185, 172, .25);
}
.ef-field.is-ok .ef-input { border-color: var(--pd-forest); }
.ef-field.is-err .ef-input { border-color: #d93025; background-color: #fff8f7; }

.ef-birth {
  display: grid;
  grid-template-columns: 1.5fr auto 1fr auto 1fr auto; /* 年・月・日を1行に収める */
  align-items: center;
  gap: 6px;
}
.ef-birth span { font-size: 15px; }
.ef-birth .ef-input { min-width: 0; padding: 0 30px 0 10px; background-position: right 10px center; }

.ef-note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--pd-sub);
}
.ef-center { text-align: center; }
.ef-ok {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--pd-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--pd-forest-dark);
}
.ef-ok::before { content: "✓ "; }
.ef-err {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #d93025;
}
.ef-field.is-err .ef-err { display: block; }

/* 同意 */
.ef-consent {
  margin-top: calc(8 / 375 * 100vw);
  padding: calc(16 / 375 * 100vw);
  border-radius: 8px;
  background: #f6f6f6;
}
.ef-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ef-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--pd-forest);
}
.ef-check a { color: var(--pd-forest-dark); text-decoration: underline; }
.ef-consent .ef-err { text-align: center; }

/* ---- ボタン ---- */
.ef-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12 / 375 * 100vw);
  margin-top: calc(28 / 375 * 100vw);
}
.ef-submit {
  width: 100%;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.ef-submit:disabled { opacity: .6; cursor: wait; }
/* 確認画面：左に「戻る」（グレー）・右に「応募する」 */
.ef-actions--confirm {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: stretch;
  width: 100%;
}
.ef-actions--confirm .pd-btn { padding: 0 8px; }
.ef-actions--confirm .ef-submit {
  width: 100%;
  font-size: 15px;
  white-space: nowrap;
}
.ef-back {
  flex-wrap: wrap;
  align-content: center;
  border: 0;
  background: #e6e6e6;
  font-family: inherit;
  font-size: 13px;
  color: var(--pd-ink);
  cursor: pointer;
}
.ef-back:hover { background: #d6d6d6; }
.ef-back span { display: inline-block; }

/* ---- 確認 ---- */
.ef-confirm__ttl {
  margin: 0 0 calc(16 / 375 * 100vw);
  font-size: clamp(18px, calc(20 / 375 * 100vw), 24px);
  font-weight: 700;
  text-align: center;
  color: var(--pd-forest);
}
.ef-confirm__ttl:focus { outline: none; }
.ef-confirm {
  margin: 0;
  border-top: 1px solid var(--pd-border);
}
.ef-confirm div {
  padding: 14px 0;
  border-bottom: 1px solid var(--pd-border);
}
.ef-confirm dt {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pd-forest-dark);
}
.ef-confirm dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---- 完了画面 ---- */
.ef-thanks { text-align: center; }
.ef-thanks__ttl {
  margin: 0 0 calc(12 / 375 * 100vw);
  font-size: clamp(20px, calc(22 / 375 * 100vw), 30px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--pd-forest);
  word-break: auto-phrase;
}
.ef-thanks__txt { margin: 0 0 calc(28 / 375 * 100vw); font-size: 15px; line-height: 1.8; }
.ef-flow {
  margin: 0 0 calc(32 / 375 * 100vw);
  padding: calc(20 / 375 * 100vw);
  border-radius: 10px;
  background: var(--pd-soft);
  text-align: left;
}
.ef-flow__ttl {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--pd-forest-dark);
}
.ef-flow ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ef-flow;
}
.ef-flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  counter-increment: ef-flow;
}
.ef-flow li::before {
  content: counter(ef-flow);
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pd-forest);
  font-family: "din-2014-narrow", sans-serif;
  font-size: 16px;
  color: #fff;
}

/* ==========================================================
   PC（768px〜）
   ========================================================== */
@media (min-width: 768px) {
  .ef-form, .ef-thanks { max-width: 720px; margin: 0 auto; }
  .ef-alert { margin-bottom: calc(32 / 1366 * 100vw); padding: calc(16 / 1366 * 100vw) calc(20 / 1366 * 100vw); }
  .ef-lead { margin-bottom: calc(36 / 1366 * 100vw); }
  .ef-group { margin-bottom: calc(40 / 1366 * 100vw); }
  .ef-group__ttl { margin-bottom: calc(24 / 1366 * 100vw); padding-bottom: calc(10 / 1366 * 100vw); }
  .ef-field { margin-bottom: calc(28 / 1366 * 100vw); }
  .ef-consent { margin-top: calc(12 / 1366 * 100vw); padding: calc(20 / 1366 * 100vw); }
  .ef-actions { margin-top: calc(40 / 1366 * 100vw); gap: calc(14 / 1366 * 100vw); }
  .ef-submit { width: auto; min-width: calc(400 / 1366 * 100vw); }
  .ef-actions--confirm { display: flex; flex-direction: row; justify-content: center; gap: 16px; }
  .ef-actions--confirm .ef-submit { width: auto; min-width: calc(360 / 1366 * 100vw); font-size: clamp(16px, calc(19 / 1366 * 100vw), 19px); }
  .ef-actions--confirm .pd-btn { padding: 0 calc(32 / 1366 * 100vw); }
  .ef-back { font-size: 15px; }
  .ef-confirm__ttl { margin-bottom: calc(24 / 1366 * 100vw); }
  .ef-birth { grid-template-columns: 120px auto 90px auto 90px auto; justify-content: start; }
  .ef-confirm div {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    padding: 18px 0;
  }
  .ef-confirm dt { margin: 0; padding-top: 3px; }
  .ef-thanks__ttl { margin-bottom: calc(16 / 1366 * 100vw); }
  .ef-thanks__txt { margin-bottom: calc(40 / 1366 * 100vw); }
  .ef-flow { margin-bottom: calc(48 / 1366 * 100vw); padding: calc(28 / 1366 * 100vw) calc(36 / 1366 * 100vw); }
}

@media (prefers-reduced-motion: reduce) {
  .ef-input { transition: none; }
}
