:root {
  color-scheme: light;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #1a1a1a;
  --color-accent-contrast: #ffffff;
  --color-border: #e3e3e0;
  --color-header-bg: rgba(255, 255, 255, 0.92);
  --color-success-bg: #eaf7ee;
  --color-success-text: #1e6b34;
  --color-error-bg: #fdecec;
  --color-error-text: #b3261e;
  --color-highlight: #3f6b4a;
  --color-highlight-soft: #e5efe7;
  --color-highlight-contrast: #ffffff;
  --color-info-bg: #eaf1fb;
  --color-info-text: #1e4e8c;
  --max-width: 1080px;
  --radius: 6px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #15171b;
  --color-bg-alt: #1d2025;
  --color-surface: #1d2025;
  --color-text: #edeef0;
  --color-text-muted: #a3a9b1;
  --color-accent: #edeef0;
  --color-accent-contrast: #15171b;
  --color-border: #2e323a;
  --color-header-bg: rgba(21, 23, 27, 0.92);
  --color-success-bg: #133423;
  --color-success-text: #6ee2a0;
  --color-error-bg: #3a1a18;
  --color-error-text: #ff9a90;
  --color-highlight: #7bbf8f;
  --color-highlight-soft: #1e2f24;
  --color-highlight-contrast: #15171b;
  --color-info-bg: #16223a;
  --color-info-text: #8fb8ef;
}

/* ページ別イメージカラー: 開発実績=青系, 提供サービス=緑系(既定), 会社情報=暖色系 */

[data-page-theme="blue"] {
  --color-highlight: #2f5fa8;
  --color-highlight-soft: #e6edf7;
  --color-highlight-contrast: #ffffff;
}

[data-page-theme="warm"] {
  --color-highlight: #b5651d;
  --color-highlight-soft: #f7ece0;
  --color-highlight-contrast: #ffffff;
}

[data-page-theme="games"] {
  --color-highlight: #9d3fd9;
  --color-highlight-soft: #f3e6fb;
  --color-highlight-contrast: #ffffff;
}

[data-theme="dark"][data-page-theme="blue"] {
  --color-highlight: #8fb4e8;
  --color-highlight-soft: #1c2740;
  --color-highlight-contrast: #15171b;
}

[data-theme="dark"][data-page-theme="warm"] {
  --color-highlight: #e0a06a;
  --color-highlight-soft: #3a2a1a;
  --color-highlight-contrast: #15171b;
}

[data-theme="dark"][data-page-theme="games"] {
  --color-highlight: #d38cf5;
  --color-highlight-soft: #2e1c3a;
  --color-highlight-contrast: #15171b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html[data-font-size="sm"] {
  font-size: 87.5%;
}

html[data-font-size="lg"] {
  font-size: 112.5%;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a,
.hero-title,
.section-title,
.card-title,
.timeline-title,
.cta-banner-title {
  font-family: "M PLUS 1p", "Noto Sans JP", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

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

.container-narrow {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

a {
  color: inherit;
}

/* Skip link */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--color-highlight);
  color: var(--color-highlight-contrast);
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(21, 23, 27, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #2e323a;
  color: #edeef0;
  --color-text: #edeef0;
  --color-text-muted: #a3a9b1;
  --color-border: #2e323a;
  --color-highlight: #7bbf8f;
}

[data-page-theme="blue"] .site-header {
  --color-highlight: #8fb4e8;
}

[data-page-theme="warm"] .site-header {
  --color-highlight: #e0a06a;
}

[data-page-theme="games"] .site-header {
  --color-highlight: #d38cf5;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 0;
  row-gap: 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "M PLUS 1p", "Noto Sans JP", sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: lowercase;
}

html[lang="en"] .logo {
  font-size: 1.6rem;
}

.logo-mark-img {
  display: block;
  height: 36px;
  width: auto;
}

.logo-mark-wrap {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 36px;
}

.logo-mark-wrap .logo-mark-img {
  position: absolute;
  top: 0;
  left: 0;
}

.logo-mark-mono {
  opacity: 1;
  animation: logo-mono-cycle 30s ease-in-out infinite;
}

@keyframes logo-mono-cycle {
  0% {
    opacity: 1;
  }
  6% {
    opacity: 0;
  }
  97% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark-mono {
    animation: none;
    opacity: 0;
  }
}

.logo-mark-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 36px;
  pointer-events: none;
  -webkit-mask-image: url("../img/logo-mark.webp");
  mask-image: url("../img/logo-mark.webp");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 65%
  );
  background-size: 260% 100%;
  background-position: -160% 0;
  mix-blend-mode: screen;
  animation: logo-shine-sweep 4.5s ease-in-out infinite;
}

