/* ============================================================
   v2.css — layout_v2 系画面のスタイルシート（単一エントリポイント）
   · ランディング (top.erb)
   · 推薦エントリー (/challenge)
   将来: start 等をここに追加
============================================================ */

/* ──────────────────────────────────────────────
   1. CSS 変数
────────────────────────────────────────────── */
:root {
  /* ニュートラル */
  --ink:    #05070a;
  --text:   #23323a;
  --text-secondary: #33383f;
  --muted:  #69717b;
  --paper:  #ffffff;
  --canvas: #f7f7f5;
  --border: rgba(8, 9, 11, 0.12);
  --accent: #2060e6;
  --error:  #c0392b;
  --disabled: #d9d9d9;

  /* セクション背景 */
  --bg-hero:   #dce6ea;
  --bg-footer: var(--ink);

  /* タイポグラフィ
     generic な sans-serif だと Safari の日本語フォールバックが W0〜W9 を持つ
     ヒラギノ角ゴシックになり、太いウェイト指定で Chrome と差が出るため実名で固定する */
  --font: "游ゴシック", YuGothic, "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, sans-serif;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;

  /* レイアウト
     --pad-x: 86px at 1440px (section level horizontal padding)
     --content-w: 1180px  (max inner content width)
     sectionInner の max-width = --content-w + 2*--pad-x = 1352px
     offset from page edge = (1440-1352)/2 + 86 = 44+86 = 130px ✓ */
  --header-h:  70px;
  --pad-x:     clamp(20px, 6vw, 86px);
  --content-w: 1180px;
  --flow-max-w: 1006px;

  /* フロー画面（challenge / start / privacy）共通 */
  --radius-card: 14px;
  --radius-panel: 16px;
  --btn-width: 343px;
  --btn-height: 48px;
  --card-padding: 28px;
  --card-padding-mobile: 20px 18px;
  --space-section: 48px;

  /* 共通 */
  --radius:      12px;
  --radius-cta:  14px;
  --radius-pill: 999px;
}

/* ──────────────────────────────────────────────
   2. ユーティリティ
────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ──────────────────────────────────────────────
   2b. フロー共通コンポーネント（challenge / start / privacy）
────────────────────────────────────────────── */
.flowCard {
  padding: var(--card-padding);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--paper);
}

.flowCard--tall {
  padding: var(--card-padding) var(--card-padding) 26px;
}

.flowCard__title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.4;
}

.flowCard__title--lg {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.5;
}

.flowCard__body {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.75;
}

.flowCard__body--muted {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.flowBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-height);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-card);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  box-sizing: border-box;
}

.flowBtn--primary {
  width: min(var(--btn-width), 100%);
  max-width: var(--btn-width);
  background: var(--disabled);
  color: var(--paper);
}

.flowBtn--primary:disabled {
  border: 1px solid rgba(5, 7, 10, 0.16);
  background: var(--disabled);
  color: var(--paper);
  cursor: not-allowed;
}

.flowBtn--primary:not(:disabled) {
  background: var(--ink);
  border: 0;
}

.flowBtn--secondary {
  width: min(var(--btn-width), 100%);
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
}

.flowBtn--block {
  width: 100%;
  max-width: none;
}

.flowPrivacyLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.4;
}

.flowPrivacyLink svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.flowPrivacyCopy {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.65;
}

.flowCheckbox {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.flowCheckbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--ink);
}

/* カード内のチェック項目（禁止事項リストなど） */
.flowCheckbox--card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  align-items: start;
}

.flowCheckbox--card span {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.flowCheckbox--card strong {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.4;
}

.flowCheckbox--card small {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.75;
}

.flowBadge--required {
  display: inline-grid;
  place-items: center;
  margin-left: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .flowCard {
    padding: var(--card-padding-mobile);
  }
}

/* ──────────────────────────────────────────────
   3. リセット
────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}

body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
  background: var(--paper);
  overflow: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.24; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

/* ──────────────────────────────────────────────
   4. ページスクロールコンテナ
────────────────────────────────────────────── */
.pageScroll {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--paper);
}

.pageScroll > .siteFooter {
  margin-top: auto;
  flex-shrink: 0; /* コンテンツ高で潰され、overflow:hidden により下余白が欠けるのを防ぐ */
}

/* ──────────────────────────────────────────────
   5. 共通: セクション内幅制限
   max-width = --content-w + 2*--pad-x で
   内部パディング込みのコンテナ幅を制限する
────────────────────────────────────────────── */
.sectionInner {
  width: 100%;
  max-width: calc(var(--content-w) + 2 * var(--pad-x));  /* 1352px @ 1440 */
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* セクション見出し（engineer / benefits / faq / flow で共通） */
.sectionHead h2 {
  font-size: clamp(26px, 2.92vw, 42px);
  font-weight: 700;
  line-height: 1.24;
  color: var(--ink);
}

/* ══════════════════════════════════════════════
   SITE HEADER
   computed: height 73px, min-height 70px
   padding 12px 54px, bg rgba(247,247,245,.84)
   justify-content space-between, z-index 30
══════════════════════════════════════════════ */
.siteHeader {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 12px clamp(16px, 3.75vw, 54px);
  background: var(--paper);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

/* ブランド: color var(--ink), fw 900, gap 10px */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  min-width: 0;
}

.brand__logo {
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  overflow: clip;
  flex-shrink: 0;
}

.brand__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.siteHeader__nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.langSwitch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.langSwitch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 36px;
  border: 1px solid #dedede;
  border-radius: 12px;
  background: var(--paper);
  color: #59636b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.langSwitch__link[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.langSwitch__link:focus-visible {
  outline: 3px solid rgba(0, 102, 255, 0.25);
  outline-offset: 2px;
}

