/* 4 本柱の一覧と /service/<slug> の本文（scripts/build-service-pages.js が生成する HTML）のスタイル */
.uqx-detail {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 0 96px;
  font-family: var(--s-font-5bbf20af);
  color: #000;
  box-sizing: border-box;
}
.uqx-detail * { box-sizing: border-box; }
.uqx-detail__section { margin: 0 0 104px; }
.uqx-detail__section:last-child { margin-bottom: 0; }
.uqx-detail__head { margin: 0 0 40px; text-align: center; }
.uqx-detail__label {
  margin: 0 0 12px;
  font-family: var(--s-font-35a838dc);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #d6303f;
}
.uqx-detail__heading {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.uqx-detail__lead {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.8;
  text-align: center;
}
.uqx-detail__body {
  margin: 0 auto;
  max-width: 760px;
  font-size: 16px;
  line-height: 2.1;
  letter-spacing: 0.08em;
  text-align: justify;
}
.uqx-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.uqx-card {
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  padding: 32px 28px;
  background: #fff;
}
.uqx-card__image {
  display: block;
  flex: none;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  margin: 0 0 24px;
}
.uqx-card__tag {
  margin: 0 0 12px;
  font-family: var(--s-font-35a838dc);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #2e63da;
}
.uqx-card__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
}
.uqx-card__body {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.06em;
}
.uqx-card__list {
  margin: 0;
  padding: 0 0 0 1.2em;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.06em;
}
.uqx-detail__cta {
  display: flex;
  justify-content: center;
  margin: 32px 0 0;
}
.uqx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 350px;
  max-width: 100%;
  height: 60px;
  border-radius: 30px;
  background: #2e63da;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.uqx-button:hover, .uqx-button:focus-visible { opacity: 0.85; }