@keyframes logo-shine-sweep {
  0% {
    background-position: -160% 0;
  }
  18% {
    background-position: 160% 0;
  }
  100% {
    background-position: 160% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark-shine {
    animation: none;
    background-position: 160% 0;
  }
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.nav a {
  position: relative;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-bottom: 4px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-highlight);
  transition: right 0.2s ease;
}

.nav a:hover {
  color: var(--color-highlight);
}

.nav a:hover::after {
  right: 0;
}

/* 画面には出さず、読み上げ・検索エンジンには伝える見出し用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 現在のページのメニュー項目(nav.jsが付与) */
.nav a.is-current,
.nav-group-label.is-current {
  color: var(--color-highlight);
  font-weight: 700;
}

.nav a.is-current::after {
  right: 0;
}

.nav-group-label.is-current {
  border-bottom: 2px solid var(--color-highlight);
}

/* ヘッダーメニューの入れ子(「依頼」の下に開発・技術支援/研修・アドバイザリー/講演依頼) */
.nav-group {
  position: relative;
}

.nav-group-label {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  padding-bottom: 4px;
  cursor: default;
}

.nav-group-label::after {
  content: " \25BE";
  font-size: 0.75em;
}

.nav-group:hover .nav-group-label,
.nav-group:focus-within .nav-group-label {
  color: var(--color-highlight);
}

.nav-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  z-index: 20;
  min-width: 220px;
  padding: 8px 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nav-group:hover .nav-sub,
.nav-group:focus-within .nav-sub {
  display: flex;
  flex-direction: column;
}

.nav-group:last-of-type .nav-sub {
  left: auto;
  right: -12px;
}

.nav-sub a {
  padding: 10px 18px;
}

.nav-sub a::after {
  display: none;
}

.pref-toggles {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pref-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pref-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pref-btn:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 4px;
    order: 3;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--color-border);
  }

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

  .nav a {
    padding: 10px 4px;
  }

  /* スマホでは「依頼」の下の3ページを常に展開して縦に並べる */
  .nav-group-label {
    padding: 10px 4px 4px;
    cursor: default;
  }

  .nav-group-label::after {
    content: "";
  }

  .nav-sub {
    display: flex;
    flex-direction: column;
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
}

/* Hero */

.hero {
  padding: 120px 0 96px;
  background: var(--color-bg-alt);
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-highlight-contrast);
  background: var(--color-highlight);
  padding: 6px 16px;
  border-radius: 999px;
  margin: 0 0 24px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 24px;
  letter-spacing: 0.02em;
}

.hero-lead {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 640px;
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.hero-stat {
  min-width: 120px;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: background-color 0.15s ease;
}

.hero-stat:hover {
  background-color: var(--color-bg-alt);
}

.hero-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-highlight);
  margin: 0;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

/* Hero carousel */

.hero-carousel {
  position: relative;
  background: var(--color-bg-alt);
  padding: 24px 0 24px;
}

.carousel-viewport {
  max-width: 1120px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 14px;
  padding: 16px 32px 36px;
}