.siteHeader__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px 0 24px;
  height: 48px;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 150ms;
}

.siteHeader__cta:hover { opacity: .82; }

/* challenge ヘッダーのステップ表示（siteHeader 上に載せる） */
.siteHeader__step {
  margin: 0;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════ */
main#top {
  width: 100%;
  background: var(--paper);
}

/* ══════════════════════════════════════════════
   HERO SECTION (.hero)
══════════════════════════════════════════════ */
.hero {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  background: var(--bg-hero);
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding:
    clamp(72px, 9svh, 124px)
    clamp(20px, 6.7vw, 96px);
  overflow: hidden;
  text-align: center;
}

.hero__photoPanel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-hero);
}

.hero__photoPanel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(17,18,20,.44) 0%,
      rgba(17,18,20,.18) 42%,
      rgba(17,18,20,.46) 100%),
    repeating-linear-gradient(0deg,
      rgba(17,18,20,.18) 0 1px,
      transparent 1px 4.5px),
    repeating-linear-gradient(90deg,
      rgba(17,18,20,.12) 0 1px,
      transparent 1px 4.5px);
}

.hero__photoPanel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: clamp(14px, 1.5vw, 22px);
  width: 100%;
  max-width: min(1180px, 94%);
  color: var(--paper);
  text-align: center;
}

.hero__title {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: min(1100px, 94%);
  font-size: clamp(32px, 4.44vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  color: var(--paper);
  text-align: center;
}

.hero__title > span {
  display: block;
}

.hero__title > .hero__titleDesktopLine {
  white-space: nowrap;
}

.hero__title > .hero__titleMobileLine {
  display: none;
}

.hero__lead {
  max-width: 680px;
  font-size: 18px;
  font-weight: 400;
  color: var(--paper);
  line-height: 1.75;
  text-align: center;
}

.hero__lead > span {
  display: block;
}

.hero__lead > .hero__leadMobile {
  display: none;
}

.hero__lead > .hero__leadDesktop {
  font-size: clamp(16px, 1.53vw, 22px);
  font-weight: 500;
}

/* ══════════════════════════════════════════════
   ENGINEER SECTION (.engineer)
══════════════════════════════════════════════ */
.engineer {
  position: relative;
  z-index: 4;
  padding: clamp(72px, 8.2vw, 118px) var(--pad-x) clamp(48px, 5vw, 72px);
  background: var(--paper);
  color: var(--ink);
}

.engineer__head { margin-bottom: clamp(28px, 3vw, 42px); }

.engineer__lead {
  max-width: var(--content-w);
  margin: 0;
  padding: 0;
  background: rgba(255,255,255,.82);
  color: var(--text);
}

.engineer__lead h3 {
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 26px;
}

.engineer__lead h3:last-child {
  margin-bottom: 0;
}

.engineer__lead > p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 18px;
}

.engineer__lead > p.engineer__textMuted {
  color: var(--muted);
}

.engineer__lead > p.engineer__roleNote {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
}

.engineerGallery {
  width: 100vw;
  margin-top: clamp(36px, 4vw, 56px);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.engineerGallery__marquee {
  overflow: hidden;
  width: 100%;
  padding: 8px 0 0;
}

.engineerGallery__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.engineerGallery__content {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
}

.engineerGallery__item {
  display: block;
  flex-shrink: 0;
  width: 720px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 60px -52px rgba(18, 18, 18, .16);
  transform: translateZ(0);
}

.engineerGallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.engineerGallery__item:hover img {
  transform: scale(1.045);
}

/* ══════════════════════════════════════════════
   BENEFITS SECTION (.benefits)
══════════════════════════════════════════════ */
.benefits {
  position: relative;
  z-index: 4;
  padding: clamp(72px, 9vw, 130px) 0 clamp(72px, 7.8vw, 112px);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.benefits__head { margin-bottom: clamp(54px, 6vw, 86px); }

.benefits__inner.sectionInner {
  padding: 0;
  max-width: var(--content-w);
}

.benefits__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.9vw, 28px);
  margin-bottom: clamp(32px, 3.2vw, 46px);
}

.benefits__panel {
  display: grid;
  gap: 14px;
  padding: 32px;
  border: 1px solid rgba(5,7,10,.08);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--text);
}

.benefits__panelTitle {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 340px;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  white-space: normal;
}

