/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-accent: #003f80;
  --color-accent-light: #f0f5fb;
  --color-dark: #111111;
  --color-dark-text: #ffffff;
  --color-border: #e8e8e8;
  --color-primary: #0072CE;
  --color-primary-hover: #005aac;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1100px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 2.0;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===========================
   Header
=========================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.logo-img--footer {
  height: 36px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ロゴ切り替え */
.logo-wrap {
  display: block;
  transition: opacity 0.3s ease;
}
.logo-wrap--normal {
  position: absolute;
  opacity: 0;
}
.logo-wrap--white {
  opacity: 1;
}
.header__logo {
  position: relative;
  display: flex;
  align-items: center;
  /* 両画像が重なるよう、通常ロゴの分の高さを確保 */
  height: 40px;
}

/* スクロール後：通常ロゴを表示、白ロゴを非表示 */
.header.scrolled .logo-wrap--normal {
  opacity: 1;
}
.header.scrolled .logo-wrap--white {
  opacity: 0;
}

.header__nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.header__nav a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.9);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}
.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: #fff;
  transition: width var(--transition);
}
.header__nav a:hover,
.header__nav a.active { color: #fff; }
.header__nav a:hover::after,
.header__nav a.active::after { width: 100%; }

.header__nav a.nav-cta {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.82rem;
  border: 1px solid rgba(255,255,255,0.4);
}
.header__nav a.nav-cta::after { display: none; }
.header__nav a.nav-cta:hover { background: rgba(255,255,255,0.3); color: #fff; }
.header__nav a.nav-cta.active { background: rgba(255,255,255,0.3); color: #fff; }

/* スクロール後（動画エリア外）は黒文字 */
.header.scrolled .header__nav a {
  color: var(--color-text);
}
.header.scrolled .header__nav a::after {
  background: var(--color-primary);
}
.header.scrolled .header__nav a:hover,
.header.scrolled .header__nav a.active { color: var(--color-primary); }

.header.scrolled .header__nav a.nav-cta {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.header.scrolled .header__nav a.nav-cta:hover { background: var(--color-primary-hover); }
.header.scrolled .header__nav a.nav-cta.active { background: var(--color-primary-hover); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: #fff;
  transition: var(--transition);
}
.header.scrolled .hamburger span {
  background: var(--color-dark);
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ===========================
   Hero (index only)
=========================== */
.hero {
  position: relative;
  /* 固定 height だと画面が低いとき中央寄せの上下がはみ出して
     ボタンが切れる。min-height にして収まらなければ伸ばす */
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* ヘッダーとスクロール表示のぶん、上下に余白を確保 */
  padding: calc(var(--header-h) + 1.5rem) 0 5.5rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--color-accent);
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,30,0.75) 0%, rgba(10,10,30,0.45) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;   /* 上下余白は .hero 側で確保 */
  color: #fff;
}

.hero__sub {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  font-weight: 400;
  margin-bottom: 1.25rem;
  opacity: 0.7;
}

.hero__title {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(3.84rem, 8.8vw, 5.75rem);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  letter-spacing: 0.12em;
}

.hero__desc {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(1.52rem, 2.56vw, 1.76rem);
  font-weight: 400;
  opacity: 0.8;
  margin-bottom: 2.5rem;
  letter-spacing: 0.15em;
  line-height: 2;
}

.hero__btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  display: block;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.7);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* 画面の縦が低いとき：文字と余白を詰め、極力スクロールなしで
   新卒／中途ボタンまで表示する。スクロール表示は隠す */
@media (max-height: 720px) {
  .hero { padding: calc(var(--header-h) + 1rem) 0 2rem; }
  .hero__title { font-size: clamp(2.4rem, 6vh, 4rem); line-height: 1.35; margin-bottom: 1rem; }
  .hero__desc { font-size: clamp(1.1rem, 2.6vh, 1.6rem); line-height: 1.7; margin-bottom: 1.5rem; }
  .hero__sub { margin-bottom: 0.8rem; }
  .hero__scroll { display: none; }
}
@media (max-height: 520px) {
  .hero__title { font-size: clamp(1.8rem, 7vh, 3rem); margin-bottom: 0.75rem; }
  .hero__desc { margin-bottom: 1.1rem; }
}

/* ===========================
   Page Hero (inner pages)
=========================== */
.page-hero {
  padding-top: var(--header-h);
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding-bottom: 4rem;
  padding-top: calc(var(--header-h) + 3.5rem);
}

.page-hero__en {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.page-hero--light {
  background: none;
  color: var(--color-dark);
}
.page-hero--light .page-hero__en {
  color: var(--color-primary);
}
.page-hero--light .page-hero__title {
  color: var(--color-dark);
}

/* ===========================
   Buttons
=========================== */
.btn {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  font-family: var(--font-sans);
  border: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }

.btn--red {
  background: #e02020;
  color: #fff;
  border: 1px solid #e02020;
}
.btn--red:hover { background: #c01010; border-color: #c01010; }

.btn--outline {
  border: 1px solid rgba(255,255,255,0.7);
  color: #fff;
}
.btn--outline:hover { background: rgba(255,255,255,0.12); }

.btn--white {
  background: #fff;
  color: var(--color-dark);
  border: 1px solid #fff;
}
.btn--white:hover { background: rgba(255,255,255,0.88); }

.btn--outline-white {
  border: 1px solid rgba(255,255,255,0.55);
  color: #fff;
}
.btn--outline-white:hover { background: rgba(255,255,255,0.1); }

.btn--lg { padding: 1rem 3rem; font-size: 0.95rem; }

/* ===========================
   Section commons
=========================== */
.section { padding: 6rem 0; }
.section--dark { background: var(--color-dark); color: #fff; }
.section--accent { background: var(--color-accent-light); }
/* 「誰もが働きやすい環境を目指して」の背景を上部の薄グレー(.statement)と揃える */
.environment.section--accent { background: #f2f2f0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label { margin-bottom: 0.875rem; }
.section-label span {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--color-primary);
  text-transform: uppercase;
  display: inline-block;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--color-primary);
}
.section--dark .section-label span {
  color: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.25);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 3rem;
  letter-spacing: 0.05em;
}

/* ===========================
   Statement
=========================== */
.statement {
  background: #f2f2f0;
  padding: 9rem 2rem;
}

.statement__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem 6rem;
  align-items: start;
}

.statement__heading {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: #111;
}

.statement__body {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.statement__body p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 700;
  line-height: 2.1;
  letter-spacing: 0.02em;
  color: #333;
  margin: 0;
}

@media (max-width: 768px) {
  .statement { padding: 6rem 1.5rem; }
  .statement__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .statement__heading { font-size: clamp(1.6rem, 5vw, 2rem); }
}

@media (max-width: 480px) {
  .statement { padding: 4.5rem 1rem; }
  .statement__heading { font-size: 1.5rem; }
}

/* ===========================
   Videos
=========================== */
.videos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ===========================
   Environment
=========================== */
.environment__lead {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
}

.environment__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.env-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition), transform var(--transition);
}
.env-card:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

/* 研修プログラムのカードと同じ：アイコンを右上にうっすら透かしで表示 */
.env-card__icon {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 116px;
  height: 116px;
  color: var(--color-primary);
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
  margin: 0;
}
.env-card__icon svg { width: 100%; height: 100%; display: block; }

.env-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.env-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
  .environment__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .environment__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
  .environment__grid { grid-template-columns: 1fr; }
}

/* ===========================
   Members horizontal scroll
=========================== */
.members-scroll__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.members-scroll__head .section-title { margin-bottom: 0; }

.members-scroll__link {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: opacity var(--transition);
  margin-bottom: 0.2rem;
}
.members-scroll__link:hover { opacity: 0.65; }

.members-scroll__track-wrap {
  margin-top: 2.5rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  padding: 0.5rem 2rem 1.5rem;
  cursor: grab;
}
.members-scroll__track-wrap:active { cursor: grabbing; }
.members-scroll__track-wrap::-webkit-scrollbar { height: 4px; }
.members-scroll__track-wrap::-webkit-scrollbar-track { background: transparent; }
.members-scroll__track-wrap::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }

.members-scroll__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
}

.mcard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 768px) {
  .mcard-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .mcard-grid { grid-template-columns: 1fr; }
}
.mcard-grid .mcard { width: auto; }

.mcard {
  width: 300px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  background: #fff;
  display: flex;
  flex-direction: column;
}
.mcard:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}

.mcard__img {
  width: 100%;
  aspect-ratio: 300 / 485;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.mcard__img picture { display: block; width: 100%; height: 100%; }
.mcard__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.5s ease;
}
.mcard:hover .mcard__img img {
  transform: scale(1.05);
}
.mcard__img span {
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
}
.mcard__hover {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 60, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mcard:hover .mcard__hover {
  opacity: 1;
}
.mcard__hover p {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  text-align: center;
}

.mcard__body {
  padding: 1.25rem;
}
.mcard__role {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.mcard__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}
.mcard__comment {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.8;
  font-weight: 400;
}

/* ===========================
   News
=========================== */
.news__header {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.news__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: auto;
}

.news__all {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--color-primary);
  transition: opacity var(--transition);
  white-space: nowrap;
  margin-bottom: 0.2rem;
}
.news__all:hover { opacity: 0.7; }

