/*
Theme Name: まんまる株式会社 コーポレートサイト
Author: まんまる株式会社
Author URI: https://mammaru.co.jp/
Description: まんまる株式会社のコーポレートサイト向けカスタムテーマです。
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@500;700;900&display=swap');
:root {
  --color-primary: #112b4f;
  --color-base: #f8fbff;
  --color-text: #1a202c;
  --color-text-light: #4a5568;
  --color-primary: #112b4f; /* Deeper Navy */
  --color-secondary: #0077cc; /* Vibrant Blue */
  --color-accent: #e2f0ff;
  --color-highlight: #00a8ff; /* 爽やかなライトブルー（青系の中で差別化された目を引くアクセントカラー） */
  --color-border: #e2e8f0;
  
  --font-main: 'Noto Sans JP', 'Inter', sans-serif;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-xxl: 12rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-base);
  color: var(--color-text);
  line-height: 1.8;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================================= */
/* Geometric Playful Shapes                                  */
/* ========================================================= */

.geo-shape {
  position: absolute;
  z-index: -1;
}

/* Float / Rotate Animations for background shapes */
@keyframes geo-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes geo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes geo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* Specific shapes for decorative backgrounds */
.bg-circle {
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.15; /* 可読性確保のための透過率設定 */
  top: -20vw;
  left: -20vw;
  animation: geo-pulse 15s ease-in-out infinite;
}

.bg-semi {
  width: 40vw;
  height: 20vw;
  border-radius: 0 0 40vw 40vw; /* 半円デザイン */
  background: rgba(0, 119, 204, 0.03); /* 背景に調和する透過設定 */
  top: 0;
  right: 10vw;
  animation: geo-float 10s ease-in-out infinite;
}

.bg-quarter {
  width: 30vw;
  height: 30vw;
  border-radius: 100% 0 0 0; /* 扇形デザイン */
  background: rgba(255, 107, 107, 0.03); /* 背景に調和する透過設定 */
  bottom: -5vw;
  right: -5vw;
  animation: geo-rotate 30s linear infinite;
  transform-origin: bottom right;
}

/* Service shapes for the distinct pages */
.mask-leaf { border-radius: 50% 50% 50% 0; }
.mask-drop { border-radius: 0 50% 50% 50%; }
.mask-circle { border-radius: 50%; }
.mask-semi-right { border-radius: 0 50vw 50vw 0; }
.mask-semi-left { border-radius: 50vw 0 0 50vw; }

/* Layout */
.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: var(--space-xxl) 0;
  position: relative;
}

.section-title {
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
  z-index: 10;
}

/* Playful title decoration */
.section-title::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-accent);
  z-index: -1;
  top: -20px;
  left: -30px;
  transition: transform 0.8s ease;
}

.is-visible .section-title::before {
  transform: scale(1.5);
}

.section-title span {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-secondary);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

/* Header (PC / Mobile Common base) */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================= */
/* Header & Navigation (PC Only: min-width: 769px)           */
/* ========================================================= */
@media (min-width: 769px) {
  .header {
    padding: 1.5rem 0;
  }
  
  .menu-toggle {
    display: none;
  }
  
  .header.scrolled {
    padding: 1.5rem 0 3.5rem; /* スクロール時の下部余白設定 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    /* ページ下部に丸みのデザインを適用 */
    border-bottom-left-radius: 50% 60px;
    border-bottom-right-radius: 50% 60px;
  }
  
  .header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    order: 3;
  }
  
  .logo {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    order: 1;
  }
  
  .nav {
    margin-left: auto;
    order: 2;
  }
  
  .mobile-only-link {
    display: none; /* PC時はモバイル用リンクを非表示に */
  }
  
  /* 独立したお問い合わせCTAボタン（PC時） */
  .contact-cta-btn {
    background-color: var(--color-primary);
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,43,94,0.15);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  }
  .contact-cta-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    z-index: -1;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .contact-cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 43, 94, 0.25);
    color: #fff !important;
  }
  .contact-cta-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
  }
  
  .nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-md);
    align-items: center;
  }
  
  .nav-link {
    font-size: 1.15rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    padding: 5px 0;
    display: inline-block;
  }
  
  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  
  .nav-link.nav-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 200%;
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-left: 10px;
    animation: gradientShift 15s ease infinite;
  }
  
  .nav-link.nav-btn:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 204, 0.2);
    animation-play-state: paused; /* ホバー時にアニメーションを一時停止する設定 */
  }
  
  .nav-link.nav-btn::after {
    display: none;
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-highlight);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .nav-link:hover::after {
    transform: translateX(0);
  }
}

/* Footer elements */
.footer {
  background-color: var(--color-primary);
  color: #fff;
  padding: var(--space-lg) 0 var(--space-sm);
  margin-top: var(--space-xl);
  position: relative;
  box-shadow: 0 500px 0 0 var(--color-primary); /* フッター下部の隙間を埋めるためのシャドウ設定 */
}

/* セクションと重ね合わせる丸みのあるアーチデザイン */
.footer::after {
  content: '';
  position: absolute;
  top: -150px; 
  left: -50%;  
  width: 200%; 
  height: 300px;
  background-color: var(--color-primary);
  border-radius: 50% 50% 0 0;
  z-index: 1;
}

/* フッターの下部に隙間が生じるのを防ぐ設定 */
html {
  height: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex-grow: 1;
}
.footer {
  margin-top: auto; 
  box-shadow: 0 500px 0 0 var(--color-primary); /* フッター下部の隙間を埋めるためのシャドウ設定 */
}

.footer-inner {
  position: relative;
  z-index: 3; /* フッター of カーブより前面に表示 */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-highlight);
}
.footer-logo:has(img)::before {
  display: none;
}

.footer-desc {
  color: rgba(255,255,255,0.7);
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: var(--space-sm);
}