.benefits__panelText {
  display: block;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.benefits__photo {
  display: block;
  max-width: var(--content-w);
  margin: clamp(24px, 3.2vw, 46px) auto 0;
  border: 1px solid rgba(5,7,10,.1);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--canvas);
}

.benefits__photo img {
  display: block;
  width: 100%;
  height: clamp(240px, 35.8vw, 516px);
  object-fit: cover;
}

/* ══════════════════════════════════════════════
   FAQ SECTION (.faq)
══════════════════════════════════════════════ */
.faq {
  position: relative;
  z-index: 4;
  padding: clamp(64px, 7.2vw, 104px) var(--pad-x);
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
}

.faq__inner { display: grid; gap: clamp(28px, 4vw, 48px); }

.faq__grid {
  display: grid;
  gap: clamp(10px, 1.5vw, 18px);
}

.faq__item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  align-items: start;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}

.faq__number {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.faq__copy { display: grid; gap: 10px; }

.faq__label {
  display: block;
  margin-bottom: 14px;
  font-size: clamp(16px, 1.74vw, 25px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}

.faq__copy > p:not(.faq__label) {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink);
}

.faq__detailLine {
  display: inline;
  font-size: 18px;
  line-height: 1.75;
}

/* ══════════════════════════════════════════════
   FLOW SECTION (.flow)
══════════════════════════════════════════════ */
.flow {
  position: relative;
  z-index: 4;
  padding: clamp(72px, 8.5vw, 122px) 0 clamp(64px, 6.7vw, 96px);
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

.flow__head { margin-bottom: clamp(24px, 2.9vw, 42px); }

.flow__list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2.4vw, 34px);
  max-width: 1240px;
  margin-top: clamp(24px, 2.9vw, 42px);
}

.flow__item {
  position: relative;
  display: grid;
  gap: 22px;
  min-height: 260px;
  padding: 36px 34px;
  border: 1px solid rgba(5,7,10,.09);
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
  color: var(--ink);
}

.flow__content { display: block; }

.flow__content h3 {
  display: grid;
  gap: 12px 9px;
  align-items: start;
  font-size: clamp(20px, 1.9vw, 26px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.flow__number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.flow__content > p {
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

/* 横並びのカードは見出しの行数が言語で変わるため、subgrid で本文の開始位置を揃える。
   subgrid では行間がカード同士の間隔も兼ねるので、1カラムになる 640px 以下は元の間隔に戻す */
@media (min-width: 641px) {
  @supports (grid-template-rows: subgrid) {
    .benefits__inner {
      grid-template-rows: auto auto;
      row-gap: 14px;
    }

    .benefits__panel {
      grid-row: span 2;
      grid-template-rows: subgrid;
      align-items: start;
    }

    .flow__list {
      grid-template-rows: auto auto;
      row-gap: 22px;
    }

    .flow__item,
    .flow__content {
      grid-row: span 2;
      grid-template-rows: subgrid;
      align-items: start;
      align-content: start;
    }

    .flow__content { display: grid; }
    .flow__content h3 { align-content: start; }
    .flow__content > p { margin-top: 0; }
  }
}

/* ══════════════════════════════════════════════
   ENTRY SECTION (.entry)
══════════════════════════════════════════════ */
.entry {
  position: relative;
  z-index: 4;
  overflow: hidden;
  min-height: clamp(620px, 82svh, 860px);
  padding: clamp(80px, 9.7vw, 140px) 0 clamp(72px, 8.9vw, 128px);
  background:
    url("/images/illustrations/teamlab-office-entry-requested.webp")
    center center / cover no-repeat;
  color: var(--paper);
}

.entry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.24;
  background-color: rgba(0, 0, 0, 0.52);
  background-image:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.34) 42%,
      rgba(0, 0, 0, 0.54) 100%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.38) 0px,
      rgba(0, 0, 0, 0.38) 2.4px,
      rgba(0, 0, 0, 0) 2.4px,
      rgba(0, 0, 0, 0) 5px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.28) 0px,
      rgba(0, 0, 0, 0.28) 2.4px,
      rgba(0, 0, 0, 0) 2.4px,
      rgba(0, 0, 0, 0) 5px
    );
}

.entry__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  min-height: clamp(520px, 68svh, 760px);
  max-width: var(--content-w);
  margin: 0 auto;
  text-align: center;
}

.entry__headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--paper);
  text-align: center;
}

.entry__label {
  display: block;
  font-size: clamp(36px, 5.28vw, 76px);
  font-weight: 700;
  line-height: .95;
  color: var(--paper);
  letter-spacing: .01em;
  white-space: nowrap;
}

.entry__note {
  display: block;
  max-width: 720px;
  font-size: clamp(16px, 1.94vw, 28px);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(255,255,255,.98);
}

.entry__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 34px;
  min-width: clamp(200px, 23.6vw, 340px);
  min-height: 58px;
  margin-top: 28px;
  border: 1px solid rgba(5,7,10,.12);
  border-radius: var(--radius-cta);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