.news__list {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.news__item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.news__item > a:first-child,
.news__item > div:first-child {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1.25rem 0;
  flex: 1;
  transition: opacity var(--transition);
}
.news__item > a:first-child:hover { opacity: 0.65; }

.news__date { margin-right: 1.5rem; }
.news__tag  { margin-right: 1.5rem; }

.news__insta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #c13584;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s ease, color 0.2s ease;
}
.news__insta svg { width: 22px; height: 22px; }
.news__insta:hover { color: #e1306c; transform: scale(1.15); }

.news__date {
  font-size: 14px;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-weight: 400;
  min-width: 88px;
}

.news__tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 76px;
  text-align: center;
}
.news__tag--recruit { background: #ebf4ff; color: #2c5282; }
.news__tag--event   { background: #f0fff4; color: #276749; }
.news__tag--intern  { background: #fffff0; color: #744210; }
.news__tag--info    { background: #f7fafc; color: #4a5568; }

.news__text {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 400;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .news__item a {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
  }
  .news__text { width: 100%; }
}

/* ===========================
   Quick Links (index)
=========================== */
.quicklinks {
  display: block;
}

.quicklinks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 560px;
}

.qlink {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-image: var(--qlink-img);
  background-size: cover;
  background-position: center;
  transition: flex var(--transition);
}

.qlink__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
  transition: background var(--transition);
}
.qlink:hover .qlink__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.15) 100%);
}

.qlink__body {
  position: relative;
  z-index: 1;
  padding: 2rem 1.75rem;
  color: #fff;
  width: 100%;
}

.qlink__en {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.qlink__title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.qlink__desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  opacity: 0;
}
.qlink:hover .qlink__desc {
  max-height: 80px;
  opacity: 1;
}

.qlink__arrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition), transform var(--transition);
}
.qlink:hover .qlink__arrow {
  color: #fff;
  transform: translateX(4px);
}

@media (max-width: 1024px) {
  .quicklinks__grid { height: 480px; }
  .qlink__title { font-size: 1rem; }
}

@media (max-width: 768px) {
  .quicklinks__grid {
    grid-template-columns: repeat(2, 1fr);
    height: auto;
  }
  .qlink { height: 220px; }
  .qlink__desc { max-height: 80px; opacity: 1; }
  .qlink__title { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .quicklinks__grid { grid-template-columns: 1fr; }
  .qlink { height: 220px; }
}

/* ===========================
   Intro block
=========================== */
.intro-block {
  max-width: 760px;
}
.intro-block__heading {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.intro-block p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

/* ===========================
   Business list (work.html)
=========================== */
/* Episode card hint */
.ep-hint {
  font-size: 14px;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ep-hint::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Episode card grid */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Card perspective wrapper */
.ep-card {
  perspective: 1200px;
  cursor: pointer;
  aspect-ratio: 5 / 7;
}

.ep-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.ep-card.is-flipped .ep-card__inner {
  transform: rotateY(180deg);
}

/* Front & back shared */
.ep-card__front,
.ep-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  border: 1px solid #d0d4dc;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.25rem 1.25rem;
  overflow: hidden;
}

/* Front */
.ep-card__front {
  justify-content: space-between;
  background: #fff;
  isolation: isolate;   /* 背景写真の重なりをカード内に閉じ込める */
}
.ep-card__front::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(44,82,130,0.12);
  border-radius: 4px;
  pointer-events: none;
}
/* 背景写真。カードごとに別の写真を割り当てる */
.ep-card__front::before {
  content: '';
  position: absolute;
  inset: 8px;            /* 内側の飾り枠（::after）と同じ位置まで */
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.32;
  border-radius: 4px;    /* 内枠の角丸に合わせる */
  pointer-events: none;
}
.ep-grid .ep-card:nth-child(1)  .ep-card__front::before { background-image: url('img/card/card01.webp'); }
.ep-grid .ep-card:nth-child(2)  .ep-card__front::before { background-image: url('img/card/card02.webp'); }
.ep-grid .ep-card:nth-child(3)  .ep-card__front::before { background-image: url('img/card/card03.webp'); }
.ep-grid .ep-card:nth-child(4)  .ep-card__front::before { background-image: url('img/card/card04.webp'); }
.ep-grid .ep-card:nth-child(5)  .ep-card__front::before { background-image: url('img/card/card05.webp'); }
.ep-grid .ep-card:nth-child(6)  .ep-card__front::before { background-image: url('img/card/card06.webp'); }
.ep-grid .ep-card:nth-child(7)  .ep-card__front::before { background-image: url('img/card/card07.webp'); }
.ep-grid .ep-card:nth-child(8)  .ep-card__front::before { background-image: url('img/card/card08.webp'); }
.ep-grid .ep-card:nth-child(9)  .ep-card__front::before { background-image: url('img/card/card09.webp'); }
.ep-grid .ep-card:nth-child(10) .ep-card__front::before { background-image: url('img/card/card10.webp'); }
.ep-grid .ep-card:nth-child(11) .ep-card__front::before { background-image: url('img/card/card11.webp'); }
.ep-grid .ep-card:nth-child(12) .ep-card__front::before { background-image: url('img/card/card12.webp'); }
/* 番号とタイトルを写真より前面に */
.ep-card__front > * {
  position: relative;
  z-index: 1;
}

/* Back */
.ep-card__back {
  transform: rotateY(180deg);
  justify-content: space-between;
  background: #f8f9fc;
  overflow-y: auto;
}

/* Corner number (playing card style) */
.ep-card__num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}
.ep-card__num--br {
  align-self: flex-end;
  transform: rotate(180deg);
  opacity: 0.35;
}

/* Front title */
.ep-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: #1a1a2e;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  margin: 0;
}

/* Front flip indicator */
.ep-card__front .ep-card__num:first-child::after {
  content: ' ↻';
  font-size: 0.7rem;
  opacity: 0.45;
  font-weight: 400;
}

/* Back detail */
.ep-card__detail {
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  flex: 1;
  overflow-y: auto;
  /* 右のマイナスマージンでスクロールバーをカード端に寄せ、
     padding-right で本文とバーの間隔を確保する */
  margin: 0.75rem -0.85rem 0.5rem 0;
  padding-right: 0.85rem;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #c8ccd4 transparent;
}
/* WebKit / Blink */
.ep-card__back::-webkit-scrollbar,
.ep-card__detail::-webkit-scrollbar { width: 4px; }
.ep-card__back::-webkit-scrollbar-track,
.ep-card__detail::-webkit-scrollbar-track { background: transparent; }
.ep-card__back::-webkit-scrollbar-thumb,
.ep-card__detail::-webkit-scrollbar-thumb {
  background: #c8ccd4;
  border-radius: 4px;
}
.ep-card__back {
  scrollbar-width: thin;
  scrollbar-color: #c8ccd4 transparent;
}

.ep-card__role {
  font-size: 0.7rem;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--color-border);
  padding-top: 0.6rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* Hover lift on front */
.ep-card:not(.is-flipped):hover .ep-card__inner {
  transform: translateY(-4px) rotateY(0deg);
  box-shadow: 0 12px 32px rgba(44,82,130,0.14);
}

@media (max-width: 768px) {
  .ep-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .ep-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .ep-card__title { font-size: 0.82rem; }
}

/* ===========================
   Selection Flow Timeline
=========================== */
.flow {
  margin: 1.5rem 0 2rem;
}
.flow__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.flow__track {
  display: flex;
  position: relative;
  height: 250px;
  min-width: 480px;
  padding: 0 32px;
}
/* Center line */
.flow__track::before {
  content: '';
  position: absolute;
  top: 124px;
  left: 24px;
  right: 52px;
  height: 2px;
  background: var(--color-primary);
  opacity: 0.22;
}
/* Arrow */
.flow__track::after {
  content: '';
  position: absolute;
  top: 116px;
  right: 20px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 16px solid var(--color-primary);
  opacity: 0.45;
}
.flow__step {
  flex: 1;
  position: relative;
}
/* Dot on center line */
.flow__step::after {
  content: '';
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.45;
  z-index: 2;
}
/* Connector top (icon bottom → center line) */
.flow__step--top::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 98px;
  height: 24px;
  width: 1.5px;
  background: var(--color-primary);
  opacity: 0.22;
}
/* Connector bottom (center line → icon top) */
.flow__step--bottom::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 130px;
  height: 22px;
  width: 1.5px;
  background: var(--color-primary);
  opacity: 0.22;
}
/* Icon circle */
.flow__icon {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(44,82,130,0.1);
}
.flow__icon svg { width: 20px; height: 20px; }
.flow__step--top .flow__icon { top: 48px; }
.flow__step--bottom .flow__icon { top: 152px; }
/* Labels */
.flow__label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  text-align: center;
  width: 74px;
  letter-spacing: 0.02em;
  color: var(--color-text);
  z-index: 2;
  line-height: 1.5;
}
.flow__step--top .flow__label { top: 4px; }
.flow__step--bottom .flow__label { top: 206px; }
/* Final step highlight */
.flow__step:last-child .flow__icon {
  background: var(--color-primary);
  color: #fff;
}
.flow__step:last-child .flow__label {
  color: var(--color-primary);
  font-weight: 600;
}
/* Description compact list */
.flow__desc {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0.5rem 0 2.5rem;
  padding: 0;
  counter-reset: flow-step;
}
.flow__desc li {
  position: relative;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border, #e8e8e4);
}
.flow__desc li:first-child { border-top: 1px solid var(--color-border, #e8e8e4); }
.flow__desc li::before {
  counter-increment: flow-step;
  content: counter(flow-step, decimal-leading-zero);
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: #c8c8c8;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.flow__desc li strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.6rem;
}
.flow__desc li > span {
  display: block;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-muted);
}
@media (prefers-color-scheme: dark) {
  .flow__desc li::before { color: rgba(255,255,255,0.2); }
}
:root[data-theme="dark"] .flow__desc li::before { color: rgba(255,255,255,0.2); }
:root[data-theme="light"] .flow__desc li::before { color: #c8c8c8; }

/* ===========================
   Style grid (work.html)
=========================== */
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.style-card {
  padding: 2.5rem 2rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: box-shadow var(--transition);
}
.style-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.07); }
.style-card__icon {
  width: 40px; height: 40px;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}