.footer-nav a {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  padding-top: var(--space-sm);
  position: relative;
  z-index: 3;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 3.5rem;
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 60px; /* pill shape, derived from circle */
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,43,94,0.15);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background-color: var(--color-secondary);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  z-index: -1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,43,94,0.25);
  color: #fff;
}

.btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-outline {
  background-color: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}

.btn-outline::before {
  background-color: var(--color-primary);
}

/* Bold Animations */

.reveal-text {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
}
.reveal-text-inner {
  display: inline-block;
  transform: translateY(110%) rotate(5deg);
  opacity: 0;
  transform-origin: top left;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-visible .reveal-text-inner {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

/* Image reveal adapted for circle shapes */
.reveal-img {
  position: relative;
  overflow: hidden;
}
.reveal-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-secondary);
  transform: scaleY(1);
  transform-origin: top;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
  z-index: 2;
}
.reveal-img img {
  transform: scale(1.3);
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reveal-img.is-visible::after {
  transform: scaleY(0);
  transform-origin: bottom;
}
.reveal-img.is-visible img {
  transform: scale(1);
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.is-visible.fade-up, .is-visible .fade-up {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Home specific */
.hero {
  min-height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 200px;
  padding-bottom: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-xl);
}

/* ヒーロータイトルの設定 */
.hero-title {
  font-size: clamp(1.6rem, 3.8vw, 3.8rem); /* 最小値を縮小し、スマホ等での1行落ちを防止 */
  font-weight: 800;
  line-height: 1.4; /* 行間を小さく引き締め、上下の無駄な隙間を解消 */
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 10;
}

.hero-title .highlight {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
  background-size: 200% 200%;
  color: #fff;
  padding: 4px 20px;
  border-radius: 60px;
  transform: rotate(-3deg) translateY(-5px);
  margin: 15px 5px; /* 上下の余白を確保 */
  position: relative; /* 物理シャドウの基準値 */
  z-index: 1;
  animation: gradientShift 15s ease infinite;
}

/* ネイビーの楕円（カプセル）と同じ形で、ずれた位置に表示される薄い青色の物理シャドウ */
.hero-title .highlight::before {
  content: '';
  position: absolute;
  top: 8px; /* 斜め下（ずれた位置）に影を配置 */
  left: 6px;
  width: 100%;
  height: 100%;
  background: rgba(0, 119, 204, 0.25); /* 薄い青色の影 */
  border-radius: 60px; /* カプセルと全く同じ形に完璧に追従 */
  z-index: -1; /* 本体の背面に配置 */
  pointer-events: none;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  line-height: 2;
}

.hero-visual {
  position: relative;
  z-index: 10;
}

/* ヒーロー画像の円形デザイン */
.hero-visual .reveal-img {
  width: 100%;
  aspect-ratio: 1/1; /* 正円（まんまる）デザイン */
  border-radius: 50%;
  box-shadow: 0 30px 60px rgba(0,43,94,0.15);
}

/* サービスカード（円をモチーフとしたデザイン） */
.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  transform: translateY(-15px);
}

/* Each card image is a different circle fraction */
.service-card-img {
  width: 250px;
  height: 250px;
  background-color: var(--color-accent);
  overflow: hidden;
  margin-bottom: var(--space-md);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: transform 0.5s ease;
}

/* 1. Perfect Circle */
.card-shape-circle {
  border-radius: 50%;
}
/* 2. Quarter Cut (Leaf shape) */
.card-shape-leaf {
  border-radius: 50% 50% 50% 0;
}
/* 3. Drop Shape */
.card-shape-drop {
  border-radius: 50% 0 50% 50%;
}

.service-card:hover .service-card-img {
  transform: scale(1.05) rotate(5deg);
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  padding: 0 var(--space-sm);
}

.service-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.service-arrow {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform 0.5s, background 0.5s, color 0.5s;
}

.service-card:hover .service-arrow {
  background: var(--color-secondary);
  color: #fff;
  transform: translateX(10px);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 700;
  color: var(--color-primary);
}

.form-control {
  width: 100%;
  padding: 1.2rem;
  border: 2px solid transparent;
  border-radius: 30px; /* heavily rounded */
  font-family: inherit;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  background-color: var(--color-base);
}

.form-control:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--color-secondary);
  box-shadow: 0 10px 20px rgba(0, 119, 204, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 180px;
  border-radius: 20px; /* less rounded for textarea to look balanced */
}

/* News List */
.news-list {
  list-style: none;
}

.news-item {
  border-bottom: 1px dashed var(--color-border);
}

.news-link {
  display: flex;
  align-items: center;
  padding: var(--space-md) 0;
  transition: all 0.4s ease;
  position: relative;
}

/* Page Header (Subpages) */
.page-header {
  padding-top: 160px;
  padding-bottom: var(--space-xs); /* タイトルと下のセクションを近づけるための余白設定 */
  background-color: transparent;
  text-align: center;
  position: relative;
}

/* サブページにおいて、表題(page-header)のすぐ下に来るコンテンツセクションの上部余白を設定 */
.page-header + .section {
  padding-top: var(--space-md); /* すっきりした余白感にするための余白設定 */
}

.page-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.page-title::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -20px;
  width: 60px;
  height: 60px;
  background: var(--color-accent);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.6;
}

.page-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: 0.1em;
}

.news-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  width: calc(100% + 40px);
  height: 100%;
  background-color: var(--color-accent);
  border-radius: 40px; /* pill shape mask */
  opacity: 0;
  transform: scaleX(0.95);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
}

.news-link:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.news-link:hover {
  transform: translateX(10px);
}

.news-date {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-light);
  min-width: 130px;
}

.news-tag {
  font-size: 0.8rem;
  background-color: var(--color-primary);
  color: #fff;
  padding: 6px 16px;
  border-radius: 50px;
  margin-right: var(--space-md);
  font-weight: 700;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-title {
    font-size: 3rem;
  }
  .badge-float {
    left: 50%;
    transform: translateX(-50%);
    bottom: -40px;
  }
  .reveal-text-inner { transform-origin: top center; }
  .section-title::before { left: 50%; margin-left: -40px; }
}

