/* 求人個別（docs/design/04-job-single.md）。SP 先行、768px 以上で PC。 */

.p-job {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding: 0 0 40px;
}

.p-job__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--jn-color-white);
}

/* 帯 */
.p-job__band {
  padding: 12px 20px;
  background: var(--jn-color-secondary);
}
.p-job__title {
  margin: 0;
  color: var(--jn-color-white);
  font-size: 18px;
  font-weight: 700;
  line-height: 28.8px;
}

/* 上部要約（SP は 特徴 → 業種・企業名 → 画像 → 説明 → ボタン） */
.p-job-summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 20px 12px;         /* 下 12: キープ下端→区切り線 28（Figma SP。カード gap 16＋12） */
}
.p-job-summary__body { display: contents; }
.p-job-summary__features { order: 1; }
.p-job-summary__head { order: 2; }
.p-job-gallery { order: 3; }
.p-job-summary__catch { order: 4; }
.p-job-summary__actions { order: 5; }

.p-job-summary__head { display: flex; flex-direction: column; gap: 4px; }
.p-job-summary__industry {
  margin: 0;
  color: var(--jn-color-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 28.8px;
}
.p-job-summary__company {
  margin: 0;
  color: var(--jn-color-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 19.2px;
}
.p-job-summary__catch {
  margin: 0;
  word-break: normal; line-break: strict; /* keep-all の非常折りで「。」だけの行が出るのを防ぐ（14 幅点検） */
  color: #0387A8;
  font-size: 13px;
  font-weight: 700;
  line-height: 20.8px;
  white-space: pre-line;
}

/* 特徴チップ */
.p-job-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-job-chips__item {
  padding: 4px 10px;
  border-radius: var(--jn-radius-pill);
  box-shadow: inset 0 0 0 1px var(--jn-color-navy);
  color: var(--jn-color-navy);
  font-size: 12px;              /* Figma SP は 10px。日本語の最小 12px に揃える（B1 検収 M2） */
  font-weight: 700;
  line-height: 19.2px;
}
/* 募集状況バッジ（一覧に出ない求人だけ先頭に出す。B1 検収 M4）: 特徴チップと同じ形で塗りつぶし */
.p-job-chips__item--status {
  background: var(--jn-color-primary);
  box-shadow: none;
  color: var(--jn-color-white);
}
.p-job-chips.is-collapsed .is-extra { display: none; }
.p-job-chips__more {
  padding: 0;
  border: 0;
  background: none;
  color: var(--jn-color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 19.2px;
  cursor: pointer;
}
.p-job-chips__more:hover { text-decoration: underline; }

/* 画像 */
.p-job-gallery { display: flex; flex-direction: column; gap: 16px; }
.p-job-gallery__main {
  aspect-ratio: 335 / 251;
  background: var(--jn-color-placeholder, #EEE);
  overflow: hidden;
}
.p-job-gallery__main-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 前へ・次へ（JS が足す）。SP のみ、画像の外側左右 20px の余白に #0387A8 の山形（Figma 232:60617: 字形 x5.5 / x360、画像の中心より 8 下）。
   当たり判定 44×44 は画像側へ 24 はみ出す */
.p-job-gallery__nav { display: none; }
@media (max-width: 767px) {
  .p-job-gallery__main { position: relative; overflow: visible; }
  .p-job-gallery__nav {
    position: absolute;
    top: calc(50% - 14px);
    display: flex;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--jn-color-contact);
    cursor: pointer;
  }
  .p-job-gallery__nav--prev { left: -20px; justify-content: flex-start; padding-left: 5px; }
  .p-job-gallery__nav--prev svg { transform: rotate(180deg); }
  .p-job-gallery__nav--next { right: -20px; justify-content: flex-end; padding-right: 6px; }
  .p-job-gallery__nav:focus-visible { outline: 2px solid var(--jn-color-focus); outline-offset: -2px; }
}
.p-job-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.p-job-gallery__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 101 / 75;
  padding: 0;
  border: 0;
  background: var(--jn-color-placeholder, #EEE);
  cursor: pointer;
  overflow: hidden;
}
.p-job-gallery__thumb[aria-pressed="false"] { opacity: 0.6; }
.p-job-gallery__thumb[aria-pressed="true"] { outline: 2px solid var(--jn-color-primary); outline-offset: -2px; }
.p-job-gallery__thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ボタン（SP は応募が上・キープが下） */
.p-job-summary__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
}
.p-job-keep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--jn-color-primary);
  border-radius: var(--jn-radius-pill);
  background: var(--jn-color-white);
  color: var(--jn-color-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 18.2px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.p-job-keep__icon { width: 14px; height: 14px; color: var(--jn-color-keep-star); }

.p-job-apply { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.p-job-apply__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 36px;
  border: 0;
  border-radius: var(--jn-radius-pill);
  background: var(--jn-color-primary);
  color: var(--jn-color-white);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 22.4px;
  cursor: pointer;
  transition: opacity var(--jn-duration-hover, 0.2s);
}
.p-job-apply__btn:not([aria-disabled="true"]):hover { opacity: 0.85; }
.p-job-apply__btn[aria-disabled="true"] {
  background: var(--jn-color-muted-btn);
  cursor: not-allowed;
}
.p-job-apply__icon { width: 18px; height: 18px; flex: none; }
/* 掲載終了の求人のキープ（keep-button.php で disabled）。応募の非活性と同じく押せないことを示す */
.p-job-keep:disabled { opacity: 0.5; cursor: not-allowed; }
.p-job-apply__note {
  margin: 0;
  color: var(--jn-color-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 19.2px;
  text-align: center;
}

/* 募集要項・企業情報 */
.p-job-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 28px;
  border-top: 1px solid var(--jn-color-border);
}
.p-job-section--company { border-top: 0; padding-top: 12px; }
.p-job-section__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 20px;
  color: var(--jn-color-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 25.2px;
  letter-spacing: 0.05em;
}
.p-job-section__icon { width: 20px; height: 20px; flex: none; color: var(--jn-color-primary); }

.p-job-table { margin: 0; }
.p-job-table__row { display: flex; }
.p-job-table__row + .p-job-table__row { margin-top: -1px; }
.p-job-table__label,
.p-job-table__value {
  box-sizing: border-box;
  min-height: 52px;
  margin: 0;
  padding: 15px 20px;
  border: 1px solid var(--jn-color-border);
  color: var(--jn-color-text);
  font-size: 14px;
  line-height: 19.6px;
  overflow-wrap: anywhere;
}
.p-job-table__label {
  flex: 0 0 140px;
  background: #CDE7EE;
  font-weight: 500;
  letter-spacing: 0.05em;
  word-break: normal; line-break: strict; /* base の keep-all だと括弧の前でしか折れない。Figma は列幅いっぱいで折る（pixel-A4 M2） */
}
.p-job-table__value {
  flex: 1 1 auto;
  min-width: 0;
  border-left: 0; /* 左罫線はラベル列の右罫線で兼ねる（値列 740 / SP 235 を Figma どおりに） */
  background: var(--jn-color-white);
  font-weight: 400;
}
.p-job-table__value p { margin: 0; }
.p-job-table__value p + p { margin-top: 1em; }
.p-job-table__value ul,
.p-job-table__value ol { margin: 0; padding-left: 1.4em; }
.p-job-table__link { color: #0387A8; text-decoration: underline; }

/* 12 行の折りたたみ（JS が is-collapsible を付けたときだけ） */
.p-job-table__collapse.is-collapsed {
  max-height: calc(19.6px * 12);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.p-job-collapse-toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--jn-color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 19.2px;
  text-decoration: underline;
  cursor: pointer;
}

/* 下部（SP は画面下の固定バー、応募ボタンだけ） */
.p-job__bottom {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: var(--jn-fixedbar-h);
  padding: 10px;
  background: var(--jn-color-fixedbar-bg); /* Figma はぼかし無し（report-misc#7） */
}
.p-job__bottom .p-job-keep { display: none; }
/* 固定バーの応募ボタンは文字とアイコンの間 24・pad 0/36/0/48（Figma 01-components §3） */
@media (max-width: 767px) {
  .p-job__bottom .p-job-apply__btn { gap: 24px; padding: 0 36px 0 48px; }
}
.p-job__bottom .p-job-apply__note {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--jn-color-white);
}
/* 固定バーの下に隠れる分は body でなくフッターの下余白で取る（body だとフッター下に白帯が出る。pp4 E2 #5）。--jn-bar-pad はバー実寸（page-job-single.js） */
body.single-job .site-footer { padding-bottom: calc(40px + var(--jn-bar-pad, var(--jn-fixedbar-h))); }
/* 上部の応募ボタンが画面内にある間は固定バーを下へ退避（page-job-single.js。B1 検収 M3）。
   display:none にせず寸法を保つので、JS が入れるフッターの下余白（バー実寸）は変わらない */
.p-job__bottom {
  transition: transform var(--jn-duration-hover, 0.2s), visibility var(--jn-duration-hover, 0.2s);
}
.p-job__bottom.is-away {
  visibility: hidden;
  transform: translateY(100%);
}

/* 関連求人 */
.p-job-related {
  margin: 40px 20px 0;
}
.p-job-related__title {
  margin: 0 0 20px;
  color: var(--jn-color-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 25.2px;
}
.p-job-related__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-job-apply__btn:focus-visible,
.p-job-keep:focus-visible,
.p-job-gallery__thumb:focus-visible,
.p-job-chips__more:focus-visible,
.p-job-collapse-toggle:focus-visible {
  outline: 2px solid var(--jn-color-focus);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .p-job { padding: 60px var(--jn-gutter) 80px; }

  .p-job__card {
    max-width: 1120px;
    margin: 0 auto;
    gap: 20px;
    padding-bottom: 40px;
    border-radius: 16px;
    outline: 1px solid var(--jn-color-border);
    outline-offset: -1px;
    overflow: hidden;
  }
  .p-job__band { padding: 16px 40px; }

  .p-job-summary {
    flex-direction: row;
    gap: 28px;
    padding: 0 40px;
  }
  .p-job-summary__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }
  .p-job-summary__head,
  .p-job-summary__features,
  .p-job-summary__catch,
  .p-job-summary__actions { order: 0; }
  .p-job-gallery { flex: 0 0 360px; order: 0; }
  .p-job-gallery__main { aspect-ratio: 4 / 3; }
  .p-job-gallery__thumb { aspect-ratio: 109.33 / 82; }

  .p-job-chips {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .p-job-chips__item {
    padding: 4px 12px 5px;
    font-size: 12px;
    line-height: 19.2px;
  }
  .p-job-summary__catch {
    color: var(--jn-color-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 22.4px;
  }

  .p-job-summary__actions,
  .p-job__bottom {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
  .p-job-summary__actions { display: flex; justify-content: flex-end; margin-top: auto; }
  .p-job-keep {
    width: 115px;
    flex: none;
    font-size: 14px;
    line-height: 19.6px;
  }
  .p-job-keep__icon { width: 16px; height: 16px; }
  .p-job-apply { width: 240px; flex: none; }
  /* 文字は左（pad 36）・送信アイコンは右端の両端寄せ（Figma PC） */
  .p-job-apply__btn { justify-content: space-between; font-size: 18px; line-height: 25.2px; }
  .p-job-apply__icon { width: 24px; height: 24px; }

  .p-job-section {
    margin: 0 40px;
  }
  .p-job-section--company { padding-top: 8px; }
  .p-job-section__title {
    padding: 0;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 1px;
  }
  .p-job-section__icon { width: 24px; height: 24px; }
  .p-job-table__label { flex-basis: 300px; }
  .p-job-table__label, .p-job-table__value { min-height: 53px; } /* 罫線を -1 重ねるので 53 で行ピッチ 52（Figma PC。pixel-A4 M1） */
  .p-job-keep { justify-content: flex-start; } /* Figma PC は星＋文字を左 pad 20 の左寄せ（pixel-A4 M3） */

  .p-job__bottom {
    position: static;
    display: flex;
    justify-content: center;
    min-height: 0;
    margin-top: 8px;            /* カード gap 20＋8＝表下端→ボタン 28（Figma 実測 27） */
    padding: 0 40px;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .p-job__bottom .p-job-keep { display: inline-flex; }
  .p-job__bottom .p-job-apply__note { padding: 0; background: none; }
  body.single-job .site-footer { padding-bottom: 40px; }

  .p-job-related { max-width: 1120px; margin: 60px auto 0; }
  .p-job-related__title { font-size: 20px; line-height: 28px; }
  .p-job-related__list {
    grid-template-columns: repeat(4, minmax(0, 240px));
    justify-content: space-between;
    gap: 20px;
  }
}

/* パンくず: SP は ホーム｜求人検索結果、PC は ホーム｜都道府県｜市区町村｜業種｜求人名（jobnary_breadcrumb_items の only） */
@media (max-width: 767px) {
  .breadcrumb__item--pc-only { display: none; }
}
@media (min-width: 768px) {
  .breadcrumb__item--sp-only { display: none; }
}

/* カード左右のあしらい（ティールの霞。求人一覧 page-job-archive.css の .p-job-archive::before と同じ素材・刻み 980）。
   Figma 232:59328 は 1440 基準で左 x=-105・右 x=1183、最初の霞がページ y=214。.p-job の上端は 122（ヘッダー 88＋パンくず 34）なので top 92
   （描画 renders/232-59328 と重ねて位相を合わせた値。報告の y=91 は枠の上端で、素材の最初の霞は 123 下）。下端は .p-job の下端で止める。
   768〜1199 はカードの左右に余白が無いので出さない。SP は Figma にあしらい無し */
@media (min-width: 1200px) {
  .p-job::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 92px;
    bottom: 0;
    left: 0;
    width: 100%;               /* 1440 固定の箱だと広い画面で箱の端で霞が縦に切れる（先方指摘 TOP⑦ の横展開）。位置は中央基準 */
    background:
      url("../img/deco-kasumi-teal.svg") calc(50% - 657.5px) 0 / 335px 980px repeat-y,
      url("../img/deco-kasumi-teal.svg") calc(50% + 630.5px) 0 / 335px 980px repeat-y;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p-job-apply__btn,
  .p-job__bottom { transition: none; }
}

/* C1 レスポンシブ: SP の項目名（幅 140px）で「日本語のレベ/ル」「企業名（きぎょうめ/い）」と 1〜2 文字だけ落ちるのを防ぐ。
   keep-all は SP だけ（PC 1440 は Figma どおり列幅いっぱいで折る＝上の word-break: normal。pp5 #5） */
@media (max-width: 767px) {
  /* Figma SP: pad 16/20・字間 0.7・左罫線なし（report-single#5・pp4 E2-La）。Figma の枠は外形 92（3 行）で行ピッチ 92。
     罫線 1 を上下に持ち -1 重ねるので、上 16・下 15 でピッチ 92・字の上端を Figma に合わせる */
  .p-job-table__label { word-break: keep-all; padding: 16px 20px 15px; border-left: 0; letter-spacing: 0.7px; }
  .p-job-table__label, .p-job-table__value { line-height: 20px; }
  /* 読みは本体と同じ 14px・inline（Figma）。中は禁則つきの通常折りにして「）」だけ・「ょ」始まりの行を作らない（C1・pp4 レビュー M1） */
  .p-job-table__yomi { display: inline; word-break: normal; line-break: strict; }
}