.style-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.style-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

/* ===========================
   Members grid (people.html)
=========================== */
.members-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.member-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.member-card:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,0.09);
  transform: translateY(-3px);
}
.member-card__avatar {
  height: 140px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
}
.member-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.member-card__role {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  font-weight: 500;
}
.member-card__name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}
.member-card__body p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 2.0;
  letter-spacing: 0.02em;
  font-weight: 400;
  flex: 1;
}
.member-card__bg {
  font-size: 14px;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* ===========================
   Diversity (people.html)
=========================== */
.diversity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.diversity-item {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
}
.diversity-item__value {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.diversity-item__label {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}
.diversity-item p {
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

/* ===========================
   Company full-width photo (company.html hero直下)
=========================== */
.company-fullphoto,
.interview-fullphoto {
  width: 100%;
  height: 520px;
  overflow: hidden;
  position: relative;
  background: var(--color-accent-light);
}
.company-fullphoto img,
.interview-fullphoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.company-fullphoto__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #bbb;
  border: 2px dashed #d8d8d8;
}
.company-fullphoto__placeholder svg {
  width: 52px;
  height: 52px;
  opacity: 0.4;
}
.company-fullphoto__placeholder p {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #bbb;
}
@media (max-width: 768px) {
  .company-fullphoto,
  .interview-fullphoto { height: 320px; }
}
@media (max-width: 480px) {
  .company-fullphoto,
  .interview-fullphoto { height: 240px; }
}

/* ===========================
   Company Intro (company.html hero下)
=========================== */
.company-intro {
  background: #fff;
  padding: 6rem 2rem 7rem;
}
.company-intro__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.company-intro__text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.company-intro__label {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 500;
}
.company-intro__heading {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: #111;
}
.company-intro__body {
  font-size: 0.95rem;
  line-height: 2.1;
  letter-spacing: 0.02em;
  color: #555;
  font-weight: 400;
}
.company-intro__photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-accent-light);
  position: relative;
}
.company-intro__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.company-intro__photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #bbb;
}
.company-intro__photo-placeholder svg {
  width: 52px;
  height: 52px;
  opacity: 0.45;
}
.company-intro__photo-placeholder p {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #bbb;
}
@media (max-width: 860px) {
  .company-intro__inner { grid-template-columns: 1fr; gap: 3rem; }
  .company-intro__photo-wrap { aspect-ratio: 16 / 9; }
}
@media (max-width: 480px) {
  .company-intro { padding: 4rem 1rem 5rem; }
  .company-intro__heading { font-size: 1.6rem; }
}

/* ===========================
   Message block (company.html)
=========================== */
.message-block {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: center;
}
.message-block__text h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
}
.message-block__text p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}
.message-block__card {
  aspect-ratio: 3/4;
  background: var(--color-accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.message-block__card::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
}
.message-block__quote {
  font-size: 6rem;
  line-height: 0.6;
  display: block;
  color: rgba(255,255,255,0.12);
  margin-bottom: 1.5rem;
}
.message-block__card p {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.04em;
}

/* ===========================
   Numbers (company.html)
=========================== */
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.08);
}
.number-item {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--color-dark);
}
.number-item__value {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.number-item__value small {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.65;
  margin-left: 2px;
}
.number-item__label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* ===========================
   Company table
=========================== */
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table th,
.company-table td {
  padding: 1.1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  vertical-align: top;
}
/* 最終行（公式サイト）の下の罫線は消す */
.company-table tr:last-child th,
.company-table tr:last-child td { border-bottom: none; }
.company-table th {
  width: 180px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text);
}
.company-table td {
  color: var(--color-text-muted);
  font-weight: 400;
}
.company-table a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* ===========================
   Features grid (training.html)
=========================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--color-border);
}
.feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  padding: 2.5rem 2rem;
}
/* 内定者研修のカードと同じ：アイコンを右上にうっすら透かしで表示 */
.feature-card__icon {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 116px;
  height: 116px;
  color: var(--color-primary);
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
  margin: 0;
}
.feature-card__icon svg { width: 100%; height: 100%; display: block; }
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

/* ===========================
   Welfare list (training.html)
=========================== */
.welfare-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.welfare-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
}
.welfare-item:first-child { border-top: 1px solid var(--color-border); }
.welfare-item__icon {
  width: 40px; height: 40px;
  color: var(--color-primary);
  margin-top: 4px;
}
.welfare-item__body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.welfare-item__body p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

/* ===========================
   Job tabs (jobs.html) / Contact tabs (contact.html)
=========================== */
.job-tabs,
.contact-tabs {
  border-bottom: 1px solid var(--color-border);
  background: #fff;
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}
.job-tabs__nav,
.contact-tabs__nav {
  display: flex;
  gap: 0;
}
.job-tab-btn,
.contact-tab-btn {
  padding: 1.1rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: var(--font-sans);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  position: relative;
  transition: color var(--transition);
}
.job-tab-btn::after,
.contact-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.job-tab-btn.active,
.contact-tab-btn.active { color: var(--color-primary); }
.job-tab-btn.active::after,
.contact-tab-btn.active::after { transform: scaleX(1); }
.job-tab-btn:hover,
.contact-tab-btn:hover { color: var(--color-text); }

/* タブは中央寄せ。狭い画面では横スクロールで逃がす */
.contact-tabs__nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.contact-tabs__nav::-webkit-scrollbar { display: none; }
.contact-tab-btn { white-space: nowrap; }

.job-panel__lead {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: 680px;
  margin-bottom: 2.5rem;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

.jobs-table,
.contact-confirm {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
}
.jobs-table th,
.jobs-table td,
.contact-confirm th,
.contact-confirm td {
  padding: 1.1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  vertical-align: top;
}
.jobs-table th,
.contact-confirm th {
  width: 160px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--color-accent-light);
}
.jobs-table td,
.contact-confirm td {
  color: var(--color-text-muted);
  font-weight: 400;
}
.jobs-table small {
  display: block;
  font-size: 14px;
  margin-top: 0.25rem;
  opacity: 0.75;
}

.job-apply { text-align: center; padding-top: 1rem; }

/* ===========================
   CTA
=========================== */
.cta {
  background: var(--color-accent);
  padding: 6rem 2rem;
  text-align: center;
  color: #fff;
}
.cta__sub {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.cta__title {
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 2.25rem;
  letter-spacing: 0.04em;
}
.cta__inner {
  max-width: 680px;
  margin: 0 auto;
}
.cta__btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   Footer
=========================== */
.footer {
  background: #0a0a0a;
  color: rgba(255,255,255,0.4);
  padding: 4.5rem 2rem 0;
  width: 100%;
  overflow-x: hidden;
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: start;
}
.footer__left {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.footer__company {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.footer__address {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  line-height: 1.9;
  color: rgba(255,255,255,0.7);
}
.footer__corp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 0.4rem 1rem;
  transition: color var(--transition), border-color var(--transition);
  width: fit-content;
  margin-top: 0.25rem;
}
.footer__corp-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.footer__corp-link svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}
.footer__sns {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.footer__sns-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #ffffff;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer__sns-link svg {
  width: 16px;
  height: 16px;
}
.footer__sns-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
}
.footer__nav {
  display: flex;
  flex-direction: column;
  counter-reset: footer-nav;
}
.footer__nav a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: padding-left var(--transition);
  counter-increment: footer-nav;
}
.footer__nav a:first-child { border-top: 1px solid rgba(255,255,255,0.07); }
.footer__nav a:hover { padding-left: 6px; }
.footer__nav a::before {
  content: '0' counter(footer-nav);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.18);
  font-weight: 500;
  transition: color var(--transition);
}
.footer__nav a:hover::before { color: rgba(255,255,255,0.4); }