@media (max-width: 768px) {
  :root {
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 3.5rem;
    --space-xxl: 4.5rem;
  }
  
  /* ヘッダー・ロゴ・メニューのスマホ最適化（はみ出しを100%防止するレイアウト） */
  .header {
    padding: 0.8rem 0;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .header.scrolled {
    padding: 0.6rem 0 1.8rem;
    background: rgba(255, 255, 255, 0.95) !important; /* スマホスクロール時にも白背景を適用（コンテンツの重なり・透過バグを防止） */
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    border-bottom-left-radius: 50% 24px;
    border-bottom-right-radius: 50% 24px;
  }
  .header .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important; /* 左右の余白を縮めてコンテンツ領域の横幅を最大限確保 */
    box-sizing: border-box !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .logo {
    order: 1;
    margin-right: auto;
    display: flex;
    align-items: center;
  }
  .logo img {
    width: 150px !important; /* ロゴを150pxにさらに大きくし、スマホでもしっかりとブランドを視覚アピール */
    height: auto !important;
    max-width: 150px !important;
    object-fit: contain;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 8px; /* ギャップを少し広げてバランス調整 */
    order: 2;
    margin-left: auto;
  }
  
  /* スマホ時のお問い合わせ独立CTA（PC版の配色と丸みを完全踏襲） */
  .contact-cta-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important; /* PC版のお問い合わせと同じ、深い紺と鮮やかな青のグラデーション */
    color: #fff !important;
    padding: 8px 14px !important; /* パディングを拡大し、押しやすく存在感のあるボタンに */
    border-radius: 50px !important; /* concept "まんまる" に寄り添う丸み */
    font-size: 0.8rem !important; /* 文字サイズを少し拡大 */
    font-weight: 800 !important;
    letter-spacing: 0 !important; /* 文字間を詰め、Androidでの幅太りを完全に相殺 */
    box-shadow: 0 4px 10px rgba(0, 119, 204, 0.15) !important;
    line-height: 1 !important;
    display: inline-block !important;
    order: 1;
    text-align: center;
    white-space: nowrap; /* 途中で折れないように */
  }
  
  /* スマホ時のハンバーガーボタン（コンセプト "まんまる" を踏襲した正円デザイン） */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px; /* 36pxから40pxに拡大 */
    height: 40px;
    border-radius: 50% !important; /* concept "まんまる" を踏襲した完璧な円 */
    background: var(--color-accent) !important;
    border: none;
    z-index: 200; /* 最前面 */
    cursor: pointer;
    position: relative;
    padding: 0;
    order: 2;
    box-shadow: 0 4px 8px rgba(0, 43, 94, 0.05);
    transition: background-color 0.3s ease;
  }
  .menu-toggle span {
    display: block;
    position: absolute;
    width: 20px; /* 18pxから20pxに拡大 */
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .menu-toggle span:nth-child(1) { top: 13px; }
  .menu-toggle span:nth-child(2) { top: 19px; }
  .menu-toggle span:nth-child(3) { top: 25px; }
  
  /* トグルアクティブ（開いた状態）時のアニメーション */
  .menu-toggle.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important; /* PC版のお問い合わせを踏襲したグラデーションの丸に変化 */
  }
  .menu-toggle.active span {
    background-color: #fff !important;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translate(-50%, 6px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translate(-100%, 0);
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translate(-50%, -6px) rotate(-45deg);
  }
  
  /* モバイル専用リンクを表示 */
  .mobile-only-link {
    display: block !important;
    width: 100%;
    text-align: center;
  }
  
  /* ドロワーメニューに変形（絶対にはみ出さない display: none 制御とスライドインアニメーション） */
  .nav {
    order: initial !important; /* PC時のオーダーによる配置バグを防ぐ */
    margin-left: 0 !important; /* PC時のmarginによるはみ出しを防ぐ */
    display: none; /* 通常時は非表示にし、右側への絶対的なはみ出し（スクロール揺れバグ）を100%防止 */
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(17, 43, 79, 0.98); /* 紺色（primary）に透過 */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 150;
    align-items: flex-start; /* 中央揃えから上寄せへ変更し、ハンバーガーボタンを押した親指の可動域にフィットさせる */
    justify-content: center;
    padding-top: 110px; /* 上部にマージンを取り、指が届きやすい最適な位置にメニューを寄せる */
    box-sizing: border-box !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    overflow: hidden; /* 背景のまんまる装飾がはみ出るのを防ぐ */
  }

  /* ドロワー背景用の「まんまる」コンセプトデザイン装飾（殺風景さを解消） */
  .nav::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03); /* 極薄の白円 */
    bottom: -60px;
    left: -60px;
    pointer-events: none;
    z-index: -1;
  }
  .nav::after {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(0, 168, 255, 0.04); /* 極薄のアクセントライトブルー円 */
    top: 25%;
    right: -40px;
    pointer-events: none;
    z-index: -1;
  }
  .nav.is-open {
    display: flex; /* 開いたときにのみ表示 */
    animation: drawerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  @keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
  }
  
  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.2rem;
    width: 100%;
    padding: 0 var(--space-md);
    list-style: none; /* 黒いドット表示を完全に解除 */
    list-style-type: none;
  }
  
  .nav-link {
    font-size: 1.3rem;
    color: #fff !important;
    font-weight: 700;
  }
  .nav-link::after {
    background-color: var(--color-highlight);
  }
  
  /* ドロワー内の「お問い合わせ」CTAボタン（PCのお問い合わせボタンを踏襲） */
  .nav-link.nav-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important; /* PC版のお問い合わせを踏襲したグラデーション */
    color: #fff !important;
    padding: 12px 35px;
    border-radius: 50px;
    width: 100%;
    text-align: center;
    margin: 0;
    box-shadow: 0 10px 25px rgba(0, 119, 204, 0.2);
  }
  .nav-link.nav-btn:hover {
    transform: translateY(-3px);
  }
  
  body.menu-open {
    overflow: hidden; /* スクロール防止 */
  }
  
  /* ヒーローエリアのスマホはみ出し防止 */
  .hero {
    padding-top: 130px;
    padding-bottom: 40px;
    min-height: auto;
  }
  .hero-grid {
    gap: 1.5rem !important; /* ボタンと画像の間の間延び感を解消するため、隙間をキュッと緊縮 */
  }
  .hero-title {
    font-size: 2.1rem !important; /* 1.8remから2.1remへ拡大しインパクトを強化 */
    line-height: 1.3 !important;
  }
  .hero-title .highlight {
    padding: 4px 16px;
    margin: 10px 3px;
    font-size: 1.9rem !important; /* 「まんまる」部分を1.6remから1.9remへ拡大 */
    position: relative; /* 物理シャドウの基準値 */
    z-index: 1;
    box-shadow: none !important; /* 四角い影（ブラウザバグ）を完全にリセット */
  }
  
  /* スマホ用の物理シャドウ位置調整 */
  .hero-title .highlight::before {
    content: '';
    position: absolute;
    top: 6px; /* 拡大サイズに合わせて影のずらし量を調整 */
    left: 4px;
    width: 100%;
    height: 100%;
    background: rgba(0, 119, 204, 0.2); /* 薄い青色の影 */
    border-radius: 60px; /* カプセルと全く同じ形に追従 */
    z-index: -1; /* 本体の背面に配置 */
    pointer-events: none;
  }
  .hero-subtitle {
    font-size: 1.05rem !important; /* 0.95remから1.05remへ拡大し、可読性を向上 */
    line-height: 1.8 !important;
  }
  .hero-visual .reveal-img {
    width: 300px !important; /* 260pxから300pxに拡大し、ビジュアルパワーを最大化 */
    height: 300px !important;
    margin: 0 auto !important; /* 上部マージンを0にして、gapの適正余白のみでボタンと接近させる */
  }
  
  /* セクションタイトルのスマホサイズ（h2の縮小） */
  .section-title {
    font-size: 2.2rem !important;
    margin-bottom: var(--space-lg) !important;
  }
  .section-title::before {
    width: 50px;
    height: 50px;
    top: -10px;
    left: -15px;
  }
  .section-title span {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }
  
  /* 本文とサービスカード説明文のフォントサイズ調整 */
  body {
    font-size: 0.95rem;
    line-height: 1.7;
  }
  .section p {
    font-size: 0.95rem !important;
  }
  .service-card-body p {
    font-size: 1.05rem !important; /* スマホ時のサービスカード説明文をさらに少し大きく調整 */
    line-height: 1.6 !important;
  }
  .service-card-img {
    width: 180px !important;
    height: 180px !important;
  }
  
  /* ニュースリンクの折り返し */
  .news-link { flex-direction: column; align-items: flex-start; }
  .news-date, .news-tag { margin-bottom: var(--space-xs); }
  
  /* サービスページなどのh3のスマホサイズ縮小 */
  .problem-intro-title {
    font-size: 1.4rem !important;
    margin-bottom: 2rem !important;
  }
  .problem-intro-title span {
    padding: 0.4rem 1.2rem !important;
  }
  .problem-card-text {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
  .feature-box {
    padding: 2rem 1.5rem !important;
    border-radius: 40px 0 40px 0 !important;
    margin-bottom: 3rem !important;
  }
  .feature-title {
    font-size: 1.4rem !important;
    margin-bottom: 1.5rem !important;
  }
  .feature-content {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
  }
  .benefit-card {
    padding: 2.5rem 1.5rem !important;
    border-radius: 40px !important;
  }
  .benefit-card-title {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }
  .benefit-card-text {
    font-size: 0.95rem !important;
    line-height: 1.8 !important;
  }
  
  /* フッター波（footer::after）の高さ・はみ出し量の縮小（重なり防止） */
  .footer {
    margin-top: 3.5rem !important;
  }
  .footer::after {
    top: -45px !important;
    height: 90px !important;
    border-radius: 50% 50% 0 0 !important;
  }
  
  /* 会社概要やお問い合わせコンテナ（maru-form-container）の下部余白の確保 */
  .maru-form-container {
    margin-bottom: 5rem !important;
  }

  /* Android実機等で画面外の右側へのはみ出し・横スクロール揺れを完全に防ぐための背景装飾・全体オーバーフローの抑制 */
  html, body {
    position: relative;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .bg-quarter {
    right: 0 !important; /* 画面右端より外側へのはみ出しをカット */
    opacity: 0.02 !important;
  }
  .contact-bg-1, .error-bg {
    right: -100px !important; /* はみ出し量をスマホ向けに大幅縮小（300pxからはみ出しを抑え込む） */
  }
  .geo-shape {
    max-width: 100% !important; /* 親コンテナからはみ出すことを防止 */
  }
}

/* ========================================================= */
/* Company Subpage Specific                                  */
/* ========================================================= */
.company-info-wrapper {
  background: #fff;
  padding: var(--space-xl) var(--space-lg);
  border-radius: 40px; /* まんまるらしい、大きめの丸み */
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.05);
  text-align: left;
  position: relative;
  z-index: 10;
}
@media (max-width: 768px) {
  .company-info-wrapper {
    padding: var(--space-lg) var(--space-md);
    border-radius: 24px;
  }
}