.carousel-slide {
  flex: 0 0 260px;
  width: 260px;
  min-height: 320px;
  scroll-snap-align: start;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.carousel-slide-inner {
  max-width: 100%;
  margin: 0 auto;
}

.carousel-slide-message {
  flex-basis: 100%;
  width: 100%;
  min-height: 380px;
}

.hero-carousel + .section {
  padding-top: 48px;
}

.carousel-slide-message .hero-title {
  display: inline-block;
  font-size: clamp(1.25rem, 3.4vw, 1.75rem);
  text-wrap: balance;
  letter-spacing: 0;
  color: var(--color-highlight-contrast);
  background: var(--color-highlight);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 16px;
}

.carousel-slide-message .hero-lead {
  font-size: 1rem;
  max-width: 34em;
  margin: 0 auto 24px;
  text-wrap: balance;
}

.carousel-slide-work {
  flex-basis: 290px;
  width: 290px;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
}

.carousel-slide-stats .hero-stats {
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 0;
  border-top: none;
}

.carousel-slide-stats .hero-stat {
  min-width: 0;
}

.carousel-work-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.carousel-work-image {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

/* トップのカルーセルのカード(3D Print Viewer以外): サービス名を上、画像を下。角丸・グレー系の縁・影 */
.carousel-slide-work--titled {
  border: 1px solid #b8bec6;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.14);
}

[data-theme="dark"] .carousel-slide-work--titled {
  border-color: #4a505a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.carousel-work-title {
  margin: 0;
  padding: 10px 14px 8px;
  font-size: 1rem;
  text-align: center;
}

.carousel-work-image--flyer {
  aspect-ratio: 1055 / 1491;
  height: auto;
  object-fit: cover;
  object-position: top center;
}

.carousel-work-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 100%;
  margin: 0;
  padding: 20px 22px 24px;
  text-align: left;
  gap: 8px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 2;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.carousel-nav:hover {
  border-color: var(--color-highlight);
  color: var(--color-highlight);
}

.carousel-prev {
  left: max(12px, calc(50% - 620px));
}

.carousel-next {
  right: max(12px, calc(50% - 620px));
}

.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 4px 0 28px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--color-border);
  cursor: pointer;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.carousel-dot.is-active {
  width: 22px;
  background: var(--color-highlight);
}

@media (max-width: 640px) {
  .carousel-nav {
    display: none;
  }

  .hero-carousel {
    padding: 16px 0 16px;
  }

  .carousel-track {
    gap: 12px;
    padding: 12px 16px 28px;
  }

  .carousel-slide {
    flex-basis: 68vw;
    width: 68vw;
    min-height: 280px;
    padding: 28px 22px;
  }

  .carousel-slide-message {
    flex-basis: 100%;
    width: 100%;
    min-height: 340px;
  }
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 14px 36px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.btn-outline {
  background: transparent;
  color: var(--color-highlight);
  border-color: var(--color-highlight);
}

/* Sections */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 12px;
  text-align: center;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 48px;
  font-size: 0.9375rem;
}

/* Service cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* カードが2枚のときは、左に寄らず中央に並べる */
.cards--pair {
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
}

@media (max-width: 860px) {
  .cards,
  .cards--pair {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--color-highlight);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .card:hover {
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
}

.card-placeholder {
  border-style: dashed;
  border-width: 2px;
  border-color: var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  color: var(--color-text-muted);
}

.card-placeholder:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-highlight);
}

.card-placeholder .badge {
  margin-bottom: 16px;
}

.card-screenshot {
  display: block;
  margin: -32px -28px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.card-screenshot img,
.card-screenshot video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

/* ライセンス提供カードのチラシ画像: 縦長A4(1055x1491)の比率に揃える(2026-09-30、ユーザー指示) */
/* 開発実績の一覧カード: サービス名をカード上部に置き、画像はその下に(2026-09-30、ユーザー指示) */
.card-screenshot--under-title {
  margin: 0 -28px -32px;
  border-radius: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: none;
}

/* 開発実績の一覧カード: 角丸・グレー系の縁・影(2026-09-30、ユーザー指示) */
.card--work {
  border: 1px solid #b8bec6;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.14);
  overflow: hidden;
}

.card--work .card-title {
  text-align: center;
}

.card--work:hover {
  border-color: #b8bec6;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.22);
}

[data-theme="dark"] .card--work {
  border-color: #4a505a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .card--work:hover {
  border-color: #4a505a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.65);
}

/* 一覧カードのサービス名はリンク(カード全体がクリック領域)。見た目は通常のタイトルのまま */
.card-title a.stretched-link {
  color: inherit;
  text-decoration: none;
}

.card-screenshot--flyer img {
  /* チラシは縦長A4の枠に収める。A4より縦長の画像は上を基準に下を切る(表示崩れの防止) */
  aspect-ratio: 1055 / 1491;
  object-fit: cover;
  object-position: top center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--color-highlight);
  color: var(--color-highlight-contrast);
  font-weight: 700;
  font-size: 1.125rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--color-highlight);
  color: var(--color-highlight-contrast);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 14px;
}

.card-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.card-link {
  font-size: 0.8125rem;
  margin: 14px 0 0;
}

.card-link a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-highlight);
}

.card-link a:hover {
  text-decoration: underline;
}

.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.badge-active {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-past {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.badge-license {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.badge-soon {
  background: var(--color-highlight-soft);
  color: var(--color-highlight);
}

/* Timeline */

.timeline-container {
  max-width: 680px;
  margin: 0 auto;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--color-border);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 32px;
}

.timeline.is-collapsed .timeline-item:nth-child(n + 7) {
  display: none;
}

.timeline-more {
  margin: 8px 0 0;
  text-align: center;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-highlight);
}

.timeline-year {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-highlight);
  background: var(--color-highlight-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.timeline-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.timeline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--color-highlight-soft);
  color: var(--color-highlight);
}