.footer__nav-en {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
  padding-left: 2rem;
  transition: color var(--transition);
}
.footer__nav a:hover .footer__nav-en { color: #fff; }

.footer__nav-ja {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color var(--transition);
}
.footer__nav a:hover .footer__nav-ja { color: rgba(255,255,255,0.6); }
.footer__bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
}
.footer__copy { font-size: 0.7rem; letter-spacing: 0.06em; }

@media (max-width: 768px) {
  .footer { padding: 3.5rem 1.5rem 0; }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer__bottom { padding: 1.25rem 0; }
  .logo-img { height: 32px; }
  .logo-img--footer { height: 28px; }

  /* フッターナビ：モバイルでは縦積みレイアウトに変更 */
  .footer__nav a {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.85rem 0;
  }
  .footer__nav-en { font-size: 0.9rem; }
  .footer__nav-ja {
    white-space: normal;
    font-size: 0.68rem;
    padding-left: 2rem;
  }
}
@media (max-width: 480px) {
  .footer { padding: 3rem 1rem 0; }
  .footer__nav-en { font-size: 0.85rem; }
  .footer__sns { gap: 0.6rem; }
}

/* ===========================
   Animations
=========================== */
.js-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsive — Tablet (≤1024px)
=========================== */
@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }

  /* ナビ項目が7つあるため、この幅では詰めて収める */
  .header__nav ul { gap: 1.25rem; }
  .header__nav a { font-size: 0.8rem; }
  .header__nav a.nav-cta { padding: 0.45rem 0.9rem; }

  .contact-tabs__nav { padding: 0 1.5rem; justify-content: flex-start; }
  .contact-tab-btn { padding: 1.1rem 1.25rem; }

  .quicklinks__grid { grid-template-columns: repeat(2, 1fr); }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .members-grid { grid-template-columns: repeat(2, 1fr); }
  .diversity-grid { grid-template-columns: repeat(2, 1fr); }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .message-block { grid-template-columns: 1fr; gap: 2.5rem; }
  .message-block__card { aspect-ratio: 16/7; max-width: 100%; }
  .mcard__img { height: 360px; }
}

/* ===========================
   Responsive — Mobile (≤768px)
=========================== */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  /* Nav drawer */
  .header__nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    max-height: calc(100vh - var(--header-h));
    background: #fff;
    border-top: 1px solid var(--color-border);
    padding: 0 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
    overflow-y: auto;
  }
  .header__nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .header__nav ul {
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  .header__nav li { border-bottom: 1px solid var(--color-border); }
  .header__nav a {
    display: block;
    font-size: 0.95rem;
    padding: 1rem 0;
    color: var(--color-text);
  }
  .header__nav a:hover,
  .header__nav a.active { color: var(--color-primary); }
  .header__nav a::after { display: none; }
  .header__nav a.nav-cta {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 0.5rem;
    display: inline-block;
    width: auto;
    text-align: center;
  }
  .header__nav a.nav-cta:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }

  .hamburger { display: flex; z-index: 10; position: relative; }
  .hamburger span { background: var(--color-dark); }
  .header { background: rgba(255,255,255,0.95); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

  /* Page hero */
  .page-hero {
    padding-top: calc(var(--header-h) + 2.5rem);
    padding-bottom: 2.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .page-hero__title { font-size: clamp(1.5rem, 6vw, 2rem); }
  /* page-hero--light (company.html) のモバイル文字色を明示 */
  .page-hero--light .page-hero__title { color: var(--color-dark); }
  .page-hero--light .page-hero__en { color: var(--color-primary); }

  /* Hero (index) */
  .hero__title { font-size: clamp(2rem, 8vw, 2.6rem); }
  .hero__desc { font-size: clamp(1.1rem, 3.5vw, 1.4rem); }
  .hero__btns { flex-direction: column; align-items: flex-start; }
  .hero__btns .btn { width: 100%; max-width: 280px; text-align: center; }

  .section { padding: 3.5rem 0; }
  .section-title { margin-bottom: 2rem; }

  .quicklinks__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .videos__grid { grid-template-columns: 1fr; }

  .numbers__grid { grid-template-columns: repeat(2, 1fr); }
  .number-item { padding: 2rem 1rem; }

  .features__grid { grid-template-columns: 1fr; gap: 0; }
  .members-grid { grid-template-columns: 1fr; }
  .diversity-grid { grid-template-columns: 1fr; gap: 1rem; }
  .style-grid { grid-template-columns: 1fr; }

  .mcard__img { height: 280px; }

  .business-item { grid-template-columns: 48px 1fr; gap: 1rem; }
  .business-item__body ul { grid-template-columns: 1fr; }

  .message-block { grid-template-columns: 1fr; }
  .message-block__card { padding: 2rem 1.5rem; min-height: 200px; }
  .message-block__card p { font-size: 1.25rem; }

  .welfare-item { grid-template-columns: 40px 1fr; gap: 1.25rem; }

  .job-tab-btn { padding: 0.875rem 1.25rem; font-size: 0.8rem; }

  .jobs-table th { width: 100px; }
  .jobs-table,
  .company-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .cta { padding: 4.5rem 1.5rem; }
  .cta__btns { flex-direction: column; align-items: center; }
  .cta__btns .btn { width: 100%; max-width: 280px; text-align: center; }

  .company-table th { width: 100px; white-space: normal; }
  .company-table th,
  .company-table td { padding: 0.75rem 0.875rem; font-size: 0.85rem; }
  .jobs-table th,
  .jobs-table td { padding: 0.75rem 0.875rem; font-size: 0.85rem; }

  .footer__nav-en { font-size: 0.9rem; }
  .footer__bottom { padding: 1.25rem 0; }
}

/* ===========================
   Responsive — Small (≤480px)
=========================== */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero__title { font-size: clamp(1.75rem, 9vw, 2.2rem); }
  .hero__desc { font-size: 1.1rem; margin-bottom: 2rem; }
  .hero__btns .btn { max-width: 100%; }

  .page-hero { padding-top: calc(var(--header-h) + 2rem); padding-bottom: 2rem; }
  .page-hero__title { font-size: clamp(1.35rem, 7vw, 1.75rem); }

  .quicklinks__grid { grid-template-columns: 1fr; }
  .numbers__grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .number-item { padding: 1.75rem 0.75rem; }
  .number-item__value { font-size: 2.25rem; }

  .diversity-grid { grid-template-columns: 1fr; }
  .diversity-item { padding: 1.75rem 1.25rem; }

  .ep-grid { grid-template-columns: 1fr; gap: 1rem; }

  .business-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .business-item__num { font-size: 2rem; }

  .company-table,
  .jobs-table { display: block; overflow-x: auto; }

  .section { padding: 3rem 0; }
  .section-title { font-size: 1.35rem; }

  .members-scroll__track-wrap { padding: 0.5rem 1rem 1.25rem; }

  .cta__title { font-size: clamp(1.4rem, 7vw, 2rem); }

  .flow__track { min-width: 360px; }
}

/* ===========================
   Doc layout + Side nav
   (work / company / training / jobs)
=========================== */
.doc {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: 4rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  align-items: start;
}

/* --- Sidebar --- */
.doc__side {
  position: sticky;
  z-index: 10;   /* 全幅の色帯より前面に */
  top: calc(var(--header-h) + 2rem);
}
.side-nav__label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 500;
  padding-bottom: 0.9rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}