/* テーブルスタイル：重ね合わせ正円バッジデザイン */
.company-table {
  width: 100%;
  display: block; /* テーブル全体をブロック要素にして自由な配置に */
}
.company-table tbody {
  display: block;
  width: 100%;
}
.company-table tr {
  display: block;
  position: relative;
  margin-bottom: 3.5rem; /* 各行の間に縦の余白を設ける（浮遊用に少し広げる） */
  width: 100%;
}
.company-table tr:last-child {
  margin-bottom: 0;
}
.company-table th, .company-table td {
  border: none;
  display: block;
  box-sizing: border-box;
}
.company-table th {
  position: absolute;
  left: 0;
  top: -30px; /* 上にさらに持ち上げて浮遊感を強調 */
  z-index: 20;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
  background-size: 200% 200%;
  color: #fff;
  font-weight: 800;
  border-radius: 50%; /* 完璧な正円（まんまる） */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 43, 94, 0.15);
  animation: gradientShift 15s ease infinite; /* ベースでグラデーションのみ動かす（物理移動はなし） */
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  padding: 0;
}
.company-table td {
  background-color: var(--color-base); /* 薄い背景で文字を際端たせる */
  color: var(--color-text);
  border-radius: 24px; /* 緩やかな丸み */
  margin-left: 75px; /* 左端を少し空けて重なりを少なく */
  padding: 2rem 2.5rem 2rem 3.8rem; /* 内側左余白を調整しテキストが円と綺麗に離れるように */
  box-shadow: inset 0 2px 4px rgba(0, 43, 94, 0.02);
  font-weight: 500;
  min-height: 100px;
  display: flex;
  align-items: center; /* 縦方向中央に */
  line-height: 1.8;
  font-size: 1.15rem; /* 会社概要の内容テキストを大きく調整 */
}