#entry .entry__cta {
  position: relative;
  z-index: 0;
  align-self: center;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transition: transform 180ms ease;
}

#entry .entry__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid var(--border);
  background: var(--paper);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transform-origin: center center;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

#entry .entry__cta:hover,
#entry .entry__cta:focus-visible {
  transform: translate3d(0, -3px, 0);
  color: var(--ink);
}

#entry .entry__cta:hover::before,
#entry .entry__cta:focus-visible::before {
  transform: scale(1.02);
  background: var(--paper);
  border-color: rgba(5, 7, 10, 0.18);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

#entry .entry__cta:active {
  transform: translate3d(0, -1px, 0);
}

#entry .entry__cta:active::before {
  transform: scale(1.01);
}

/* ══════════════════════════════════════════════
   SITE FOOTER (.siteFooter)
══════════════════════════════════════════════ */
.siteFooter {
  position: relative;
  padding: clamp(20px, 3vw, 40px) 0;
  overflow: hidden;
  background: var(--bg-footer);
  color: rgba(247,247,245,.7);
  font-size: 14px;
}

.siteFooter__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(64px, 335px) 1fr;
  align-items: center;
  column-gap: clamp(40px, 8vw, 115px);
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(20px, 8vw, 115px);
}

.siteFooter__logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.siteFooter__links {
  display: grid;
  grid-template-columns: clamp(160px, 16vw, 230px) clamp(230px, 22.9vw, 330px);
  column-gap: clamp(40px, 7vw, 101px);
  justify-content: end;
}

.siteFooter__link {
  position: relative;
  display: grid;
  gap: 9px;
  padding-left: 18px;
  border-left: 1px solid rgba(173, 195, 206, 0.28);
  text-decoration: none;
}

.siteFooter__link::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 2px;
  width: 3px;
  height: 18px;
  background: rgb(127, 219, 255);
}

.siteFooter__linkLabel {
  font-size: 11px;
  font-weight: 700;
  color: var(--paper);
}

.siteFooter__linkText {
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 700;
  color: var(--paper);
  transition: opacity 150ms;
}

.siteFooter__link:hover .siteFooter__linkText { opacity: 0.85; }

/* ══════════════════════════════════════════════
   MODAL (entryModal / .entryModal)
   オリジナル effective styles に準拠
══════════════════════════════════════════════ */
.entryModal {
  --entry-modal-action-x: clamp(34px, 4.5vw, 56px);
  --entry-modal-action-y: clamp(34px, 4.5vw, 56px);
  --entry-modal-next-width: min(240px, 100%);
  --entry-modal-next-height: 58px;
  --entry-modal-readable-ink: #101820;
  --entry-modal-readable-body: #20374d;
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.entryModal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  line-height: 1;
  cursor: pointer;
  transition: background 150ms, box-shadow 150ms, transform 120ms;
  transform: none;
}

.entryModal__btn--secondary {
  padding: 0 24px;
  min-width: 118px;
  min-height: 48px;
  border: 1px solid rgba(5, 7, 10, 0.14);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
}

.entryModal__btn--secondary:hover {
  background: rgba(5, 7, 10, 0.04);
}

.entryModal__btn--primary {
  padding: 0 34px;
  min-height: var(--entry-modal-next-height);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}

.entryModal.is-open { display: flex; }

/* display 指定が [hidden] より強くなるのを防ぐ */
.entryModal [hidden] {
  display: none !important;
}

.entryModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.entryModal__panel {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100vw - 24px));
  max-height: min(876px, calc(100svh - 32px));
  overflow-y: auto;
  border: 1px solid rgba(5, 7, 10, 0.14);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(5, 7, 10, 0.22);
}

.entryModal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.entryModal__kicker {
  display: inline-grid;
  width: max-content;
  min-height: 28px;
  margin: 0;
  padding: 0 12px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f5f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: normal;
}


/* フォーム / 確認 / 完了: フルサイズパネル */
.entryModal--step-form .entryModal__panel,
.entryModal--step-confirm .entryModal__panel,
.entryModal--step-complete .entryModal__panel {
  width: min(1040px, calc(100vw - 24px));
  height: min(760px, calc(100svh - 24px));
  max-height: none;
  overflow: hidden;
  padding: 0;
}

/* フォーム / 確認 / 完了: 白背景のフラットパネル（グラデーションなし） */
.entryModal__formScreen,
.entryModal__confirmScreen,
.entryModal__completeScreen {
  background: var(--paper);
  color: var(--ink);
}

.entryModal__heading h2 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.14;
  font-size: clamp(18px, 1.9vw, 28px);
  margin-bottom: 10px;
}

.entryModal__completeCopy h2 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.16;
}

.entryModal__formScreen .entryModal__heading,
.entryModal__confirmScreen .entryModal__heading {
  margin-bottom: clamp(18px, 2.6vw, 26px);
}

.entryModal__formScreen .entryModal__heading h2,
.entryModal__confirmScreen .entryModal__heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.14;
}