.side-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.side-nav a {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding: 0.65rem 0 0.65rem 1rem;
  border-left: 2px solid var(--color-border);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.side-nav a:hover {
  color: var(--color-text);
  border-left-color: var(--color-text-muted);
}
.side-nav a.active {
  color: var(--color-primary);
  font-weight: 700;
  border-left-color: var(--color-primary);
}
/* 入社後研修の子項目（スケジュール / 研修プログラム）はインデント表示 */
.side-nav__subitem a {
  font-size: 0.78rem;
  padding-left: 1.9rem;
  color: var(--color-text-muted);
}

/* --- Content --- */
.doc__body { min-width: 0; }
.doc-sec {
  padding-bottom: 5rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.doc-sec:last-child { padding-bottom: 0; }
/* keep the dark numbers grid separators visible on a white page */
.doc .numbers__grid { background: var(--color-border); }

/* --- Doc content helpers (shared across pages) --- */
.doc-lead {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  margin-bottom: 1.75rem;
  max-width: 820px;
}
.doc-subhead {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 2.25rem 0 0.85rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--color-primary);
  /* サイドバーから飛んだ時に固定ヘッダーで見出しが隠れないように */
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
/* ===========================
   Step flow（training.html 新卒研修）
   矢印リボン。淡い青 → 濃い紺へグラデーションし、
   時間が進む感覚を出す。768px以下は下向きの矢印で縦積み。
=========================== */
.step-flow {
  --tip: 24px;            /* 矢印の突き出し量 */
  display: flex;
  align-items: stretch;
  margin-top: 2rem;
}
.step-flow__item {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1rem 1.5rem calc(var(--tip) + 1.1rem);
  margin-left: calc(var(--tip) * -1);
  color: #fff;
  /* 左に切り欠き、右に矢印の先端 */
  clip-path: polygon(
    0 0,
    calc(100% - var(--tip)) 0,
    100% 50%,
    calc(100% - var(--tip)) 100%,
    0 100%,
    var(--tip) 50%
  );
}
/* 先頭だけ左辺をまっすぐに */
.step-flow__item:first-child {
  margin-left: 0;
  padding-left: 1.4rem;
  clip-path: polygon(
    0 0,
    calc(100% - var(--tip)) 0,
    100% 50%,
    calc(100% - var(--tip)) 100%,
    0 100%
  );
}

/* 淡い青 → 濃い紺 */
.step-flow__item:nth-child(1) { background: #5a9bd8; }
.step-flow__item:nth-child(2) { background: #337ec2; }
.step-flow__item:nth-child(3) { background: #1a5fa0; }
.step-flow__item:nth-child(4) { background: var(--color-accent); }

.step-flow__when {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}
.step-flow__what {
  font-size: 0.82rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.92);
}

@media (max-width: 768px) {
  .step-flow {
    --tip: 18px;
    flex-direction: column;
    margin-top: 1.5rem;
  }
  .step-flow__item {
    padding: 1.25rem 1.25rem calc(var(--tip) + 1.1rem);
    margin-left: 0;
    margin-top: calc(var(--tip) * -1);
    /* 下向きの矢印に切り替え */
    clip-path: polygon(
      0 0,
      50% var(--tip),
      100% 0,
      100% calc(100% - var(--tip)),
      50% 100%,
      0 calc(100% - var(--tip))
    );
  }
  .step-flow__item:first-child {
    margin-top: 0;
    padding: 1.25rem 1.25rem calc(var(--tip) + 1.1rem);
    clip-path: polygon(
      0 0,
      100% 0,
      100% calc(100% - var(--tip)),
      50% 100%,
      0 calc(100% - var(--tip))
    );
  }
}

/* ===========================
   Roadmap（training.html 新卒研修）
   曲がりくねった道路の上にマップピンを配置したタイムライン。
   PC は道路レイアウト、768px以下は縦のタイムラインに切り替え。
=========================== */
.roadmap {
  position: relative;
  max-width: 920px;
  margin: 2.5rem auto 0;
}
.roadmap__road {
  display: block;
  width: 100%;
  height: auto;
}
/* ノード（円）の中心を線上に置く */
.roadmap__point {
  position: absolute;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
}
.roadmap__node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px rgba(41,182,200,0.14);
}
.roadmap__node svg { width: 26px; height: 26px; color: #fff; }

/* 見出し（円の上）／テキスト（円の下）。枠は付けない */
.roadmap__head {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  transform: translateX(-50%);
  width: 175px;
  text-align: center;
}
.roadmap__head strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.roadmap__head span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 0.15rem;
}
.roadmap__text {
  position: absolute;
  top: calc(100% + 0.7rem);
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin: 0;
}

/* ティール／グリーンを交互に */
.roadmap__point--teal  .roadmap__node { background: #29b6c8; box-shadow: 0 0 0 6px rgba(41,182,200,0.14); }
.roadmap__point--teal  .roadmap__head strong { color: #1f97a7; }
.roadmap__point--green .roadmap__node { background: #6cbf4b; box-shadow: 0 0 0 6px rgba(108,191,75,0.16); }
.roadmap__point--green .roadmap__head strong { color: #57a53a; }

@media (max-width: 768px) {
  /* 曲線を隠して縦タイムラインに */
  .roadmap { max-width: none; margin-top: 1.5rem; padding-left: 1.75rem; border-left: 3px solid var(--color-border); }
  .roadmap__road { display: none; }
  .roadmap__point {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: auto;
    height: auto;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.25rem 1rem;
  }
  .roadmap__point:last-child { margin-bottom: 0; }
  .roadmap__node {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
  }
  .roadmap__head {
    grid-column: 2;
    grid-row: 1;
    position: static;
    transform: none;
    width: auto;
    left: auto;
    text-align: left;
  }
  .roadmap__text {
    grid-column: 2;
    grid-row: 2;
    position: static;
    transform: none;
    width: auto;
    left: auto;
    text-align: left;
  }
}

/* ===========================
   Program grid（training.html 研修プログラム）
   アイコン付き3列カード。破線の区切りで格子状に見せる。
=========================== */
.program-grid {
  --sep: 1px dashed #d3d6da;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.5rem;
}
.program-card {
  padding: 2.5rem 1.75rem;
  border-right: var(--sep);
  border-bottom: var(--sep);
}
/* 3列時：右端の縦線と最終行の下線を消す */
.program-grid .program-card:nth-child(3n) { border-right: none; }
.program-grid .program-card:nth-child(n+4) { border-bottom: none; }

.program-card__icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #eaf1ea;          /* 淡いグリーングレー。派手にしない */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3f5a63;              /* 単色の落ち着いたアイコン色 */
}
.program-card__icon svg {
  width: 38px;
  height: 38px;
}
.program-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.program-card__text {
  font-size: 0.85rem;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  /* 2列時の区切りを引き直す */
  .program-grid .program-card { border-right: var(--sep); border-bottom: var(--sep); }
  .program-grid .program-card:nth-child(3n) { border-right: var(--sep); }
  .program-grid .program-card:nth-child(2n) { border-right: none; }
  .program-grid .program-card:nth-child(n+4) { border-bottom: var(--sep); }
  .program-grid .program-card:nth-child(n+5) { border-bottom: none; }
  .program-card { padding: 2rem 1.25rem; }
}
@media (max-width: 480px) {
  .program-grid { grid-template-columns: 1fr; }
  .program-grid .program-card { border-right: none; border-bottom: var(--sep); }
  .program-grid .program-card:last-child { border-bottom: none; }
}

/* 2項目版（内定者研修）：2列カード、区切りは中央の縦破線のみ */
.program-grid--pair {
  grid-template-columns: repeat(2, 1fr);
}
.program-grid--pair .program-card { border-bottom: none; }
.program-grid--pair .program-card:nth-child(2n) { border-right: none; }
/* カード内のタグは中央寄せに。説明文との間隔を確保 */
.program-card .doc-tag-list {
  justify-content: center;
  margin: 1.25rem 0 0;
}
/* スキルチップ風にかっこよく */
.program-card .doc-tag-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  background: #fff;
  border: 1px solid #d7e3ef;
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  line-height: 1.4;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.program-card .doc-tag-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.program-card .doc-tag-list li:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,114,206,0.14);
}
@media (max-width: 600px) {
  .program-grid--pair { grid-template-columns: 1fr; }
  .program-grid--pair .program-card { border-right: none; border-bottom: var(--sep); }
  .program-grid--pair .program-card:last-child { border-bottom: none; }
}

/* ===========================
   Skill cards（training.html 内定者研修）
   角丸のボーダーカード。見出し前に青ドット、
   本文の下に角丸ピルのタグを左寄せで並べる。
=========================== */
.skill-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --sc-photo: none;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
/* カード右上に元のアイコンを透かしで敷く（--sc-photo 指定時のみ表示） */
.skill-card::before {
  content: '';
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 116px;
  height: 116px;
  z-index: -1;
  background: var(--sc-photo) center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
}
.skill-card__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text);
  margin-bottom: 0.9rem;
}
.skill-card__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.skill-card__text {
  font-size: 0.9rem;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}
.skill-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-card__tags li {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  line-height: 1.5;
}
/* 2列・横長版（研修プログラム） */
.skill-cards--wide {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 900px) {
  .skill-cards--wide { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .skill-cards { grid-template-columns: 1fr; margin-top: 2rem; }
}
/* スマホ：余白・見出し・透かしアイコンを引き締める */
@media (max-width: 480px) {
  .skill-card { padding: 1.5rem 1.25rem; }
  .skill-card::before { width: 88px; height: 88px; top: 0.75rem; right: 0.75rem; }
  .skill-card__title { font-size: 1.05rem; }
  .skill-card__text { font-size: 0.88rem; }
  .skill-card__tags { gap: 0.5rem; }
  .skill-card__tags li { font-size: 0.76rem; padding: 0.35rem 0.85rem; }
}

/* カードごとに元のアイコンを透かしとして割り当て（インラインSVG） */
/* コード </> */
.skill-cards:not(.skill-cards--wide) .skill-card:nth-child(1),
.skill-cards--wide .skill-card:nth-child(5) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
}
/* ブリーフケース */
.skill-cards:not(.skill-cards--wide) .skill-card:nth-child(2),
.skill-cards--wide .skill-card:nth-child(1) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E");
}
/* ビル */
.skill-cards--wide .skill-card:nth-child(2) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16'/%3E%3Cpath d='M9 8h.01M13 8h.01M9 12h.01M13 12h.01M9 16h.01M13 16h.01'/%3E%3C/svg%3E");
}
/* シールド */
.skill-cards--wide .skill-card:nth-child(3) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}
/* クリップボード */
.skill-cards--wide .skill-card:nth-child(4) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M9 4H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2'/%3E%3Cpath d='M9 12h6M9 16h4'/%3E%3C/svg%3E");
}
/* レイヤー */
.skill-cards--wide .skill-card:nth-child(6) {
  --sc-photo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230072CE' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 2 7 12 12 22 7 12 2'/%3E%3Cpolyline points='2 17 12 22 22 17'/%3E%3Cpolyline points='2 12 12 17 22 12'/%3E%3C/svg%3E");
}

