:root {
  --qm-bg: rgba(255, 255, 255, .92);
}

.qm-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.qm-step-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 30px 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.qm-step-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(51,49,46,.08);
  border-color: rgba(240,138,36,.35);
}
.qm-step-num {
  font-family: var(--en);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.qm-step-num::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--orange);
}
.qm-step-card h3 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 23px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 14px;
}
.qm-step-card p {
  font-size: 14px;
  line-height: 1.95;
  color: var(--ink-sub);
}

.qm-sample-note {
  margin-top: -12px;
  margin-bottom: 24px;
  color: var(--ink-sub);
  font-size: 13px;
  line-height: 1.8;
}
.qm-after-note { margin: 26px 0 0; }

.qm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.qm-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.qm-chip:hover,
.qm-chip.is-active {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(240,138,36,.08);
}
.qm-chip:focus-visible {
  outline: 3px solid rgba(240,138,36,.4);
  outline-offset: 4px;
}

.qm-filter-meta {
  margin-bottom: 28px;
}
.qm-count {
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink);
}

.qm-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.expert-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 30px 32px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.expert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(51,49,46,.08);
  border-color: rgba(240,138,36,.35);
}
/* 一覧の写真は詳細ページと同じ .ex-photo を使う（見え方を1箇所で管理） */
.expert-photo-col {
  display: grid;
  gap: 12px;
  width: 190px;
}
.expert-photo-col .ex-photo.is-letter { font-size: 54px; }
.expert-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.expert-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
}
.expert-name {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 5px;
}
.expert-cred {
  font-size: 13.5px;
  color: var(--ink-sub);
  line-height: 1.7;
}
.expert-action {
  flex: none;
  white-space: nowrap;
}
.expert-facts {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.expert-facts .fact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
}
.expert-facts dt {
  flex: none;
  width: 5.5em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dp);
  letter-spacing: .04em;
}
.expert-facts dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.8;
}
.expert-summary {
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-sub);
  max-width: 78ch;
  /* 詳細ページ冒頭をそのまま流し込み、3行で尻切れにする */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.expert-foot {
  display: grid;
  gap: 10px;
}
.expert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.expert-tag {
  font-size: 12px;
  background: var(--sand);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.expert-sub {
  font-size: 12px;
  color: var(--ink-sub);
  line-height: 1.8;
}

.qm-dark-band {
  background: var(--ink);
  color: #fff;
  padding: clamp(56px, 6vw, 84px) var(--gutter);
}
.qm-dark-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.qm-dark-panel .section-head {
  margin-bottom: 0;
}
.qm-dark-panel .section-label {
  color: #fff;
}
.qm-dark-panel h2 {
  color: #fff;
}
.qm-dark-panel p {
  color: rgba(255,255,255,.78);
  max-width: 44em;
}
.qm-dark-actions .btn {
  justify-content: center;
}
.qm-dark-actions .btn.btn-primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.qm-dark-actions .btn.btn-primary:hover {
  background: var(--sand);
  border-color: var(--sand);
}

.qm-supply-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.qm-supply-inner h2 {
  margin-top: 6px;
}
.qm-supply-inner p {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-sub);
  max-width: 42em;
}
.qm-supply-actions {
  display: flex;
  justify-content: flex-end;
}

.btn:focus-visible,
.qm-chip:focus-visible,
.qm-supply-actions a:focus-visible {
  outline: 3px solid rgba(240,138,36,.35);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .expert-card {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 22px;
  }
  .expert-photo-col {
    width: 150px;
  }
  .expert-photo-col .ex-photo.is-letter { font-size: 44px; }
  .qm-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .expert-card {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 24px 22px;
    gap: 18px;
  }
  .expert-photo-col {
    width: 120px;
  }
  .expert-photo-col .ex-photo.is-letter { font-size: 36px; }
  .expert-name {
    font-size: 21px;
  }
  .expert-action {
    width: 100%;
    justify-content: center;
  }
  .qm-step-grid,
  .qm-supply-inner,
  .qm-dark-panel {
    grid-template-columns: 1fr;
  }
  .qm-supply-actions {
    justify-content: flex-start;
  }
  .qm-select-wrap {
    flex: 1 1 100%;
  }
  .qm-reset {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .expert-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .expert-facts dt {
    width: auto;
  }
  .page-hero {
    padding-top: calc(var(--header-h) + 40px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .qm-step-card,
  .expert-card,
  .qm-chip,
  .btn,
  .page-hero::before,
  .hero .svc-hero img {
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ===== キーワード検索 ===== */
/* ===== 業界・職種で絞り込む ===== */
.qm-search {
  margin: 0 0 18px;
}
.qm-search-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
}
.qm-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 0;
}
.qm-select-sort {
  flex: 1 1 200px;
}
.qm-select-label {
  flex: none;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  color: var(--orange-dp);
  letter-spacing: .06em;
}
.qm-select-wrap select {
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--white);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-sub) 50%), linear-gradient(135deg, var(--ink-sub) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.qm-select-wrap select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 138, 36, .16);
}
.qm-reset {
  flex: none;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-sub);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.qm-reset:hover {
  border-color: var(--orange);
  color: var(--orange-dp);
}
.qm-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-sub);
}