.entryModal__formScreen .entryModal__kicker,
.entryModal__confirmScreen .entryModal__kicker {
  min-height: 34px;
  padding: 0 15px;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 700;
}

.entryModal__heading p {
  font-size: 14px;
  line-height: 1.8;
  color: #555555;
}

.entryModal__kicker {
  margin-bottom: 8px;
}

.entryModal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* フォーム画面 */
.entryModal__formScreen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
  min-height: 0;
  height: 100%;
  padding: clamp(34px, 4.6vw, 58px);
  overflow: hidden;
}

.entryModal__formScreen form {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(16px, 2vw, 22px);
  margin: 0;
  overflow: hidden;
}

.entryModal__formScreen .entryModal__formLayout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
  align-content: start;
  align-items: stretch;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.entryModal__formScreen .entryModal__field {
  align-content: start;
  min-height: 208px;
  padding: clamp(12px, 1.35vw, 16px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: none;
}

.entryModal__formScreen .entryModal__field > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(13px, 1vw, 14px);
  font-weight: 700;
  color: var(--ink);
}

.entryModal__formScreen .entryModal__required,
.entryModal__formScreen .flowBadge--required {
  /* pill 見た目は .flowBadge--required に集約。formScreen では赤文字ベースを打ち消す */
  color: var(--ink);
  font-weight: 700;
  margin-left: 0;
}

.entryModal__formScreen .entryModal__field > p:not(.entryModal__fieldError) {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.46;
}

.entryModal__field {
  display: grid;
  gap: 8px;
}

.entryModal__field label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(5, 7, 10, 0.78);
}

.entryModal__required {
  font-size: 11px;
  font-weight: 700;
  color: var(--error);
  margin-left: 4px;
}

.entryModal__field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 150ms;
}

.entryModal__field input:focus { outline-color: rgba(5, 7, 10, 0.3); }

.entryModal__field > p {
  margin: 0;
  font-size: 12px;
  color: #555555;
  line-height: 1.6;
}

.entryModal__formScreen .entryModal__field > .entryModal__fieldError,
.entryModal__field > .entryModal__fieldError {
  margin: 0;
  font-size: 12px;
  color: var(--error);
  line-height: 1.6;
}

.entryModal__error { font-size: 13px; color: var(--error); min-height: 20px; }

.entryModal__submit {
  justify-self: end;
  align-self: end;
  width: var(--entry-modal-next-width);
  min-width: var(--entry-modal-next-width);
  min-height: var(--entry-modal-next-height);
  margin: 0;
  border-radius: 8px;
}

/* 確認画面 */
.entryModal__confirmScreen {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(16px, 2vw, 24px);
  min-height: 0;
  height: 100%;
  padding: clamp(30px, 4vw, 54px);
  overflow: hidden;
}


.entryModal__confirmScreen .entryModal__noticeStep {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
}

.entryModal__confirmScreen .entryModal__noticeCopy {
  display: block;
  min-height: 0;
  overflow: visible;
}

/* 注意事項: 最終 effective style は 1 カラム縦並び（styles.css 20512 行付近） */
.entryModal__confirmScreen .entryModal__checkList {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(10px, 1.35vw, 14px);
  align-content: start;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0 8px 24px 0;
  overflow: visible;
  list-style: none;
}

.entryModal__checkList li {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.entryModal__readItem {
  display: grid;
  gap: 8px;
  height: 100%;
  min-height: 96px;
  padding: clamp(13px, 1.5vw, 16px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: none;
}

.entryModal__readItem strong {
  color: var(--ink);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 700;
  line-height: 1.42;
}

.entryModal__readItem small {
  color: #555555;
  font-size: clamp(12px, 0.92vw, 13px);
  font-weight: 500;
  line-height: 1.55;
}

.entryModal__confirmItem {
  grid-column: 1 / -1;
  background: transparent;
}

/* 同意チェック行: カード枠なし・チェックボックスとテキストを横並び */
.entryModal__confirmScreen .entryModal__pageConfirmCheck {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.entryModal__confirmScreen .entryModal__pageConfirmCheck input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  accent-color: #003a6c;
  cursor: pointer;
}

.entryModal__confirmScreen .entryModal__pageConfirmCheck span {
  display: grid;
  gap: 4px;
}

.entryModal__confirmScreen .entryModal__pageConfirmCheck strong {
  display: block;
  color: var(--ink);
  font-size: clamp(14px, 1.05vw, 15px);
  font-weight: 700;
  line-height: 1.42;
}

.entryModal__confirmScreen .entryModal__pageConfirmCheck small {
  display: block;
  font-size: clamp(12px, 0.92vw, 13px);
  line-height: 1.55;
  color: var(--ink);
}

.entryModal__privacyBlock {
  display: grid;
  gap: 8px;
  padding: 4px 0 8px;
}

.entryModal__privacyLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.entryModal__privacyLink svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.entryModal__privacyCopy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.entryModal__groupCheck {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  min-height: 112px;
  padding: clamp(13px, 1.6vw, 18px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--paper);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.entryModal__groupCheck strong {
  display: block;
  color: var(--ink);
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 700;
  line-height: 1.42;
}

.entryModal__groupCheck small {
  display: block;
  font-size: clamp(12px, 0.95vw, 13px);
  line-height: 1.55;
  color: #555555;
}

.entryModal__confirmScreen .entryModal__actions {
  align-self: end;
  width: 100%;
  margin: 0;
  padding-top: 4px;
}

.entryModal__confirmScreen .entryModal__actions .entryModal__btn {
  min-height: var(--entry-modal-next-height);
  min-width: min(170px, 100%);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  transform: none;
}

/* モーダル内プライマリボタン: 有効=黒、無効=グレー */
.entryModal__btn--primary:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  background-image: none;
  color: var(--paper);
  box-shadow: none;
}

.entryModal__btn--primary:disabled {
  border-color: rgba(5, 7, 10, 0.14);
  background: var(--disabled);
  background-image: none;
  color: var(--paper);
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

.entryModal__btn--primary:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
  transform: none;
  box-shadow: none;
}

/* 完了画面 */
.entryModal__completeScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  min-height: min(720px, calc(100svh - 36px));
  height: 100%;
  padding: clamp(36px, 6vw, 72px);
  text-align: center;
}

.entryModal__completeCopy {
  display: grid;
  gap: 22px;
  width: min(100%, 760px);
  max-width: 760px;
  justify-items: center;
  text-align: center;
}

.entryModal__completeScreen .entryModal__completeCopy h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0;
}