.uqx-chevron { display: inline-block; flex: none; width: 8px; height: 8px; margin-left: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
@media screen and (max-width: 1024px) {
  .uqx-detail { padding: 0 0 72px; }
  .uqx-detail__section { margin-bottom: 80px; }
  .uqx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .uqx-detail__heading { font-size: 24px; }
  .uqx-detail__lead { font-size: 20px; }
}
@media screen and (max-width: 640px) {
  .uqx-detail { padding: 0 0 56px; }
  .uqx-detail__section { margin-bottom: 64px; }
  .uqx-detail__head { margin-bottom: 28px; }
  .uqx-detail__heading { font-size: 20px; }
  .uqx-detail__lead { font-size: 17px; }
  .uqx-detail__body { font-size: 14px; }
  .uqx-grid { grid-template-columns: minmax(0, 1fr); }
  .uqx-card { padding: 24px 20px; }
  .uqx-button { width: 320px; height: 48px; font-size: 16px; }
}
/* 見出しブロックのサービス名副題（雛形の「サービス紹介」位置）は長いので狭い画面で少し小さく */
@media screen and (max-width: 640px) {
  main:has(.uqx-detail--page) .sd[data-s-199b401c-7477-40eb-ae77-9d057cdd2054] { font-size: 20px; line-height: 1.5; }
}

/* 一覧（トップ・/service）と、提供中のサービスの見出し */
.uqx-pillars, .uqx-current {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  font-family: var(--s-font-5bbf20af);
  color: #000;
  box-sizing: border-box;
  align-self: center;
  flex: none;
}
.uqx-pillars * , .uqx-current * { box-sizing: border-box; }
.uqx-pillars { margin: 72px auto 96px; }
.uqx-current { margin: 0 auto 8px; }
.uqx-current .uqx-detail__head { margin-bottom: 24px; }
.uqx-current__body { margin: 12px auto 0; max-width: 640px; font-size: 15px; line-height: 1.9; color: #333; }
.uqx-pillars .uqx-detail__body { margin-bottom: 40px; text-align: center; }
.uqx-detail--page { padding-left: 24px; padding-right: 24px; margin-top: 56px; }
.uqx-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* REQ-1030: 4領域のカードは、行をまたいでも同じ高さにそろえる */
.uqx-pillars .uqx-grid { grid-auto-rows: 1fr; }
.uqx-card--link { display: flex; flex-direction: column; }
.uqx-card--link .uqx-card__body { flex: 1 1 auto; margin-bottom: 20px; }
.uqx-card__tag { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.uqx-card__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2e63da;
  text-decoration: none;
}
.uqx-card__more:hover, .uqx-card__more:focus-visible { text-decoration: underline; }

.uqx-status {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #ff4f5d;
  border-radius: 999px;
  font-family: var(--s-font-5bbf20af);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: #d6303f;
  background: #fff;
  white-space: nowrap;
}
/* 詳細ページ: 準備中の注記、用語、進め方、成果物、質問 */
.uqx-notice {
  margin: 0 auto 88px;
  max-width: 760px;
  padding: 20px 24px;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  background: #f3f5fb;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.06em;
}
.uqx-notice .uqx-status { margin-right: 12px; }
.uqx-detail__section > .uqx-detail__body + * { margin-top: 32px; }
.uqx-terms, .uqx-faq { margin: 0 auto; max-width: 760px; }
.uqx-terms__item, .uqx-faq__item { padding: 20px 0; border-bottom: 1px solid #e4e4e4; }
.uqx-terms__item:first-child, .uqx-faq__item:first-child { border-top: 1px solid #e4e4e4; }
.uqx-terms dt, .uqx-faq dt {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.7;
}
.uqx-terms dd, .uqx-faq dd { margin: 0; font-size: 14px; line-height: 2; letter-spacing: 0.06em; }
.uqx-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  counter-reset: uqx-step;
}
.uqx-steps__item {
  counter-increment: uqx-step;
  position: relative;
  padding: 0 0 28px 64px;
}
.uqx-steps__item:last-child { padding-bottom: 0; }
.uqx-steps__item::before {
  content: counter(uqx-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--s-font-35a838dc);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: #2e63da;
}
.uqx-steps__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: 0.08em; line-height: 1.7; }
.uqx-steps__body { margin: 0; font-size: 14px; line-height: 2; letter-spacing: 0.06em; }
.uqx-list {
  margin: 0 auto;
  max-width: 760px;
  padding: 0 0 0 1.4em;
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.06em;
}
.uqx-footnote {
  margin: 72px auto 0;
  max-width: 760px;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: #555;
}
.uqx-back { margin: 40px 0 0; text-align: center; font-size: 14px; letter-spacing: 0.08em; }
.uqx-back a { color: #2e63da; }
@media screen and (max-width: 640px) {
  .uqx-pillars { margin: 48px auto 64px; }
  .uqx-pillars .uqx-detail__body { text-align: left; }
  .uqx-grid--two { grid-template-columns: minmax(0, 1fr); }
  .uqx-notice { margin-bottom: 64px; padding: 16px 18px; }
  .uqx-steps__item { padding-left: 48px; }
  .uqx-steps__item::before { font-size: 18px; }
  .uqx-list { font-size: 14px; }
}
/* Studio の共通リセットが li の行間と行頭記号を消すので、本文の箇条書きだけ戻す */
.uqx-list li { display: list-item; list-style: disc outside; line-height: 2.1; margin: 0; }
/* 柱のページのリード文は、狭い画面では改行位置を固定しない */
@media screen and (max-width: 640px) {
  main:has(.uqx-detail--page) .sd[data-s-b3083fa8-65e4-4eb2-9f61-af98ea98f766] br,
  main:has(.uqx-detail--page) .sd[data-s-9d5c24de-547c-42fa-903f-8f3f0b576ce2] br { display: none; }
}

/* 相談の過程: 図形は補助、説明はHTMLで幅に応じて折り返す */
.uqx-consultation-flow { margin: 32px auto 0; max-width: 952px; }
.uqx-consultation-flow__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; padding: 0; margin: 0; list-style: none; }
.uqx-consultation-flow__steps > li { display: block; position: relative; margin: 0; min-width: 0; }
.uqx-consultation-flow__steps img { display: block; width: 128px; height: 96px; margin: 0 0 24px; }
.uqx-consultation-flow__number { color: #2e63da; }
.uqx-consultation-flow__steps > li:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -30px; width: 12px; height: 12px; border-top: 2px solid #2e63da; border-right: 2px solid #2e63da; transform: rotate(45deg); }
.uqx-consultation-flow figcaption { margin: 32px auto 0; max-width: 760px; font-size: 14px; line-height: 2; letter-spacing: 0.06em; color: #555; }
@media screen and (max-width: 640px) {
  .uqx-consultation-flow__steps { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .uqx-consultation-flow__steps > li:not(:last-child)::after { top: auto; bottom: -32px; left: 58px; right: auto; transform: rotate(135deg); }
}

/* REQ-1036: モバイルでは、サイトの枠（20px前後）の内側にさらに24pxずつ余白を足していて、
   カードや本文が44〜53pxの位置から始まり、幅が画面の約75%になっていた。枠の余白だけにそろえる。 */
@media screen and (max-width: 640px) {
  .uqx-pillars, .uqx-current, .uqx-detail--page { padding-left: 0; padding-right: 0; }
}

/* REQ-1033: サービス詳細のファーストビューに、領域の図を大きく置く。見出し・リード・区切り線の間の余白を詰める。
   （区切り線は図が代わりに区切るので、詳細ページでは隠す。） */
.uqx-hero { margin: 0 auto 48px; max-width: 640px; }
.uqx-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid #e4e4e4; border-radius: 12px; background: #f4f6fb; }
main:has(.uqx-detail--page) section > .sd:has(.sd[data-s-2080af66-12de-47d9-8148-508eb1519574]) { margin-bottom: 56px; }
main:has(.uqx-detail--page) .sd[data-s-b3083fa8-65e4-4eb2-9f61-af98ea98f766],
main:has(.uqx-detail--page) .sd[data-s-9d5c24de-547c-42fa-903f-8f3f0b576ce2] { margin-bottom: 40px; }
main:has(.uqx-detail--page) .sd[data-s-2e53620d-5bae-44d3-9f5c-56318ac0887c] { display: none; }
main:has(.uqx-detail--page) .uqx-detail--page { margin-top: 0; }
@media screen and (max-width: 640px) {
  .uqx-hero { margin-bottom: 32px; }
  main:has(.uqx-detail--page) section > .sd:has(.sd[data-s-2080af66-12de-47d9-8148-508eb1519574]) { margin-bottom: 32px; }
  main:has(.uqx-detail--page) .sd[data-s-b3083fa8-65e4-4eb2-9f61-af98ea98f766],
  main:has(.uqx-detail--page) .sd[data-s-9d5c24de-547c-42fa-903f-8f3f0b576ce2] { margin-bottom: 24px; }
}

/* REQ-1044: ノートPCなど画面が低いと、ヒーローの図の下側が画面の下へはみ出る（1366×768で37px、1280×720で85px）。
   図の上端は約445pxなので、641px以上では、図の幅を「画面の高さ−460px」の16:9に合わせて、ファーストビューに収める。
   小さくなりすぎないよう下限は320px。高さが十分ある画面では、これまでと同じ640px。 */
@media screen and (min-width: 641px) {
  .uqx-hero { max-width: min(640px, max(320px, calc((100vh - 460px) * 16 / 9))); }
}

/* CHG-1043: スマホの相談・領域カードと案内は、枠（--uqx-gutter）の内側のpaddingを詰める（文字を枠の近くから始める） */
@media screen and (max-width: 600px) {
  .uqx-card { padding: 20px 14px; }
  .uqx-notice { padding: 14px; }
}

/* REQ-1061: /service の水平線は不要。RUN区画を外したあと、4領域のカードと「UNIQUEXの考え方を知る」の間に、区切り線が二重に残っていた
   （2e53620d はリード下の線、ffde5f31 は「考え方を知る」の上の線）。/service だけ表示しない。
   サービス詳細・ABOUT・CULTUREの線は、ほかのページと同じ区切りとして残す。 */
main:has(#pillars) .sd[data-s-2e53620d-5bae-44d3-9f5c-56318ac0887c],
main:has(#pillars) .sd[data-s-ffde5f31-1d67-4723-9bf6-e295f4696962] { display: none; }

/* CHG-1217: 実際のプラットフォームの画面（PC とスマートフォン） */
.uqx-screens { display: grid; gap: 40px; margin-top: 28px; }
.uqx-screens__group { margin: 0; }
.uqx-screens__pair { display: flex; align-items: flex-end; gap: 24px; }
.uqx-screens__image { display: block; height: auto; border: 1px solid #ced7e8; border-radius: 12px; background: #fff; }
.uqx-screens__image--pc { flex: 1 1 0; min-width: 0; max-width: 100%; }
.uqx-screens__image--mobile { flex: 0 0 22%; width: 22%; max-width: 220px; border-radius: 24px; }
.uqx-screens__caption { margin-top: 14px; font-size: 14px; line-height: 1.7; color: #333; }
.uqx-screens__caption strong { display: block; font-size: 16px; color: #000; margin-bottom: 2px; }
@media screen and (max-width: 640px) {
  .uqx-screens { gap: 32px; }
  .uqx-screens__pair { flex-direction: column; align-items: stretch; gap: 16px; }
  .uqx-screens__image--mobile { flex: none; width: 56%; max-width: 240px; align-self: center; }
}
