@charset "UTF-8";
/* ==========================================================================
   サービスお問い合わせフォーム（/service）専用スタイル
   - 既存の base.css / youkou.css には依存しない（採用・他フォームへの影響なし）
   - すべて body.sf 配下にスコープ
   - スペーシング / 角丸は 8px 刻み
   - アクセント色は --accent で一括管理（body[data-accent="brick"] で赤系に切替）
   ========================================================================== */

body.sf {
  /* palette */
  --paper: #F7F6F2;
  --panel: #ECEEEA;
  --surface: #FFFFFF;
  --ink: #1E2422;
  --ink-2: #5A625F;
  --ink-3: #8C938F;
  --line: #D9DCD6;
  --line-strong: #C3C8C1;

  --accent: #0F6656;
  --accent-hover: #0B5245;
  --accent-soft: #E1EEEA;

  --error: #C4321F;
  --error-soft: #FBEDEA;

  /* 必須バッジ */
  --required: #B8322A;

  /* type */
  --font: "LINE Seed JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;

  /* motion */
  --ease: cubic-bezier(0.4, 1.07, 1, 1);
}

body.sf[data-accent="brick"] {
  --accent: #A8322D;
  --accent-hover: #8E2924;
  --accent-soft: #F5E6E3;
  /* エラーとアクセントが近くならないよう、エラーは朱寄りに */
  --error: #D0451B;
  --error-soft: #FCEEE8;
}

/* --------------------------------------------------------------------------
   base
   -------------------------------------------------------------------------- */
body.sf,
body.sf *,
body.sf *::before,
body.sf *::after {
  box-sizing: border-box;
}

body.sf {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  /* 日本語を文節で改行（対応ブラウザのみ） */
  word-break: auto-phrase;
}

/* リセットは :where() で詳細度0にし、各コンポーネントの余白指定を優先させる */
:where(body.sf) :where(h1, h2, h3, p, dl, dt, dd) {
  margin: 0;
}

body.sf a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

body.sf a:hover {
  color: var(--accent-hover);
}

body.sf .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   layout
   -------------------------------------------------------------------------- */
.sf-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 96px 64px 120px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 32px;
  align-items: start;
}

.sf-head {
  grid-column: 1 / 5;
  position: sticky;
  top: 48px;
}

.sf-main {
  grid-column: 6 / 13;
}