.entryModal #complete-message {
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #555555;
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 700;
  line-height: 1.45;
}

.entryModal__completeActions {
  width: auto;
  justify-content: center;
}

.entryModal__completeActions .entryModal__btn--secondary {
  min-width: 120px;
}

@media (max-width: 767px) {
  .entryModal__completeScreen {
    gap: 28px;
    min-height: min(620px, calc(100svh - 24px));
    padding: 28px 22px;
  }

  .entryModal__completeCopy {
    gap: 16px;
    width: 100%;
  }

  .entryModal__completeScreen .entryModal__completeCopy h2 {
    font-size: clamp(28px, 8.6vw, 38px);
    line-height: 1.18;
  }

  .entryModal #complete-message {
    font-size: clamp(15px, 4.8vw, 19px);
    line-height: 1.5;
  }
}

/* ══════════════════════════════════════════════
   JS アニメーションフック (v2.js が付与するクラス)
══════════════════════════════════════════════ */
.entryModal.is-closing { pointer-events: none; }
.entryModal.is-closed  { display: none; }

.entryModal__field.is-invalid input {
  outline-color: rgba(192,57,43,.5);
  border-color: rgba(192,57,43,.4);
}

/* ══════════════════════════════════════════════
   RESPONSIVE — タブレット (≤ 900px)
══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .flow__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .entryModal__formScreen .entryModal__formLayout,
  .entryModal__confirmScreen .entryModal__checkList {
    grid-template-columns: 1fr;
  }

  .entryModal__formScreen .entryModal__field {
    min-height: 0;
  }
}

/* ══════════════════════════════════════════════
   RESPONSIVE — モバイル (≤ 640px)
══════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --pad-x: 20px; }

  /* ヘッダー */
  .siteHeader .brand__title { display: none; }

  /* ヒーロー: モバイル用テキストに切替 */
  .hero__title > .hero__titleDesktopLine { display: none; }
  .hero__title > .hero__titleMobileLine  { display: block; }
  .hero__lead > .hero__leadDesktop { display: none; }
  .hero__lead > .hero__leadMobile  { display: block; }

  .hero__title { font-size: clamp(28px, 8.5vw, 38px); }

  /* ギャラリー */
  .engineerGallery__item { width: min(500px, 85vw); border-radius: 22px; }

  /* ベネフィット */
  .benefits__inner {
    grid-template-columns: 1fr;
  }

  /* フロー */
  .flow__list {
    grid-template-columns: 1fr;
  }

  /* エントリー */
  .entry__label {
    font-size: clamp(28px, 8vw, 44px);
    white-space: normal;
  }

  .siteFooter__links { gap: 16px; }
  .siteFooter__link { padding-left: 10px; }

  /* モーダル */
  .entryModal--step-form .entryModal__panel,
  .entryModal--step-confirm .entryModal__panel,
  .entryModal--step-complete .entryModal__panel {
    width: calc(100vw - 24px);
    height: calc(100svh - 24px);
  }

  .entryModal__formScreen,
  .entryModal__confirmScreen {
    padding: 28px 18px;
  }

  .entryModal__formScreen .entryModal__formLayout,
  .entryModal__confirmScreen .entryModal__checkList {
    grid-template-columns: 1fr;
  }

  .entryModal__formScreen .entryModal__field {
    min-height: 0;
  }

  .entryModal__confirmScreen .entryModal__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* ──────────────────────────────────────────────
   Challenge (/challenge) — enter.erb
────────────────────────────────────────────── */
.challengePage {
  display: contents;
}

