/* ============================================================
   HITO MACHI RECRUIT Extras：求人詳細ページ
   色・角丸・書体は、テーマ（main.css）の変数をそのまま使う。
   ============================================================ */

.hmrx-single .job-single-breadcrumb { margin-bottom: 24px; }

/* ── 2カラム ── */
.hmrx-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  column-gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
}
.hmrx-head       { grid-column: 1; grid-row: 1; min-width: 0; }
.hmrx-body       { grid-column: 1; min-width: 0; }
.hmrx-apply-wrap { grid-column: 1; min-width: 0; }
.hmrx-side       { grid-column: 2; grid-row: 1 / span 3; align-self: stretch; min-width: 0; }
.hmrx-side-inner {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── 見出しまわり ── */
.hmrx-head { margin-bottom: 36px; }
.hmrx-media { height: clamp(220px, 30vw, 360px); margin-bottom: 28px; }
.hmrx-single .job-single-title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.45;
  margin-bottom: 12px;
  letter-spacing: .01em;
}
.hmrx-lead {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-mid);
  margin-bottom: 18px;
}
.hmrx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hmrx-chips .job-card-tag,
.hmrx-chips .job-card-badge { font-size: 12px; padding: 6px 12px; }

/* ── 本文 ── */
.hmrx-single .job-single-body {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 48px;
  overflow-wrap: anywhere;
}
.hmrx-single .job-single-body > :first-child { margin-top: 0; }
.hmrx-single .job-single-body p { margin-bottom: 1.2em; }
.hmrx-single .job-single-body h2 {
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.5;
}
.hmrx-single .job-single-body h3 {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}
.hmrx-single .job-single-body ul,
.hmrx-single .job-single-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.hmrx-single .job-single-body ul { list-style: disc; }
.hmrx-single .job-single-body ol { list-style: decimal; }
.hmrx-single .job-single-body li { margin-bottom: .35em; }
.hmrx-single .job-single-body li::marker { color: var(--text-lt); }
.hmrx-single .job-single-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hmrx-single .job-single-body img { height: auto; border-radius: var(--radius-sm); margin: 8px 0; }

/* ── サイドバーのカード ── */
.hmrx-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}
.hmrx-card-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-mid);
}
.hmrx-card-action { box-shadow: var(--shadow); }
.hmrx-card-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--text-lt); }
.hmrx-card-salary {
  margin-top: 2px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--accent-dark);
}
.hmrx-card-salary-note { margin-top: 2px; font-size: 12.5px; color: var(--text-mid); }
.hmrx-card-action .hmrx-btn-primary,
.hmrx-card-action .hmrx-card-closed { margin-top: 16px; }
.hmrx-card-action > .hmrx-btn-primary:first-child,
.hmrx-card-action > .hmrx-card-closed:first-child { margin-top: 0; }
.hmrx-card-closed {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--text-mid);
}
.hmrx-save-form { margin-top: 10px; }