.sf-footer {
  padding: 32px 64px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   左カラム
   -------------------------------------------------------------------------- */
.sf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.sf-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.sf-title {
  margin-top: 24px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.sf-title small {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.sf-lead {
  margin-top: 32px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 2;
}

.sf-lead + .sf-lead {
  margin-top: 16px;
}

/* 残り項目カウンター */
.sf-counter {
  margin-top: 40px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.sf-counter__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}

.sf-counter__value {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.sf-counter__num {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.sf-counter__bar {
  margin-top: 16px;
  height: 4px;
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.sf-counter__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}

.sf-counter__done {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.sf-counter.is-complete {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.sf-counter.is-complete .sf-counter__value {
  display: none;
}

.sf-counter.is-complete .sf-counter__done {
  display: flex;
}

.sf-counter.is-bump .sf-counter__num {
  animation: sf-bump 0.3s var(--ease);
}

@keyframes sf-bump {
  0% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   右パネル
   -------------------------------------------------------------------------- */
.sf-panel {
  background: var(--panel);
  border-radius: 24px;
  padding: 48px 56px 56px;
}

/* STEP */
.sf-steps {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}

.sf-steps li {
  position: relative;
  padding-bottom: 16px;
  text-align: center;
  color: var(--ink-3);
  line-height: 1;
}

.sf-steps li::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, 50%);
  opacity: 0;
}

.sf-steps .num {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sf-steps .ja {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.sf-steps li.is-current .num {
  color: var(--accent);
}

.sf-steps li.is-current {
  color: var(--ink);
}

.sf-steps li.is-current::after {
  opacity: 1;
}

.sf-steps li.is-done {
  color: var(--ink-2);
}

/* エラーサマリー */
.sf-alert {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 24px;
  border-radius: 8px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.sf-alert[hidden] {
  display: none;
}

.sf-alert i {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   フォーム
   -------------------------------------------------------------------------- */
.sf-form {
  margin-top: 48px;
}

.sf-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 16px;
}

.sf-row--half {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sf-row > .sf-field + .sf-field {
  margin-top: 0;
}

.sf-field + .sf-field,
.sf-row + .sf-field,
.sf-field + .sf-row,
.sf-row + .sf-row {
  margin-top: 40px;
}

.sf-field dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sf-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.sf-status {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  line-height: 1;
}

.sf-status i {
  display: none;
  font-size: 16px;
}

.sf-field.is-valid .sf-status {
  color: var(--accent);
}

.sf-field.is-valid .sf-status span {
  display: none;
}

.sf-field.is-valid .sf-status i {
  display: inline-block;
  animation: sf-pop 0.3s var(--ease);
}

@keyframes sf-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sf-field dd {
  margin-top: 16px;
}

.sf-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* input / select / textarea */
.sf-input,
.sf-select select,
.sf-textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0 16px;
  height: 56px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.sf-input::placeholder,
.sf-textarea::placeholder {
  color: var(--ink-3);
  opacity: 1;
}

.sf-input:hover,
.sf-select select:hover,
.sf-textarea:hover {
  border-color: var(--line-strong);
}

.sf-input:focus,
.sf-select select:focus,
.sf-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.sf-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--ink);
}

.sf-textarea {
  height: auto;
  min-height: 200px;
  padding: 16px;
  line-height: 1.8;
  resize: vertical;
}

.sf-select {
  position: relative;
}

.sf-select select {
  padding-right: 48px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.sf-select select:invalid,
.sf-select select.is-placeholder {
  color: var(--ink-3);
}

.sf-select option {
  color: var(--ink);
}

.sf-select::after {
  content: "\f078";
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
  color: var(--ink-2);
  pointer-events: none;
}

.sf-count {
  margin-top: 8px;
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.sf-count.is-over {
  color: var(--error);
  font-weight: 700;
}

/* error */
.sf-field.is-error .sf-input,
.sf-field.is-error .sf-select select,
.sf-field.is-error .sf-textarea,
.sf-input.is-error,
.sf-select select.is-error,
.sf-textarea.is-error {
  border-color: var(--error);
  background: var(--error-soft);
}

.sf-field.is-error .sf-input:focus,
.sf-field.is-error .sf-select select:focus,
.sf-field.is-error .sf-textarea:focus {
  box-shadow: 0 0 0 4px var(--error-soft);
}

.sf-error {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  color: var(--error);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.sf-error:empty {
  display: none;
}

.sf-error::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  line-height: 1.8;
}

/* 個人情報の取り扱い */
.sf-agree {
  margin-top: 56px;
  padding: 32px;
  border-radius: 16px;
  background: var(--surface);
}

.sf-agree__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sf-agree h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.sf-agree__text {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 2;
}

.sf-agree__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}

.sf-agree__link i {
  font-size: 11px;
}

.sf-agree__consent {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.sf-check {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.sf-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.sf-check__box {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #fff;
  font-size: 12px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.sf-check__box i {
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.sf-check:hover .sf-check__box {
  border-color: var(--accent);
}

.sf-check input:focus-visible + .sf-check__box {
  box-shadow: 0 0 0 4px var(--accent-soft);
  border-color: var(--accent);
}

.sf-check input:checked + .sf-check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.sf-check input:checked + .sf-check__box i {
  opacity: 1;
  transform: scale(1);
}

.sf-field.is-error .sf-check__box {
  border-color: var(--error);
  background: var(--error-soft);
}

/* --------------------------------------------------------------------------
   ボタン
   -------------------------------------------------------------------------- */
.sf-actions {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sf-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 360px;
  height: 64px;
  padding: 0 56px;
  border: 1px solid var(--ink);
  border-radius: 32px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}

body.sf a.sf-btn,
body.sf a.sf-btn:hover {
  color: #fff;
}

.sf-btn i {
  position: absolute;
  right: 24px;
  font-size: 13px;
  transition: transform 0.3s var(--ease);
}

.sf-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.sf-btn:hover i {
  transform: translateX(4px);
}

.sf-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* 未完了でも押せる（押すと不足項目へ案内）。見た目だけ控えめに */
.sf-btn.is-pending {
  background: var(--ink-3);
  border-color: var(--ink-3);
}

.sf-btn.is-pending:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.sf-btn--ghost,
body.sf a.sf-btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

body.sf a.sf-btn--ghost:hover,
.sf-btn--ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
}

.sf-btn--ghost i {
  left: 24px;
  right: auto;
}

.sf-btn--ghost:hover i {
  transform: translateX(-4px);
}

.sf-note {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

/* --------------------------------------------------------------------------
   確認画面
   -------------------------------------------------------------------------- */
.sf-confirm {
  margin-top: 48px;
  border-radius: 16px;
  background: var(--surface);
  padding: 8px 32px;
}

.sf-confirm__row {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
}

.sf-confirm__row + .sf-confirm__row {
  border-top: 1px solid var(--line);
}

.sf-confirm__row dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.8;
}

.sf-confirm__row dd {
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   完了 / エラー画面
   -------------------------------------------------------------------------- */
.sf-message {
  margin-top: 56px;
  text-align: center;
}

.sf-message__icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 24px;
}

.sf-message__icon.is-error {
  background: var(--error-soft);
  color: var(--error);
}

.sf-message h2 {
  margin-top: 24px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}

.sf-message p {
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 2;
  text-align: left;
}

.sf-message .sf-actions {
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   ローディング
   -------------------------------------------------------------------------- */
.sf-loading {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  place-items: center;
  background: rgba(247, 246, 242, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.sf-loading.is-show {
  display: grid;
}

.sf-loading__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.sf-loading__spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: sf-spin 0.8s linear infinite;
}

@keyframes sf-spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   SP（1024px以下）
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .sf-page {
    display: block;
    padding: 56px 24px 64px;
  }

  .sf-head {
    position: static;
  }

  .sf-title {
    margin-top: 16px;
    font-size: 26px;
  }

  .sf-lead {
    margin-top: 24px;
  }

  .sf-main {
    margin-top: 40px;
  }

  /* カウンターは画面下に固定 */
  .sf-counter {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    margin: 0;
    padding: 16px 24px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 16px;
    box-shadow: 0 8px 24px rgba(30, 36, 34, 0.12);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
  }

  .sf-counter.is-hidden {
    transform: translateY(calc(100% + 24px));
    opacity: 0;
  }

  .sf-counter__label {
    grid-column: 1;
    grid-row: 1;
  }

  .sf-counter__value,
  .sf-counter__done {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
  }

  .sf-counter__num {
    font-size: 32px;
  }

  .sf-counter__bar {
    grid-column: 2;
    grid-row: 1 / 3;
    margin-top: 0;
  }

  .sf-panel {
    margin: 0 -24px;
    padding: 40px 24px 48px;
    border-radius: 24px 24px 0 0;
  }

  .sf-steps {
    gap: 32px;
  }

  .sf-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sf-row > .sf-field + .sf-field {
    margin-top: 40px;
  }

  .sf-agree {
    padding: 24px;
  }

  .sf-confirm {
    padding: 8px 24px;
  }

  .sf-confirm__row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0;
  }

  .sf-footer {
    padding: 24px 24px 120px;
  }

  .sf-page--simple + .sf-footer {
    padding-bottom: 32px;
  }
}

@media screen and (max-width: 480px) {
  .sf-pair {
    gap: 8px;
  }

  .sf-btn {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sf *,
  body.sf *::before,
  body.sf *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.sf-panel > .sf-message:first-child {
  margin-top: 0;
}

/* 必須 / 任意 バッジ */
.sf-status > span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--required);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sf-status--optional > span {
  background: transparent;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-weight: 400;
}

/* 確認画面：任意項目が空のとき */
.sf-empty {
  color: var(--ink-3);
  font-size: 14px;
}

/* ボタン文言は折り返さない（完了画面などの長い文言用に幅を可変に） */
.sf-btn {
  white-space: nowrap;
}

.sf-message .sf-btn {
  width: auto;
  max-width: none;
  min-width: 360px;
}

@media screen and (max-width: 480px) {
  .sf-message .sf-btn {
    width: 100%;
    min-width: 0;
    padding: 0 48px;
  }
}

/* 非表示にした項目（ServiceRequest::HIDDEN_FIELDS） */
body.sf [hidden] {
  display: none !important;
}

/* 部署名・役職名のどちらか一方だけ表示する場合は全幅に */
.sf-row--half.sf-row--single {
  grid-template-columns: minmax(0, 1fr);
}

.sf-row--single > .sf-field + .sf-field {
  margin-top: 0;
}