/* ===========================
   Business list — 番号オーバーレイ版
   （company.html「スキルマトリクスの効果」）
   大きなグレーの番号を見出しの背面に重ねる。
=========================== */
.business-list--overlay {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}
/* work.html「4つの事業」は1項目が長いので、番号の手前を広めにとる */
#work-business .business-list--overlay {
  gap: 6rem;
}
@media (max-width: 768px) {
  #work-business .business-list--overlay { gap: 4rem; }
}
.business-list--overlay .business-item {
  position: relative;
  display: block;          /* グリッドを解除して重ね配置に */
  padding-top: 2.5rem;     /* 番号が上にはみ出す分の余白 */
}
.business-list--overlay .business-item__num {
  position: absolute;
  top: 0;
  left: -0.06em;
  z-index: 0;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #e2e2e2;          /* 背面のグレー */
  pointer-events: none;
  user-select: none;
}
.business-list--overlay .business-item__body {
  position: relative;      /* 番号より前面に */
  z-index: 1;
}
/* 直下の見出し・リード文のみ対象（入れ子の .doc-prose には影響させない） */
.business-list--overlay .business-item__body > h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 0.85rem;
}
.business-list--overlay .business-item__body > p {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .business-list--overlay .business-item { padding-top: 2rem; }
  .business-list--overlay .business-item__num { font-size: 3.5rem; }
  .business-list--overlay .business-item__body h3 { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .business-list--overlay { gap: 2.25rem; }
  .business-list--overlay .business-item { padding-top: 1.75rem; }
  .business-list--overlay .business-item__num { font-size: 3rem; }
}

/* ===========================
   Office Gallery（company.html 最下部）
   1枚ずつ自動で切り替わるカルーセル。写真は 3:2 に統一。
=========================== */
.office-carousel {
  position: relative;
  max-width: 900px;
  margin: 2rem auto 0;
}
.office-carousel__viewport {
  position: relative;
  aspect-ratio: 3 / 2;   /* 参考ページと同じ比率でサイズ統一 */
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-accent-light);
}
.office-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.office-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.office-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 前後ボタン */
.office-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--color-accent);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: background 0.25s ease;
  z-index: 2;
}
.office-carousel__btn:hover { background: #fff; }
.office-carousel__btn--prev { left: 12px; }
.office-carousel__btn--next { right: 12px; }
/* インジケーター（ドット） */
.office-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.office-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--color-border);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.office-carousel__dot.is-active {
  background: var(--color-accent);
  transform: scale(1.2);
}

@media (max-width: 480px) {
  .office-carousel__btn { width: 36px; height: 36px; font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .office-carousel__slide { transition: none; }
}

/* 本文中の図版（company.html「評価の割合」など） */
.doc-figure {
  margin: 0 0 1.75rem;
}
.doc-figure img {
  width: 100%;
  max-width: 100%;    /* 本文カラムの幅いっぱいに表示 */
  height: auto;
  display: block;
  margin: 0 auto;
}
.doc-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* 仮画像。本番画像に差し替えたら --temp を外す */
.doc-figure--temp {
  margin: 1.75rem 0;
}
.doc-figure--temp img {
  aspect-ratio: 21 / 9;   /* 横長。縦を抑えて本文の流れを切らない */
  object-fit: cover;
  border-radius: 4px;
}

/* 画像が未確定の枠。img を入れたら --placeholder を外す */
.doc-figure--placeholder {
  margin: 1.75rem 0;
}
.doc-figure__placeholder {
  aspect-ratio: 21 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border: 2px dashed #d8d8d8;
  border-radius: 4px;
  background: #fafafa;
  color: #bbb;
}
.doc-figure__placeholder svg {
  width: 52px;
  height: 52px;
  opacity: 0.4;
}
.doc-figure__placeholder p {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #bbb;
}

.doc-prose p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  max-width: 820px;
}
.doc-prose p:last-child { margin-bottom: 0; }
.doc-tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1.5rem;
}
.doc-tag-list li {
  font-size: 14px;
  color: var(--color-text-muted);
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  line-height: 1.6;
}
.doc-linkout {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 14px;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 1px;
  transition: opacity var(--transition);
}
.doc-linkout:hover { opacity: 0.65; }
/* プロダクト各項目（work.html）。見出しの手前を広めにとる */
.doc-subsec { margin-top: 6rem; }
/* 1つ目（feels）は前セクションの余白があるので詰める */
.doc-subsec:first-of-type { margin-top: 0; }
@media (max-width: 768px) {
  .doc-subsec { margin-top: 4rem; }
}

/* おやこもの作りたいけんも同じだけ手前を空ける */
#work-oyako { padding-top: 2rem; }

/* ===========================
   Interview pages
=========================== */
.interview {
  /* 会社を知る等の本文カラム(896px)に実効幅を合わせる。
     左右 padding 2rem×2=64px を足して 960px */
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
}
.iv-profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}
.iv-photo {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-accent-light);
}
.iv-photo img { width: 100%; height: 100%; object-fit: cover; }
.iv-catch {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin-bottom: 1.75rem;
}
.iv-name { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.iv-tag { font-size: 0.85rem; color: var(--color-primary); font-weight: 500; margin-bottom: 0.75rem; }
.iv-role { font-size: 0.88rem; color: var(--color-text-muted); font-weight: 400; line-height: 1.7; }

.iv-block { margin-bottom: 4.5rem; }
.iv-block__title {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.iv-block--accent {
  background: var(--color-accent-light);
  border-radius: 4px;
  padding: 3rem 2.5rem;
}
.iv-block--accent .iv-block__title { border-color: rgba(0,0,0,0.08); }
.iv-figure { margin: 0 0 2rem; border-radius: 4px; overflow: hidden; }
.iv-figure img { width: 100%; display: block; }
.iv-qa { margin-bottom: 2rem; }
.iv-qa:last-child { margin-bottom: 0; }
.iv-qa h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}
.iv-qa p {
  font-size: 0.92rem;
  color: var(--color-text);
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
}

/* timeline (career plan / daily schedule) */
.iv-timeline { display: flex; flex-direction: column; }
.iv-tl-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}
.iv-timeline .iv-tl-row:first-child { border-top: none; }
.iv-timeline .iv-tl-row:last-child { border-bottom: 1px solid var(--color-border); }
.iv-tl-when {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 0.03em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding-top: 0.1rem;
}
.iv-tl-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.iv-tl-when .iv-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  margin-left: 0;
  vertical-align: middle;
  letter-spacing: 0.04em;
}
.iv-badge--now {
  background: #e8f4ff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.iv-badge--future {
  background: #fff8e8;
  color: #c07800;
  border: 1px solid #e8a020;
}
.iv-tl-body { font-size: 0.88rem; color: var(--color-text-muted); font-weight: 400; line-height: 2.0; letter-spacing: 0.02em; }
.iv-tl-body ul { list-style: none; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.iv-tl-body ul li { font-size: 14px; padding-left: 1rem; position: relative; }
.iv-tl-body ul li::before { content: '–'; position: absolute; left: 0; color: var(--color-primary); }

/* ===========================
   Dark timeline variant（1日のスケジュール）
=========================== */
.iv-timeline--dark {
  padding: 0 2.5rem;
  position: relative;
}
.iv-timeline--dark .iv-tl-row {
  grid-template-columns: 64px 1fr;
  gap: 0;
  border-top: none;
  padding: 0;
  align-items: stretch;
}
.iv-timeline--dark .iv-tl-row:last-child { border-bottom: none; }

.iv-timeline--dark .iv-tl-when {
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: right;
  padding-right: 1.5rem;
  padding-top: 2rem;
  position: relative;
}
.iv-timeline--dark .iv-tl-when::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}
.iv-timeline--dark .iv-tl-when::before {
  content: '';
  position: absolute;
  right: -4px;
  top: calc(2rem + 0.45rem);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  z-index: 1;
}