.hmrx-spec > div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.hmrx-spec > div:first-child { border-top: none; }
.hmrx-spec > div:last-child { padding-bottom: 0; }
.hmrx-spec dt { padding-top: 1px; font-size: 12px; font-weight: 700; color: var(--text-lt); }
.hmrx-spec dd { font-size: 13.5px; line-height: 1.7; overflow-wrap: anywhere; }
.hmrx-map-link,
.hmrx-text-link {
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hmrx-map-link { display: block; margin-top: 4px; width: fit-content; }

.hmrx-company-name { margin-top: 6px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.hmrx-company-employer { margin-top: 2px; font-size: 12.5px; color: var(--text-mid); }
.hmrx-card .hmrx-text-link { display: inline-block; margin-top: 12px; }

/* ── ボタン ── */
.hmrx-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.hmrx-btn-primary { background: var(--accent); color: var(--white); }
.hmrx-btn-primary:hover { background: var(--accent-dark); }
.hmrx-btn-primary:disabled { background: var(--text-lt); cursor: default; }
.hmrx-btn-ghost {
  min-height: 46px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 13.5px;
}
.hmrx-btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.hmrx-btn-ghost.is-saved { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.hmrx-single a:focus-visible,
.hmrx-single button:focus-visible,
.hmrx-single input:focus-visible,
.hmrx-single textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 応募フォーム ── */
.hmrx-apply {
  padding: clamp(24px, 3.4vw, 40px);
  border-radius: var(--radius);
  background: var(--bg-soft);
  scroll-margin-top: 96px;
}
.hmrx-apply h2 { font-size: 21px; font-weight: 900; line-height: 1.5; }
.hmrx-apply-head { margin-bottom: 24px; }
.hmrx-apply-head p { margin-top: 4px; font-size: 13px; color: var(--text-mid); }
.hmrx-apply-alert {
  margin-bottom: 20px;
  padding: 13px 16px;
  border: 1px solid #e3b8b8;
  border-radius: var(--radius-sm);
  background: #fbeaea;
  color: #8a1f1f;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.7;
}
.hmrx-apply-done p,
.hmrx-apply-closed p { margin-top: 12px; font-size: 14.5px; line-height: 1.9; }
.hmrx-apply-done .hmrx-apply-done-note { font-size: 12.5px; color: var(--text-mid); }
.hmrx-apply-done h2::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: -3px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.hmrx-form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.hmrx-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.hmrx-field { min-width: 0; }
.hmrx-field.is-wide { grid-column: 1 / -1; }
.hmrx-field label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.hmrx-required,
.hmrx-optional {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.6;
}
.hmrx-required { background: var(--danger); color: var(--white); }
.hmrx-optional { background: var(--white); color: var(--text-lt); border: 1px solid var(--border); }
.hmrx-field input,
.hmrx-field textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
}
.hmrx-field textarea { min-height: 132px; resize: vertical; }
.hmrx-field input:focus,
.hmrx-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hmrx-field.has-error input,
.hmrx-field.has-error textarea { border-color: var(--danger); }
.hmrx-field-error { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #8a1f1f; }

.hmrx-form-agree { margin-top: 22px; }
.hmrx-form-agree label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}
.hmrx-form-agree input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.hmrx-form-agree a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.hmrx-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 24px;
}
.hmrx-form-actions .hmrx-btn { width: auto; min-width: 220px; }
.hmrx-form-note { flex: 1 1 220px; font-size: 12px; line-height: 1.8; color: var(--text-mid); }

/* ── ほかの求人 ── */
.hmrx-related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.hmrx-related h2 { margin-bottom: 18px; font-size: 19px; font-weight: 900; }
.hmrx-related-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hmrx-related-list a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: box-shadow .2s, transform .2s;
}
.hmrx-related-list a:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.hmrx-related-meta { font-size: 12px; color: var(--text-lt); }
.hmrx-related-title { font-size: 15.5px; font-weight: 700; line-height: 1.6; }
.hmrx-related-salary { margin-top: auto; padding-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--accent-dark); }

.hmrx-back { margin-top: 40px; font-size: 13px; }
.hmrx-back a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ── スマホ・タブレット ── */
@media (max-width: 900px) {
  .hmrx-layout { grid-template-columns: minmax(0, 1fr); }
  .hmrx-head, .hmrx-body, .hmrx-apply-wrap, .hmrx-side { grid-column: 1; grid-row: auto; }
  .hmrx-head { margin-bottom: 24px; }
  .hmrx-side { margin-bottom: 36px; }
  .hmrx-side-inner { position: static; }
  .hmrx-media { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; }
  .hmrx-single .job-single-body { margin-bottom: 40px; }
  .hmrx-apply { scroll-margin-top: 76px; }
  .hmrx-form-grid { grid-template-columns: minmax(0, 1fr); }
  .hmrx-form-actions .hmrx-btn { width: 100%; }
  .hmrx-related { margin-top: 48px; padding-top: 32px; }
  .hmrx-related-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hmrx-btn, .hmrx-related-list a { transition: none; }
  .hmrx-related-list a:hover { transform: none; }
}