/* ===== 一覧セクションは幅を広く使う ===== */
#experts .page-section-inner {
  max-width: min(1320px, 100%);
}

/* =========================================================
   詳細ページ（expert.html）
   ========================================================= */
.ex-page { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 72px)); }
.ex-missing { text-align: center; display: grid; gap: 18px; justify-items: center; padding: 60px 0; }
.ex-missing h1 { font-family: var(--display); font-size: 24px; font-weight: 900; color: var(--ink); }
.ex-missing p { font-size: 14px; color: var(--ink-sub); }

.ex-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin-top: 26px;
}
.ex-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--sand);
}
.ex-photo img {
  display: block; width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 33%;
  transform: scale(1.06) translateX(-2.5%);
}
.ex-photo.is-letter {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 64px;
  color: var(--ink);
}
.ex-head-body { display: grid; gap: 16px; }
.ex-name {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(28px, 3.4vw, 40px); color: var(--ink); line-height: 1.25;
}
.ex-cred { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: -8px; }
.ex-facts {
  display: grid; gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.ex-facts .fact { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.ex-facts dt {
  flex: none; width: 6em;
  font-size: 12.5px; font-weight: 700; color: var(--teal-dp); letter-spacing: .04em;
}
.ex-facts dd { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.8; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-tag {
  font-size: 12px; background: var(--sand); color: var(--ink);
  padding: 7px 14px; border-radius: 999px; letter-spacing: .04em;
}
.ex-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.ex-block { margin-top: clamp(40px, 4.5vw, 56px); }
.ex-h2 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(18px, 1.9vw, 21px); color: var(--ink);
  padding-bottom: 10px; margin-bottom: 20px;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}
.ex-career {
  font-size: 13.5px; line-height: 2; color: var(--ink-sub); margin-bottom: 18px;
}
.ex-career .sep { color: var(--orange); margin: 0 10px; }
.ex-career .item { display: inline-block; }
.ex-para {
  font-size: 14.5px; line-height: 2; color: var(--ink-sub);
  max-width: 76ch;
}
.ex-para + .ex-para { margin-top: 14px; }

.ex-list { list-style: none; display: grid; gap: 12px; }
.ex-list li {
  position: relative; padding-left: 16px;
  font-size: 13.5px; line-height: 1.9; color: var(--ink);
}
.ex-list li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 6px; height: 6px; background: var(--orange); border-radius: 2px;
}

.ex-note { margin-top: 24px; font-size: 12.5px; line-height: 1.9; color: var(--ink-sub); }
.ex-back { margin-top: 44px; }

@media (max-width: 900px) {
  .ex-head { grid-template-columns: 180px minmax(0, 1fr); gap: 26px; }
}
@media (max-width: 680px) {
  .ex-head { grid-template-columns: minmax(0, 1fr); }
  .ex-photo { max-width: 200px; }
}
@media (max-width: 480px) {
  .ex-facts dt { width: auto; }
}

/* 匿名枠 — 写真の代わりの人物アイコンと「匿名」の小さなラベル */
.ex-photo.is-anon { color: var(--ink-sub); }
.ex-photo.is-anon svg { width: 34%; height: auto; opacity: .55; }
.expert-anon-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--sans, inherit);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink-sub);
  vertical-align: middle;
}

/* 名前の横のマーク — お墨付き（オレンジ）／アソビシア代表（濃色） */
.expert-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 10px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-family: var(--sans, inherit);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
.expert-badge svg { flex: none; }
.expert-badge.is-osumitsuki {
  color: var(--orange-dp);
  background: rgba(240, 138, 36, .1);
  border: 1px solid rgba(240, 138, 36, .45);
}
.expert-badge.is-rep {
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
}
/* 詳細ページの大きな名前の横では、少しだけ大きく */
.ex-name .expert-badge { font-size: 13px; padding: 4px 12px 4px 10px; margin-left: 14px; }
.ex-name .expert-badge svg { width: 15px; height: 15px; }

/* 詳細ページ — 代表からのお墨付きコメント（オレンジの枠で目立たせる） */
.ex-endorse {
  position: relative;
  margin-top: clamp(36px, 4vw, 48px);
  padding: clamp(24px, 3vw, 32px) clamp(22px, 3.2vw, 36px);
  background: linear-gradient(135deg, rgba(240, 138, 36, .09), rgba(247, 236, 226, .7));
  border: 1px solid rgba(240, 138, 36, .45);
  border-left: 5px solid var(--orange);
  border-radius: var(--r-md);
}
.ex-endorse-label {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px;
  font-family: var(--display); font-weight: 900;
  font-size: 15px; letter-spacing: .06em;
  color: var(--orange-dp);
}
.ex-endorse-label svg { width: 18px; height: 18px; }
.ex-endorse-text {
  font-size: 15px; line-height: 2; color: var(--ink);
}
.ex-endorse-text + .ex-endorse-text { margin-top: 10px; }
.ex-endorse-sign {
  margin-top: 16px;
  text-align: right;
  font-size: 13px; font-weight: 700; color: var(--ink-sub);
}