.iv-timeline--dark .iv-tl-body {
  padding: 1.75rem 0 1.75rem 2rem;
  font-size: 0.875rem;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
.iv-timeline--dark .iv-tl-title {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
.iv-timeline--dark .iv-tl-title small {
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  .iv-timeline--dark { padding: 0 1.5rem; }
  .iv-timeline--dark .iv-tl-row { grid-template-columns: 52px 1fr; }
  .iv-timeline--dark .iv-tl-when { font-size: 0.82rem; padding-right: 1rem; }
  .iv-timeline--dark .iv-tl-body { padding-left: 1.5rem; }
}
@media (max-width: 480px) {
  .iv-timeline--dark { padding: 0 1rem; }
  .iv-timeline--dark .iv-tl-row { grid-template-columns: 44px 1fr; }
  .iv-timeline--dark .iv-tl-when { font-size: 0.75rem; padding-right: 0.75rem; }
  .iv-timeline--dark .iv-tl-body { padding-left: 1.25rem; }
}

/* related members with photo */
.member-card__photo { height: 220px; overflow: hidden; background: var(--color-accent-light); }
.member-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.5s ease; }
.member-card:hover .member-card__photo img { transform: scale(1.05); }
.member-card__more {
  margin-top: 0.75rem;
  font-size: 14px;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 1px;
  align-self: flex-start;
}

/* ===========================
   Member card — portrait 版（people.html「ともに働く仲間に会ってみよう」）
   TOP の .mcard と同じ見た目に揃える。
   写真は 300 / 485 の縦長、その下に白フッターで名前・役職。
   詳細は写真上にホバーでオーバーレイ表示（横スクロールはしない）。
=========================== */
.member-card--portrait {
  position: relative;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

/* 写真：TOP と同じ縦横比。カード全面ではなく通常フローに戻す */
.member-card--portrait .member-card__photo {
  position: relative;
  width: 100%;
  height: auto;            /* 220px 固定を解除 */
  aspect-ratio: 300 / 485;
  flex-shrink: 0;
  overflow: hidden;
}
.member-card--portrait .member-card__photo picture { display: block; width: 100%; height: 100%; }
.member-card--portrait .member-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* 詳細：写真の上にホバーで重ねる（TOP の .mcard__hover と同じ） */
.member-card--portrait .member-card__hover {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 60, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.member-card--portrait:hover .member-card__hover { opacity: 1; }
.member-card--portrait .member-card__hover p {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: 0.02em;
  text-align: center;
  margin: 0;
}

/* 下部の白フッター（名前 → 役職を中央表示） */
.member-card--portrait .member-card__body {
  position: static;
  display: block;
  flex: none;
  padding: 1.25rem;
  background: #fff;
  text-align: center;
  box-shadow: none;
}
.member-card--portrait .member-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.member-card--portrait .member-card__role {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 0.35rem;
}

@media (max-width: 768px) {
  .interview { padding: 3.5rem 1.5rem 4.5rem; }
  .iv-profile { grid-template-columns: 1fr; gap: 1.75rem; }
  .iv-photo { max-width: 260px; margin: 0 auto; }
  .iv-block { margin-bottom: 3.5rem; }
  .iv-block--accent { padding: 2rem 1.25rem; }
  .iv-tl-row { grid-template-columns: 72px 1fr; gap: 0.875rem; }
  .iv-name { font-size: 1.15rem; }
}
@media (max-width: 480px) {
  .interview { padding: 2.5rem 1rem 3.5rem; }
  .iv-photo { max-width: 220px; }
  .iv-tl-row { grid-template-columns: 60px 1fr; gap: 0.75rem; }
}

/* ===========================
   Doc layout — Responsive
=========================== */
@media (max-width: 900px) {
  .doc {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    max-width: 100%;
  }
  /* レスポンシブ時はサイドメニュー（Contents）を非表示 */
  .doc__side { display: none; }
  .side-nav__label { display: none; }
  .side-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav ul {
    flex-direction: row;
    gap: 0;
    padding: 0 1rem;
    width: max-content;    /* 内容幅を確保してスクロール可能に */
    min-width: 100%;       /* 項目が少ない場合は幅いっぱいに */
    overflow-x: visible;
    scrollbar-width: none;
    margin: 0;
  }
  .side-nav a {
    white-space: nowrap;
    padding: 0.95rem 1.1rem;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .side-nav a:hover { border-left: none; }
  .side-nav a.active {
    border-left: none;
    border-bottom-color: var(--color-primary);
  }
  .doc__body { padding: 3rem 1.25rem 4rem; }
  .doc__body > * { max-width: 100%; }
  .doc-sec {
    padding-bottom: 4rem;
    scroll-margin-top: calc(var(--header-h) + 56px);
  }
  /* 横スクロールサイドバーの高さぶんも見込む */
  .doc-subhead {
    scroll-margin-top: calc(var(--header-h) + 56px);
  }
}

@media (max-width: 480px) {
  .doc__body { padding: 2.5rem 1rem 3.5rem; }
  .doc-sec { padding-bottom: 3rem; }
  .flow__scroll { margin: 0 -1rem; padding: 0 1rem 0.5rem; }
}

/* ===========================
   Casual meeting (jobs.html)
=========================== */
.casual {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3.5rem;
  align-items: center;
}
.casual__lead {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}
.casual__points {
  list-style: none;
  margin: 1.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.casual__points li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.6;
}
.casual__points li::before {
  content: '';
  position: absolute;
  left: 2px; top: 0.6em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: translateY(-50%) rotate(-45deg);
}
.casual__cta { margin-top: 2rem; }

/* 写真枠（プレースホルダー：img を差し込めば置き換わります） */
.casual__figure { margin: 0; }
.casual__photo {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.casual__photo::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  pointer-events: none;
}
.casual__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.casual__photo span {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.casual__figure figcaption {
  margin-top: 0.8rem;
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .casual { grid-template-columns: 1fr; gap: 2rem; }
  .casual__photo { aspect-ratio: 16 / 10; }
  .casual__figure { order: -1; }
}

/* ===========================
   Growth Step Flow (成長のステップ)
   training.html イントロ直下の導線サマリー
=========================== */
.stepflow {
  margin-top: 2.75rem;
  max-width: 900px;
}
.stepflow__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
}
.stepflow__grid::before {
  content: "";
  position: absolute;
  top: 2.5rem;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--color-border);
  z-index: 0;
}
.stepflow__card {
  position: relative;
  z-index: 1;
  display: block;
  background: var(--color-bg);
  border: 1px solid #c4c4cc;   /* 枠線を少し濃いめに */
  padding: 1.6rem 1.1rem 1.35rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.stepflow__card:hover,
.stepflow__card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(0, 63, 128, 0.08);
}
.stepflow__tag {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-accent-light);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.stepflow__name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.stepflow__period {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}
.stepflow__more {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-top: 0.9rem;
}
/* Culture カードは roadmap のティールアクセントに合わせる */
.stepflow__card--culture .stepflow__tag {
  color: #1f97a7;
  background: rgba(41, 182, 200, 0.12);
}
.stepflow__card--culture:hover,
.stepflow__card--culture:focus-visible { border-color: #29b6c8; }
.stepflow__card--culture .stepflow__more { color: #1f97a7; }

@media (max-width: 768px) {
  .stepflow { max-width: none; }
  .stepflow__grid { grid-template-columns: repeat(2, 1fr); }
  .stepflow__grid::before { display: none; }
}
@media (max-width: 460px) {
  .stepflow__grid { grid-template-columns: 1fr; }
}

/* ===========================
   Media Row (各コンテンツに写真を1枚ずつ)
=========================== */
.media-list { margin-top: 2.5rem; }
.media-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.media-list .media-row:first-child { border-top: 1px solid var(--color-border); }
.media-row__photo {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-accent-light);
}
.media-row__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.media-row__body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}
.media-row__body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 2.0;
  letter-spacing: 0.02em;
}
@media (max-width: 640px) {
  .media-row { grid-template-columns: 1fr; gap: 1rem; }
}

/* 福利厚生：アイコン枠の代わりに写真を表示 */
.welfare-list--photo .welfare-item {
  grid-template-columns: 220px 1fr;   /* 成長を支える教育制度（media-row）と同じ */
  gap: 1.75rem;
  align-items: center;
}
.welfare-item__photo {
  margin: 0;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-accent-light);
}
.welfare-item__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}
.welfare-item__photo:hover img { transform: scale(1.05); }
@media (max-width: 600px) {
  .welfare-list--photo .welfare-item { grid-template-columns: 1fr; gap: 1rem; }
}

/* ===========================
   About Intro (work.html「AMG Solutionとは」本文の右に写真)
=========================== */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.75rem;
  align-items: start;
}
.about-intro__photo { margin: 0; }
.about-intro__photo img { aspect-ratio: 4 / 5; border-radius: 4px; }  /* 縦長にして本文の右に収める／角丸はメンバーカードと同じ4px */  /* 縦長にして本文の右に収める／角丸はメンバーカードと同じ4px */
.about-intro--compact { margin-top: 4.5rem; }                            /* フォロー体制ブロックの上に余白 */
.about-intro--compact .about-intro__photo img { aspect-ratio: 16 / 9; }  /* 短い本文向けの横長（縦幅を抑える） */
.about-intro--compact .about-intro__photo { margin-top: 2rem; }          /* 少し下げる */

/* 評価セクションの小見出し（評価の割合／スキルマトリクス／効果）の上に少し余白 */
#company-evaluation .doc-subhead { margin-top: 3.5rem; }

/* 4つの事業：各事業内の小見出しの上に少し余白 */
.business-item__body .doc-subhead { margin-top: 4rem; }

/* company.html メッセージ右：仮の写真（引用カードの代わり） */
.message-block__photo {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--color-accent-light);
}
.message-block__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* 評価の割合チャート：最大幅を制限して中央寄せ */
.doc-figure--eval { max-width: 620px; margin-left: auto; margin-right: auto; }