.challengePage.is-complete .challengeMain {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: clamp(96px, 18vh, 176px) 24px clamp(96px, 14vh, 144px);
}

/* Main — challenge / start / privacy 共通枠 */
.flowMain {
  flex: 1 1 auto;
  width: min(1720px, calc(100% - 72px));
  margin: 0 auto;
  padding: var(--space-section) 0 96px;
}

@media (min-width: 641px) {
  .flowMain {
    width: min(var(--flow-max-w), calc(100% - 96px));
  }
}

@media (max-width: 640px) {
  .flowMain {
    width: calc(100% - 32px);
    padding: 32px 0 72px;
  }
}

.challengeStep {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.challengeStep[hidden] {
  display: none !important;
}

/* フラットレイアウト: hero / panel を display:contents にして縦積みする */
.challengeStep[data-challenge-step="entry"] .challengeHero,
.challengeStep[data-challenge-step="entry"] .challengePanel,
.challengeStep[data-challenge-step="notice"] .challengeHero,
.challengeStep[data-challenge-step="notice"] .challengePanel,
.challengeStep[data-challenge-step="prohibited"] .challengeHero,
.challengeStep[data-challenge-step="prohibited"] .challengePanel {
  display: contents;
}

.challengeStep[data-challenge-step="entry"] .challengeForm {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.challengeHero h1 {
  margin-left: 0;
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.challengeStep[data-challenge-step="entry"] h1,
.challengeStep[data-challenge-step="prohibited"] h1 {
  display: inline-block;
  width: max-content;
}

.challengeStep[data-challenge-step="notice"] h1 {
  display: block;
  width: 100%;
  line-height: 1.25;
}

.challengeStep[data-challenge-step="prohibited"] h1 {
  line-height: 40px;
}

.challengePanel {
  padding: clamp(26px, 2.5vw, 34px) clamp(26px, 3vw, 42px) clamp(28px, 2.8vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--paper);
}

/* Step 2: 注意事項 — レイアウト modifier のみ */
.challengeStep[data-challenge-step="notice"] .challengeNoticeList {
  gap: 24px;
  width: 100%;
}

.challengeStep[data-challenge-step="notice"] .challengeConsentRow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  width: 100%;
  margin-top: 0;
}

.challengeStep[data-challenge-step="notice"] .flowCheckbox {
  align-items: center;
  gap: 32px;
  width: 100%;
}

.challengeStep[data-challenge-step="notice"] .challengeActions--notice {
  flex-direction: column-reverse;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-top: 0;
  padding: 0 clamp(26px, 6vw, 76.8px);
}

/* Step 3: 禁止事項 — レイアウト modifier のみ */
.challengeStep[data-challenge-step="prohibited"] .challengeProhibitedList {
  gap: 24px;
  width: 100%;
}

.challengeStep[data-challenge-step="prohibited"] .challengeProhibitedConsents {
  display: grid;
  gap: 16px;
  width: 100%;
  margin-top: 8px;
}

.challengeStep[data-challenge-step="prohibited"] .challengeProhibitedConsents .flowCheckbox {
  align-items: center;
  width: 100%;
}

.challengeStep[data-challenge-step="prohibited"] .challengeActions {
  flex-direction: column-reverse;
  align-items: center;
  gap: 18px;
  width: fit-content;
  max-width: 100%;
  margin: 21px auto 0;
}

/* notice / prohibited 共通 CTA 幅 */
.challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--primary,
.challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--secondary,
.challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--primary,
.challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--secondary {
  width: min(var(--btn-width), 100%);
  max-width: var(--btn-width);
  min-width: 0;
  height: var(--btn-height);
  flex-shrink: 0;
}

.challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--primary,
.challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--secondary {
  width: var(--btn-width);
}

/* Form */
.challengeForm {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.challengeForm__grid,
.challengeNoticeList,
.challengeProhibitedList {
  display: grid;
  gap: 24px;
}

.challengeNoticeList {
  gap: 18px;
}

.challengeForm__card {
  display: grid;
  gap: 0;
}

.challengeForm__card label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: 16px;
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.challengeForm__card input {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 1px solid rgba(8, 9, 11, 0.14);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
}

.challengeForm__card input::placeholder {
  color: rgba(8, 9, 11, 0.36);
}

.challengeForm__card input.is-invalid {
  border-color: var(--error);
}

.challengeForm__card p:not(.challengeForm__fieldError) {
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.75;
}

.challengeForm__card .challengeForm__fieldError {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.challengeForm__error {
  min-height: 0;
  margin: 12px 0 0;
  color: var(--error);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.challengeForm__error:empty {
  display: none;
  margin: 0;
}

/* Notice / prohibited — privacy 余白は親コンテキストで調整 */
.challengePanel .flowPrivacyLink {
  width: fit-content;
  margin-top: 24px;
  gap: 12px;
  line-height: 1;
}

.challengePanel .flowPrivacyCopy {
  margin: 0 0 24px;
  font-weight: 600;
  line-height: 1;
}

.challengeConsentRow {
  margin-top: 34px;
}

/* Actions */
.challengeActions {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 32px;
}

.challengeActions--single {
  flex-direction: row;
  width: fit-content;
  max-width: 100%;
  margin: 21px auto 0;
}

.challengeStep[data-challenge-step="entry"] .challengeActions--single {
  align-self: center;
}

.challengeActions--single .flowBtn--primary {
  width: var(--btn-width);
  max-width: var(--btn-width);
  min-width: var(--btn-width);
  height: var(--btn-height);
  flex-shrink: 0;
}

/* Complete — 見た目は result / errors と共通の notice 系に寄せる */
.challengeStep--complete {
  min-height: 60vh;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1080px) {
  .challengeMain {
    width: min(100% - 32px, 1720px);
  }
}

@media (max-width: 640px) {
  .challengeStep[data-challenge-step="entry"] h1 {
    margin-left: 0;
  }

  .challengeStep[data-challenge-step="entry"] .challengeForm__card {
    padding: 0 18px;
  }

  .challengeStep[data-challenge-step="entry"] .challengeForm__card input {
    padding-inline: 22px;
    border-radius: var(--radius-card);
  }

  .challengeActions--single {
    width: 100%;
    margin: 21px 0 0;
  }

  .challengeActions--single .flowBtn--primary {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .challengeStep[data-challenge-step="notice"] .challengePanel {
    display: block;
    padding: 0 26px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .challengeStep[data-challenge-step="notice"] .challengeNoticeList {
    gap: 12px;
  }

  .challengeStep[data-challenge-step="notice"] .flowCheckbox {
    gap: 14px;
  }

  .challengeStep[data-challenge-step="notice"] .challengeActions--notice {
    padding: 0;
    width: 100%;
  }

  .challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--primary,
  .challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--secondary,
  .challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--primary,
  .challengeStep[data-challenge-step="prohibited"] .challengeActions .flowBtn--secondary {
    width: min(var(--btn-width), 100%);
    max-width: var(--btn-width);
  }

  .challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--primary,
  .challengeStep[data-challenge-step="notice"] .challengeActions--notice .flowBtn--secondary {
    width: 100%;
    max-width: none;
  }

  .challengePanel .flowPrivacyLink svg {
    width: 16px;
    height: 16px;
  }

  .challengeStep[data-challenge-step="prohibited"] .challengeProhibitedConsents .flowCheckbox {
    gap: 14px;
  }

  .challengeStep[data-challenge-step="prohibited"] .flowCheckbox--card {
    gap: 12px;
  }

  .challengeStep[data-challenge-step="prohibited"] .challengeActions {
    width: fit-content;
    max-width: 100%;
    margin: 32px auto 0;
  }

}

/* ──────────────────────────────────────────────
   Start (/start) — start.erb
────────────────────────────────────────────── */
.startIntro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.startIntro__lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.75;
}

.startSection {
  margin-top: var(--space-section);
}

.startSection h2 {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
}

.startCardList {
  display: grid;
  gap: 16px;
}

.startConsent {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-section);
}

.startConsent .flowPrivacyLink {
  align-self: flex-start;
}

.startConsent .flowPrivacyCopy {
  align-self: stretch;
  margin: 12px 0 24px;
}

.startConsent .flowCheckbox {
  width: 100%;
}

#start-page .single__text--term,
#start-page .single__checkbox--term {
  display: none;
}

.startActions {
  width: min(var(--btn-width), 100%);
  margin-top: 24px;
}

#form-start {
  width: 100%;
  margin-top: 0;
}

@media (max-width: 640px) {
  .startSection {
    margin-top: 40px;
  }

  .startConsent {
    margin-top: 40px;
  }
}

/* ──────────────────────────────────────────────
   Privacy (/agreement_term) — agreement_term.erb
────────────────────────────────────────────── */
.privacyTitle {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 2.7vw, 2.25rem);
  font-weight: 700;
  line-height: 1.08;
}

.privacyLead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.72;
}

.privacySection {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.privacyList {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
  list-style: disc;
}

.privacyList--plain {
  list-style: none;
  padding-left: 0;
}

.privacyList li + li {
  margin-top: 4px;
}

.privacyNote {
  font-size: var(--text-sm);
}

/* ──────────────────────────────────────────────
   Notice — result.erb / errors/*.erb
   課題終了・エラー系の 1 枚もの画面で共通利用する
────────────────────────────────────────────── */
.noticeMain {
  display: flex;
  align-items: center;
  justify-content: center;
}

.noticePanel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 720px);
  text-align: center;
}

.noticeTitle {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.noticeText {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.8;
}

/* 入力されたトークンをそのまま出すため、長い文字列でも折り返す */
.noticeToken {
  margin: 20px 0 0;
  color: var(--ink);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.noticeScore {
  margin: 32px 0 0;
  padding: 20px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--canvas);
  color: var(--ink);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
}

.noticePanel .flowBtn {
  margin-top: 32px;
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .engineerGallery__item img { transition: none; }
  .pageScroll { scroll-behavior: auto; }
}