@media (max-width: 768px) {
  .company-table tr {
    margin-bottom: 3rem;
  }
  .company-table th {
    width: 90px;
    height: 90px;
    font-size: 0.95rem;
    top: -25px; /* 上にさらに持ち上げて浮遊感を強調 */
  }
  .company-table td {
    margin-left: 60px;
    padding: 1.8rem 2rem 1.8rem 3.5rem;
    border-radius: 16px;
    min-height: 90px;
    font-size: 1.05rem !important; /* スマホ・タブレットでも会社概要の文字を大きく調整 */
  }
}

@media (max-width: 480px) {
  /* より小さなスマホでは、横の重ね合わせだと窮屈になるため縦並びにする */
  .company-table th {
    position: relative;
    top: 0;
    left: 0;
    margin: 0 auto 1rem;
    width: 80px;
    height: 80px;
    font-size: 0.9rem;
  }
  .company-table td {
    margin-left: 0;
    padding: 1.5rem;
    text-align: center;
    justify-content: center;
    border-radius: 16px;
    min-height: auto;
    font-size: 1.05rem !important; /* 極小スマホ時でも1.05remの大きさを確保 */
  }
  /* スマホの縦並びでもグラデーションシフトのみ適用 */
  .company-table tr:nth-child(n) th {
    animation: gradientShift 15s ease infinite;
  }
}

/* ========================================================= */
/* Contact / Thanks Subpage Specific                        */
/* ========================================================= */
/* まんまるらしい、丸みのあるスタイリッシュなフォームエラー警告 */
.maru-error-tip {
  color: #e53935;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-left: 110px; /* PC版のインプットの左マージンに合わせる */
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  animation: shakeError 0.4s ease-in-out;
}

.maru-input-group.has-error input,
.maru-input-group.has-error textarea,
.maru-input-group.has-error select {
  border-color: #e53935 !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.1) !important; /* 赤いソフトフォーカスリング */
}

.agree-group.has-error {
  animation: shakeError 0.4s ease-in-out;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@media (max-width: 768px) {
  .maru-error-tip {
    margin-left: 80px;
  }
}
@media (max-width: 480px) {
  .maru-error-tip {
    margin-left: 0;
    text-align: left; /* 左寄せフォームに合わせる */
  }
}

.maru-form-container {
  background: #fff;
  border-radius: 40px; /* まんまるらしい、大きめの丸み */
  padding: var(--space-xl) var(--space-lg);
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.05);
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: var(--space-md) auto var(--space-xl);
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .maru-form-container {
    padding: var(--space-lg) var(--space-md);
    border-radius: 24px;
  }
}

/* 各入力グループ：ブロック化して相対配置 */
.maru-input-group {
  display: block;
  position: relative;
  margin-bottom: 3.5rem; /* 各行の間の余白 */
  width: 100%;
}
.maru-input-group:last-of-type {
  margin-bottom: 4rem;
}

/* 表題ラベル：横長角丸（カプセル）、会社概要と同様のグラデーション */
.maru-input-label {
  position: absolute;
  left: 0;
  top: -30px; /* 上にさらに持ち上げて文字被りを防ぎ、浮遊感を強調 */
  z-index: 20;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
  background-size: 200% 200%;
  color: #fff !important; /* 強制的に白文字 */
  font-weight: 800;
  border-radius: 50px; /* 横長角丸（カプセル） */
  padding: 0.6rem 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 43, 94, 0.12);
  font-size: 1rem;
  letter-spacing: 0.1em;
  box-sizing: border-box;
  animation: gradientShift 15s ease infinite; /* グラデーションの色シフトのみ（物理移動はなし） */
}

.required-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-highlight);
  border-radius: 50%;
  margin-left: 10px;
}

/* テキストボックス：左端をさらに空け、内側パディングを大幅に増やして文字被りを100%防止 */
.maru-input-group input, 
.maru-input-group textarea, 
.maru-input-group select {
  width: calc(100% - 110px);
  margin-left: 110px;
  background: var(--color-base);
  border: 2px solid transparent;
  border-radius: 50px;
  padding: 1.5rem 2.5rem 1.5rem 7rem; /* 内側左を7rem(112px)に広げ、長いバッジとの文字被りを100%防止 */
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--color-text);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
  box-sizing: border-box;
}

.maru-input-group textarea {
  border-radius: 24px;
  min-height: 250px;
  resize: vertical;
}