/* ===========================
   Doc セクション交互背景（白 / #f2f2f0）
   .doc に .doc--striped を付けたページのみ適用
=========================== */
.doc--striped .doc__body .doc-sec {
  padding: 3.5rem 2rem;
  margin-bottom: 0;
}
.doc--striped .doc__body .doc-sec:last-child { padding-bottom: 3.5rem; }
/* 最後のセクション（色帯）の下に出る白い余白を無くし、そのままCTAへ続ける */
.doc--striped { padding-bottom: 0; }

/* people.html：交互背景を個別に上書き（多様なバックグラウンド=薄グレー / ともに働く仲間=白） */
#people-team {
  background: #f2f2f0;
  box-shadow: 0 0 0 100vw #f2f2f0;
  clip-path: inset(0 -100vw);
  /* 真上の .doc 上パディング（5rem・白）も帯で埋める（見出し位置は維持） */
  margin-top: -5rem;
  padding-top: 8.5rem;   /* 3.5rem(通常) + 5rem(引き上げ分) */
}
#people-interview {
  background: transparent;
  box-shadow: none;
  clip-path: none;
}
.doc--striped .doc__body .doc-sec:nth-of-type(even) {
  background: #f2f2f0;
  /* 横幅いっぱいに色を伸ばす（左右のサイドナビ/余白を越えて全幅に） */
  box-shadow: 0 0 0 100vw #f2f2f0;
  clip-path: inset(0 -100vw);
}
@media (max-width: 768px) {
  .doc--striped .doc__body .doc-sec { padding: 2.5rem 1.25rem; }
}
/* サブ項目アンカー（例: #work-products）へのジャンプ時、固定ヘッダーで隠れないように */
.doc-subsec[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
/* 事業04（プロダクト・サービス事業）と最初のプロダクト（feels）の間隔を詰める */
#work-products { margin-top: 4rem; }
/* 教育・研修：研修プログラム見出しの上に少し余白 */
#training-program { margin-top: 4.5rem; }
/* 教育・スキルアップ制度：資格取得報奨金制度（先頭カード）の透かしアイコンを少し小さく */
#training-education .feature-card:first-child .feature-card__icon { width: 92px; height: 92px; }

/* ===========================
   パーパス／ビジョン（コーポレートサイト準拠：左=ラベル / 右=本文の2カラム）
=========================== */
.mv-block {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding: 7.3rem 0 3.5rem;   /* 上に余白 */
}
.mv-block + .mv-block { border-top: 1px solid var(--color-border); }
.mv-block__en {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.mv-block__ja {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text);
}
.mv-block__catch {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.mv-block__catch-en {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 1rem;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.mv-block__desc { margin-top: 2.5rem; }
.mv-block__desc p {
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
@media (max-width: 768px) {
  .mv-block { grid-template-columns: 1fr; gap: 1.5rem; }
  .mv-block__desc { margin-top: 1.75rem; }
}
@media (max-width: 768px) {
  .about-intro { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-intro__photo img { aspect-ratio: 16 / 9; }
}

/* ===========================
   Contact form (contact.html)
   タブは .job-tabs、確認画面の表は .jobs-table のルールを共有している。
=========================== */
.contact {
  padding: 4.5rem 2rem 6rem;
}
.contact__inner {
  max-width: 720px;
  margin: 0 auto;
}
.contact__lead {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 2.0;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
}

.contact__notice {
  font-size: 0.875rem;
  line-height: 1.9;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  background: var(--color-accent-light);
  margin-bottom: 2rem;
}
.contact__notice--warn {
  background: #fff8e6;
  border-left: 3px solid #d99a00;
}
.contact__notice--error {
  background: #fdeaea;
  border-left: 3px solid #c01010;
  color: #8f0d0d;
  /* JS が \n 区切りで複数行のメッセージを入れるため、ここだけ改行を活かす */
  white-space: pre-line;
}

/* ボットよけ。人の目にもスクリーンリーダーにも触れさせない */
.contact-hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- 入力項目 ---- */
.cgroup { margin: 0; padding: 0; border: none; }

.cfield {
  margin-bottom: 2rem;
  border: none;
  padding: 0;
  min-width: 0; /* fieldset が親幅を超えないようにする */
}
.cfield__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  padding: 0;
}
/* display 指定はブラウザ標準の [hidden] を上書きしてしまうため、明示的に打ち消す
   （ご質問・ご要望の必須バッジは JS が hidden 属性で出し分けている） */
.cfield__req[hidden] { display: none; }

.cfield__req {
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #fff;
  background: #c01010;
  border-radius: 2px;
  vertical-align: 1px;
}
.cfield__hint {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}
.cfield__error {
  font-size: 0.8rem;
  line-height: 1.8;
  color: #c01010;
  margin-top: 0.4rem;
}
.cfield__error:empty { display: none; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form textarea {
  resize: vertical;
  min-height: 8rem;
}
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23666666' stroke-width='1.5'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  cursor: pointer;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.12);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #b0b0b0;
}

/* エラーになった項目 */
.cfield--error input[type="text"],
.cfield--error input[type="email"],
.cfield--error input[type="tel"],
.cfield--error select,
.cfield--error textarea {
  border-color: #c01010;
  background: #fffafa;
}

/* ---- ラジオ / チェックボックス ---- */
.cfield__choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cchoice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.7;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.cchoice:hover { border-color: var(--color-primary); }
.cchoice input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.3rem;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.cchoice:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-accent-light);
}
.cchoice small {
  display: block;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}
.cfield--error .cchoice { border-color: #c01010; }

/* ---- 個人情報の取り扱い ---- */
.contact-privacy {
  margin: 3rem 0 2.5rem;
  padding: 1.75rem;
  background: #f7f7f5;
  border-radius: 6px;
}
.contact-privacy__text {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}
.contact-privacy__text a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cchoice--agree {
  background: #fff;
  font-weight: 500;
  align-items: center;
}
.cchoice--agree input { margin-top: 0; }

/* ---- 送信ボタン ---- */
.contact-actions {
  text-align: center;
  padding-top: 1rem;
}
.contact-actions--confirm {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-form.is-sending {
  opacity: 0.6;
  pointer-events: none;
}
.btn--outline-dark {
  background: none;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--outline-dark:hover {
  background: var(--color-accent-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ---- 確認画面 ---- */
.contact-confirm td {
  white-space: pre-wrap;   /* 複数行で入力された値の改行を保つ */
  word-break: break-word;
}
.contact-confirm__empty {
  color: #b0b0b0;
  font-size: 0.85rem;
}

/* ===========================
   Thanks (thanks.html)
=========================== */
.thanks {
  padding: calc(var(--header-h) + 5rem) 2rem 6rem;
  text-align: center;
}
.thanks__inner {
  max-width: 680px;
  margin: 0 auto;
}
.thanks__icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 2rem;
  color: var(--color-primary);
}
.thanks__icon svg { width: 100%; height: 100%; }
.thanks .page-hero__en { color: var(--color-primary); }
.thanks__title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
}
.thanks__lead {
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}
.thanks__lead strong { color: var(--color-text); font-weight: 600; }

.thanks__note {
  margin: 3.5rem 0;
  padding: 2rem;
  background: #f7f7f5;
  border-radius: 6px;
  text-align: left;
  font-size: 0.875rem;
  line-height: 2.0;
  color: var(--color-text-muted);
}
.thanks__note-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.85rem;
}
.thanks__note ul {
  margin: 0.85rem 0 0.85rem 1.25rem;
  padding: 0;
}
.thanks__note li { margin-bottom: 0.25rem; }
.thanks__note code {
  font-size: 0.85em;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
}
.thanks__note a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.thanks__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .contact { padding: 3rem 1.5rem 4.5rem; }
  .contact__lead { margin-bottom: 2.25rem; }
  .cfield { margin-bottom: 1.75rem; }
  .contact-privacy { padding: 1.25rem; }
  .contact-actions--confirm .btn { width: 100%; }

  /* 確認画面の表は縦積みにして狭い画面でも読めるようにする */
  .contact-confirm,
  .contact-confirm tbody,
  .contact-confirm tr,
  .contact-confirm th,
  .contact-confirm td { display: block; width: auto; }
  .contact-confirm tr { border-bottom: 1px solid var(--color-border); }
  .contact-confirm th {
    border-bottom: none;
    padding: 0.85rem 1rem 0.35rem;
    background: none;
    white-space: normal;
    color: var(--color-text);
  }
  .contact-confirm td { border-bottom: none; padding: 0 1rem 0.85rem; }

  .thanks { padding: calc(var(--header-h) + 3rem) 1.5rem 4.5rem; }
  .thanks__note { padding: 1.5rem; margin: 2.5rem 0; }
  .thanks__actions .btn { width: 100%; }
}

/* ---- サーバー診断情報（send.php の DEBUG_OUTPUT が true のときだけ表示） ---- */
.contact-debug {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  border-left: 3px solid #d99a00;
  margin-bottom: 2rem;
  overflow-x: auto;
  white-space: pre;
}