.timeline-icon svg {
  width: 16px;
  height: 16px;
}

.timeline-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Contact form */

.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 28px;
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-size: 0.875rem;
  font-weight: 600;
}

.required {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-error-text);
  vertical-align: middle;
}

input[type="text"],
input[type="email"],
textarea,
select {
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-highlight);
}

select option {
  background: var(--color-surface);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 2px;
}

textarea {
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn {
  align-self: flex-start;
}

/* CTA banner */

.cta-banner {
  padding: 72px 0;
  background: var(--color-highlight);
  background: linear-gradient(135deg, var(--color-highlight) 0%, color-mix(in srgb, var(--color-highlight) 80%, black) 100%);
  text-align: center;
}

.cta-banner-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--color-highlight-contrast);
}

.cta-banner-lead {
  color: var(--color-highlight-contrast);
  opacity: 0.85;
  max-width: 480px;
  margin: 0 auto 28px;
  font-size: 0.9375rem;
}

.cta-banner .btn-primary {
  background: var(--color-highlight-contrast);
  color: var(--color-highlight);
}

/* Footer */

.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.footer-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 72px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

.footer-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.footer-icon svg {
  width: 20px;
  height: 20px;
}

.footer-nav a {
  position: relative;
  min-width: 0;
}

/* キャプションはマウスオーバー(キーボードフォーカス)時だけ表示する(2026-09-30、ユーザー指示) */
.footer-caption {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--color-bg);
  background: var(--color-text);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.footer-nav a:hover .footer-caption,
.footer-nav a:focus-visible .footer-caption {
  opacity: 1;
}

.footer-nav a:hover .footer-icon {
  border-color: var(--color-highlight);
  color: var(--color-highlight);
}

.footer-nav a:hover {
  color: var(--color-highlight);
}

.footer-bottom {
  text-align: center;
}

.footer-links {
  margin: 8px 0 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-text);
}

/* Simple content pages (company / privacy) */

.page-header {
  padding: 72px 0 40px;
  background: var(--color-bg-alt);
  text-align: center;
}

.page-header .section-title {
  margin-bottom: 0;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 0;
  font-size: 0.9375rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 40px 0 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.legal-content ul {
  color: var(--color-text-muted);
  padding-left: 20px;
  margin: 0 0 12px;
}

.legal-content .updated-at {
  text-align: right;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.info-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 64px;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.info-table th {
  width: 180px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
}

.info-table td {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.9;
}

.placeholder-value {
  color: var(--color-error-text);
  font-style: italic;
}

/* Profile page */

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.375rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.profile-role {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Googleサイト翻訳ウィジェット: 標準のバナー・ツールチップ・ハイライトを隠し、切り替えはヘッダーのEN/JAボタンだけにする */
#google_translate_element,
body > .skiptranslate,
.goog-te-banner-frame,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

/* ページ内リンク(#history・#representative・#contact等)で、固定ヘッダー(sticky)に
   見出しが隠れないようにする。ヘッダー高さの実測: 641px以上=65px、640px以下=2段組で約123px */
html {
  scroll-padding-top: 76px;
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 134px;
  }
}

/* トップのサービスカード: タイトルを大きく、タイトル上の余白を縮める(2026-09-30、ユーザー指示) */
#services .card-title {
  font-size: 1.375rem;
}

#services .card-screenshot {
  margin-bottom: 6px;
}

/* 会社理念(company.php) */
.philosophy-headline {
  margin: 0 0 20px;
  font-family: "M PLUS 1p", "Noto Sans JP", sans-serif;
  font-size: clamp(1.375rem, 3.6vw, 1.875rem);
  font-weight: 800;
  line-height: 1.5;
}

.philosophy-keywords {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.philosophy-keywords li {
  padding: 4px 18px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-highlight);
  border: 1px solid var(--color-highlight);
  border-radius: 999px;
}

.philosophy-text {
  margin: 0;
  text-align: left;
  color: var(--color-text-muted);
}

/* ホバーできない端末(スマホ等)ではフッターのキャプションを常時表示する */
@media (hover: none) {
  .footer-nav a {
    min-width: 72px;
  }

  .footer-caption {
    position: static;
    transform: none;
    padding: 0;
    color: var(--color-text-muted);
    background: none;
    opacity: 1;
  }
}