.maru-input-group input:focus, 
.maru-input-group textarea:focus, 
.maru-input-group select:focus {
  background: #fff;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 8px var(--color-accent); /* Focus ring */
  outline: none;
  transform: translateY(-5px); /* Pop up slightly on focus */
}

/* 送信ボタン */
.maru-submit-container {
  display: flex;
  justify-content: center;
  margin-top: 4rem;
}

.maru-submit-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 30px 50px rgba(0,43,94, 0.15);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy transition */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.maru-submit-btn::after {
  content: '→';
  font-size: 1.8rem;
  opacity: 0.5;
  transition: all 0.3s;
}

/* PCでのみクラスでトリガーするホバー浮遊エフェクト */
.maru-submit-btn.is-hovered {
  transform: scale(1.08) translateY(-10px);
  background: var(--color-secondary);
  box-shadow: 0 40px 70px rgba(0, 119, 204, 0.25);
}
.maru-submit-btn.is-hovered::after {
  opacity: 1;
  transform: translateX(8px);
}

/* スマホ等でのタップした瞬間の沈み込み（JSによる完全制御） */
.maru-submit-btn.is-active {
  transform: scale(0.95) translateY(0);
  background: var(--color-secondary);
  transition: transform 0.1s ease;
}

/* タップ/クリック時に、自動で1回ふわっと浮き上がって滑らかに戻る一連のバウンドアニメーションクラス（PC・スマホ共通） */
.maru-submit-btn.is-bouncing {
  animation: buttonBounceEffect 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  background: var(--color-secondary) !important;
}

@keyframes buttonBounceEffect {
  0% {
    transform: scale(1) translateY(0);
    box-shadow: 0 30px 50px rgba(0,43,94, 0.15);
  }
  30% {
    transform: scale(1.08) translateY(-14px); /* ふわっと上空へ浮上・拡大 */
    box-shadow: 0 40px 70px rgba(0, 119, 204, 0.25);
  }
  45% {
    transform: scale(1.08) translateY(-14px); /* 一瞬、空中で静止 */
    box-shadow: 0 40px 70px rgba(0, 119, 204, 0.25);
  }
  100% {
    transform: scale(1) translateY(0); /* 滑らかにスライドダウン復元 */
    box-shadow: 0 30px 50px rgba(0,43,94, 0.15);
  }
}

/* 背景の「まんまる」デコレーション */
.contact-bg-1 {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: var(--color-accent);
  top: -200px;
  right: -300px;
  z-index: 0;
  opacity: 0.3;
  animation: geo-pulse 20s infinite alternate;
}

.contact-error-msg {
  background-color: #ffebee;
  color: #c62828;
  border-left: 5px solid #e53935;
  padding: 1.2rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  text-align: left;
  font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
}

@media (max-width: 768px) {
  .maru-input-group {
    margin-bottom: 3rem;
  }
  .maru-input-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    top: -25px; /* タブレットでも上に持ち上げる */
  }
  .maru-input-group input, 
  .maru-input-group textarea, 
  .maru-input-group select {
    margin-left: 80px;
    width: calc(100% - 80px);
    padding: 1.2rem 1.5rem 1.2rem 4.5rem; /* 左余白を増やして被り対策 */
  }
  .maru-submit-btn {
    width: 160px;
    height: 160px;
    font-size: 1.2rem;
  }
  .maru-submit-btn:active,
  .maru-submit-btn.is-active {
    transform: scale(0.95) !important; /* タップしている瞬間は縮むお洒落なフィードバック */
    background: var(--color-secondary) !important; /* タップしている瞬間は明るい青に変化 */
    box-shadow: 0 15px 30px rgba(0,43,94, 0.15) !important;
  }
}

@media (max-width: 480px) {
  /* スマホでは縦並び */
  .maru-input-label {
    position: relative;
    top: 0;
    left: 0;
    margin: 0 auto 1rem;
    width: fit-content;
  }
  .maru-input-group input, 
  .maru-input-group textarea, 
  .maru-input-group select {
    margin-left: 0;
    width: 100%;
    padding: 1.2rem;
    text-align: left; /* 入力およびプレースホルダーの内容を左寄せにして入力をスムーズに */
  }
  .maru-input-group:nth-child(n) .maru-input-label {
    animation: gradientShift 15s ease infinite;
  }
}

/* ========================================================= */
/* 404 Subpage Specific                                      */
/* ========================================================= */
.error-container {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  background: #fff;
  border-radius: 40px; /* まんまるらしい、大きめの丸み */
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.05);
  max-width: 700px;
  margin: var(--space-md) auto var(--space-xl);
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

.error-code {
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 2rem;
}

/* 404の「0」を表現する笑顔のまんまるキャラクター */
.error-zero {
  display: inline-block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  position: relative;
  box-shadow: 0 15px 30px rgba(0, 43, 94, 0.15);
  animation: floating 4s ease-in-out infinite;
}

/* 目 */
.error-eyes {
  position: absolute;
  top: 35px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 28px;
}

.error-eye {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  animation: blinking 4s infinite;
}

/* 口 */
.error-mouth {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 17px;
  border-bottom: 6px solid #fff;
  border-radius: 0 0 34px 34px;
}

@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

@keyframes blinking {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@media (max-width: 768px) {
  .error-container {
    padding: var(--space-lg) var(--space-md);
    border-radius: 24px;
  }
  .error-code {
    font-size: 7rem;
    gap: 10px;
  }
  .error-zero {
    width: 80px;
    height: 80px;
  }
  .error-eyes {
    top: 25px;
    padding: 0 20px;
  }
  .error-eye {
    width: 9px;
    height: 9px;
  }
  .error-mouth {
    bottom: 22px;
    width: 24px;
    height: 12px;
    border-bottom-width: 4px;
  }
}

/* 背景のデコレーション */
.error-bg {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: var(--color-accent);
  top: -200px;
  right: -300px;
  z-index: 0;
  opacity: 0.3;
  animation: geo-pulse 20s infinite alternate;
}

/* ========================================================= */
/* Privacy Policy Specific                                   */
/* ========================================================= */
.privacy-container {
  position: relative;
  z-index: 10;
}
.privacy-content {
  background: #fff;
  padding: var(--space-xl) var(--space-lg);
  border-radius: 40px; /* まんまるらしい、大きめの丸み */
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.05);
  text-align: left;
}
@media (max-width: 768px) {
  .privacy-content {
    padding: var(--space-lg) var(--space-md);
    border-radius: 24px;
  }
}

/* イントロ文章 */
.privacy-lead {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px dashed var(--color-border);
}

/* 各条文のブロック */
.privacy-section {
  margin-bottom: var(--space-lg);
  position: relative;
}
.privacy-section:last-of-type {
  margin-bottom: 0;
}

/* 条文タイトル */
.privacy-title {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.privacy-title::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: var(--color-secondary);
  border-radius: 50%; /* まんまる丸いドット */
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--color-accent);
}

/* 条文テキスト */
.privacy-text {
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
  padding-left: 26px; /* ドットと位置を揃えるための余白 */
}
.privacy-list {
  padding-left: calc(26px + var(--space-sm));
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}
.privacy-list li {
  margin-bottom: var(--space-xs);
  list-style-type: decimal;
}

/* シンプルな表の共通スタイル */
.privacy-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-left: 26px;
  width: calc(100% - 26px);
}
.privacy-table th, .privacy-table td {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  text-align: left;
  line-height: 1.6;
  vertical-align: middle;
}
.privacy-table th {
  background-color: var(--color-base);
  font-weight: 700;
  color: var(--color-primary);
}
.privacy-table td {
  background-color: #fff;
}

/* 第3条テーブルの列幅調整 */
.services-table th:nth-child(1) {
  width: 25%;
}
.services-table th:nth-child(2) {
  width: 40%;
}
.services-table th:nth-child(3) {
  width: 35%;
}

/* 第7条テーブルの列幅調整 */
.contact-table {
  margin-top: var(--space-md);
}
.contact-table th {
  width: 180px;
}

@media (max-width: 768px) {
  .privacy-table {
    margin-left: 0;
    width: 100%;
  }
  .privacy-table th, .privacy-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 600px) {
  /* 3条：横スクロール対応 */
  .services-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: var(--space-md) 0;
  }
  .services-table-wrapper .privacy-table {
    margin: 0;
    min-width: 600px; /* 横スクロールを発生させて文字が潰れるのを防ぐ */
  }

  /* 7条：スマホでは縦並びにする */
  .contact-table, 
  .contact-table tbody, 
  .contact-table tr, 
  .contact-table th, 
  .contact-table td {
    display: block;
    width: 100%;
  }
  .contact-table tr {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-xs) 0;
  }
  .contact-table tr:last-child {
    border-bottom: none;
  }
  .contact-table th, 
  .contact-table td {
    border: none;
    padding: 4px 0;
    background: transparent;
  }
  .contact-table th {
    color: var(--color-primary);
    font-weight: 700;
  }
  .privacy-text {
    padding-left: 0;
  }
  .privacy-list {
    padding-left: var(--space-md);
  }
}

/* 日付ブロック */
.privacy-dates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 2px dashed var(--color-border);
  color: var(--color-text-light);
  font-size: 0.9rem;
  gap: 4px;
}

/* ========================================================= */
/* Service Subpage Specific                                  */
/* ========================================================= */
.service-block {
  margin-bottom: var(--space-xxl);
  scroll-margin-top: 160px;
}

/* Service Header */
.service-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.service-icon-large {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  background-size: 200% 200%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 20px 40px rgba(0, 43, 94, 0.15);
  animation: gradientShift 15s ease infinite, floatEffect 6s ease-in-out infinite;
}

.service-title-area {
  flex-grow: 1;
}

.service-main-name {
  font-size: 4rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.service-catch {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.6;
}

/* Dynamic Problem Section */
.problem-container {
  margin-bottom: 5rem;
  position: relative;
}

.problem-intro-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 3.5rem;
  position: relative;
}

.problem-intro-title span {
  display: inline-block;
  background: var(--color-accent);
  padding: 0.5rem 2rem;
  border-radius: 60px;
  transform: rotate(-1deg);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 0 1rem;
}

.problem-card {
  background: #fff;
  padding: 3rem 2rem;
  border-radius: 40px;
  box-shadow: 0 15px 45px rgba(0, 43, 94, 0.05);
  position: relative;
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
}

.problem-card:nth-child(odd) { transform: rotate(-1.5deg); }
.problem-card:nth-child(even) { transform: rotate(1.5deg); margin-top: 20px; }

.problem-card:hover {
  transform: scale(1.05) rotate(0deg);
  z-index: 10;
}

.problem-card::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 40px;
  width: 30px;
  height: 30px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.02);
}

.problem-card-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-light);
  line-height: 1.7;
  position: relative;
  z-index: 2;
}

.problem-card-icon {
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 4rem;
  opacity: 0.1;
  font-weight: 900;
  color: var(--color-primary);
}

/* Stylized Feature Section */
.feature-box {
  margin-bottom: 5rem;
  background: linear-gradient(to right, rgba(226, 240, 255, 0.5), transparent);
  padding: 4rem;
  border-radius: 80px 0 80px 0;
  position: relative;
}

.feature-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 20px;
}

@keyframes markerPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 204, 0.4); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(0, 119, 204, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 204, 0); }
}
.feature-title-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: markerPulse 3s infinite;
}
.feature-title-icon::after {
  content: '';
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
}

.feature-content {
  font-size: 1.25rem;
  line-height: 2.2;
  color: var(--color-text);
  max-width: 900px;
}

.feature-highlight-text {
  background: linear-gradient(transparent 70%, var(--color-accent) 70%);
  font-weight: 700;
}

/* Benefit Cards */
.benefit-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.benefit-card {
  background: #fff;
  padding: 4rem 2.5rem;
  border-radius: 60px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.04);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid rgba(0, 119, 204, 0.05);
}

.benefit-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--color-secondary);
}

.benefit-card-num {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  box-shadow: 0 10px 20px rgba(0, 119, 204, 0.2);
}

.benefit-card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.benefit-card-text {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 2;
  font-weight: 500;
}

@media (max-width: 1024px) {
  .benefit-container { grid-template-columns: 1fr; }
  .feature-box { padding: 3rem 2rem; border-radius: 40px; }
  .service-main-name { font-size: 3rem; }
  .service-catch { font-size: 1.3rem; }
}

@media (max-width: 768px) {
  .service-header { flex-direction: column; text-align: center; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-card:nth-child(even) { margin-top: 0; }
}

/* Animations */
@keyframes floatEffect {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

/* ========================================================= */
/* Clean-up Classes (Replacing inline styles in PHP files)   */
/* ========================================================= */
.main-layout {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.logo img {
  width: auto;
  height: 60px;
  object-fit: contain;
}

.footer-logo img {
  width: auto;
  height: 60px;
  object-fit: contain;
}

.text-center {
  text-align: center !important;
}

.display-flex-center {
  display: flex;
  justify-content: center;
}

/* 各種ページのインライン指定をクラス化 */
.section-overflow-hidden {
  overflow: hidden;
  position: relative;
}

.section-padding-top-md {
  padding-top: var(--space-md) !important;
}

.section-padding-top-xl {
  padding-top: var(--space-xl) !important;
}
@media (max-width: 768px) {
  .section-padding-top-xl {
    padding-top: var(--space-md) !important;
  }
}

.about-intro-wrapper {
  font-size: 1.25rem; /* 1.5remから1.25remへ少し小さくして長文の読みやすさを最適化 */
  max-width: 900px;
  color: var(--color-text-light);
  text-align: justify;
}
.about-intro-wrapper p {
  margin-bottom: var(--space-md);
  line-height: 2;
}
@media (max-width: 768px) {
  .about-intro-wrapper {
    font-size: 1rem; /* スマホでも1remに縮小調整 */
  }
}

.service-card-body p {
  margin-top: 0.5rem;
  color: var(--color-text-light);
  font-weight: 700;
  line-height: 1.6;
  font-size: 1.1rem; /* PC時のカード内説明文のフォントサイズを大きくし、視認性アップ */
}

.max-width-900 {
  max-width: 900px !important;
}

.max-width-950 {
  max-width: 950px !important;
}

/* 404 & Thanks page styles */
.thanks-icon-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-accent);
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 43, 94, 0.08);
}
.thanks-icon-wrapper svg {
  color: var(--color-primary);
}

.thanks-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  font-family: 'Noto Sans JP', sans-serif;
}

.thanks-message {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 3.5rem;
  text-align: left;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Noto Sans JP', sans-serif;
}
@media (max-width: 480px) {
  .thanks-message {
    text-align: center;
  }
}

/* 各ページの背景幾何学パーツの個別配置をクラスに集約 */
.company-bg-circle { top: 15%; left: -10vw; transform: rotate(45deg); opacity: 0.12; }
.company-bg-semi { top: 50%; right: -5vw; opacity: 0.08; }
.company-bg-quarter { bottom: 10%; left: 75vw; opacity: 0.05; }

.privacy-bg-circle-1 { top: 10%; left: -10%; }
.privacy-bg-semi-1 { top: 40%; right: -5%; }
.privacy-bg-quarter-1 { bottom: 5%; left: 80%; }

.service-bg-semi { top: 10%; left: -10vw; transform: rotate(90deg); opacity: 0.1; }
.service-bg-circle { top: 40%; right: -20vw; background: var(--color-secondary); opacity: 0.05; }
.service-bg-quarter { bottom: 5%; left: -5vw; opacity: 0.08; }

.contact-bg-semi { top: 20%; left: -10vw; transform: rotate(90deg); opacity: 0.1; }
.contact-bg-circle { top: 50%; right: -20vw; background: var(--color-secondary); opacity: 0.05; }
.contact-bg-quarter { bottom: 10%; left: -5vw; opacity: 0.08; }

/* index.php main & container styles */
.index-main {
  flex-grow: 1;
  padding: 160px 0 var(--space-xl);
}
.index-container {
  max-width: 900px !important;
  background: #fff;
  padding: var(--space-xl);
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 43, 94, 0.05);
}
.index-header {
  margin-bottom: var(--space-md);
}
.index-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
}
.index-content {
  line-height: 2;
  color: var(--color-text-light);
}
@media (max-width: 768px) {
  .index-main {
    padding: 120px 0 var(--space-lg);
  }
  .index-container {
    padding: var(--space-md);
    border-radius: 24px;
  }
  .index-title {
    font-size: 1.6rem;
  }
}

/* ========================================================= */
/* Contact Page Agreement Center Align                       */
/* ========================================================= */
.contact-agree-wrapper {
  text-align: center !important;
  margin-top: 3rem;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}
.contact-agree-wrapper label {
  cursor: pointer;
  font-weight: 500;
  font-size: 1.1rem;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
}
.contact-agree-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-secondary);
}
.contact-agree-wrapper a {
  text-decoration: underline;
  color: var(--color-secondary);
}
/* 同意エラーメッセージの中央寄せ固定 & 縦並び（改行）への強制 */
.agree-group.has-error {
  flex-direction: column !important; /* エラー発生時はメッセージを確実に下の行に配置（横並び崩れを100%防止） */
  gap: 10px !important;
}
.agree-group .maru-error-tip {
  text-align: center !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  display: block !important;
}

/* サービス個別の共通お問い合わせCTAラッパー */
.service-cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3.5rem;
  width: 100%;
}
@media (max-width: 768px) {
  .service-cta-wrapper {
    margin-top: 2rem;
  }
}
