/* ===================================
   Enhanced Design System
   =================================== */

/* ==================
   Mobile Menu Styles
   ================== */
.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--gray-200);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 9998;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-nav {
  padding: 1rem 0;
}

.mobile-nav > a,
.mobile-dropdown-toggle {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--gray-700);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid var(--gray-100);
}

.mobile-nav > a:hover,
.mobile-dropdown-toggle:hover {
  background: var(--gray-50);
  color: var(--primary);
  padding-left: 2rem;
}

.mobile-dropdown {
  position: relative;
}

.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.mobile-dropdown-toggle i {
  transition: transform 0.3s;
  font-size: 0.75rem;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--gray-50);
}

.mobile-dropdown.active .mobile-dropdown-content {
  max-height: 500px;
}

.mobile-dropdown-content a {
  display: block;
  padding: 0.75rem 2.5rem;
  color: var(--gray-600);
  font-weight: 400;
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
}

.mobile-dropdown-content a:hover {
  background: white;
  color: var(--primary);
  padding-left: 3rem;
}

body.menu-open {
  overflow: hidden;
}

/* ==================
   Quick Access Sidebar
   ================== */
.quick-access-sidebar {
  position: fixed;
  right: 20px;
  top: 120px;
  z-index: 1000;
}

.quick-access-toggle {
  position: absolute;
  right: 0;
  top: 0;
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.2);
}

.quick-access-toggle:hover {
  background: var(--primary-hover);
  padding-left: 1.5rem;
}

.quick-access-toggle i {
  font-size: 1.25rem;
}

.quick-access-toggle span {
  font-size: 0.75rem;
  font-weight: 600;
}

.quick-access-menu {
  position: absolute;
  right: 0;
  top: 0;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 15px;
  padding: 1.5rem;
  width: 280px;
  box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.15);
  transform: translateX(calc(100% + 20px));
  transition: transform 0.3s ease;
  max-height: 80vh;
  overflow-y: auto;
}

/* クイックアクセスのレスポンシブ対応 */
@media (max-width: 1200px) {
  .quick-access-menu {
    width: 260px;
    padding: 1.25rem;
  }
}

@media (max-width: 992px) {
  .quick-access-sidebar {
    right: 10px;
  }
  
  .quick-access-menu {
    width: 240px;
    padding: 1rem;
  }
  
  .quick-access-section a {
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
  }
}

@media (max-width: 768px) {
  .quick-access-sidebar {
    display: none !important;
  }
}

.quick-access-menu.active {
  transform: translateX(0);
}

.quick-access-menu h3 {
  color: var(--gray-900);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.quick-access-section {
  margin-bottom: 1.5rem;
}

.quick-access-section h4 {
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-access-section a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.quick-access-section a:hover {
  background: var(--gray-50);
  color: var(--primary);
  transform: translateX(5px);
}

.quick-access-section a i {
  width: 20px;
  text-align: center;
  color: var(--primary);
}

.quick-access-cta {
  background: var(--gray-100);
  font-weight: 600;
}

.quick-access-cta:hover {
  background: var(--primary);
  color: white !important;
}

.quick-access-cta:hover i {
  color: white;
}

.quick-access-cta.primary {
  background: var(--primary);
  color: white;
}

.quick-access-cta.primary i {
  color: white;
}

.quick-access-cta.primary:hover {
  background: var(--primary-hover);
}

@media (max-width: 768px) {
  .quick-access-sidebar {
    display: none;
  }
}

/* ==================
   Beautiful Gradients
   ================== */
.gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-success {
  background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.gradient-warm {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-cool {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-dark {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

/* ==================
   Hero Section Enhanced
   ================== */
.hero-enhanced {
  position: relative;
  background: linear-gradient(135deg, #4338CA 0%, #5B21B6 100%);
  color: white;
  padding: 100px 0;
  overflow: hidden;
}

/* レスポンシブヒーロー */
@media (max-width: 480px) {
  .hero-enhanced {
    padding: 60px 0;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .hero-enhanced {
    padding: 80px 0;
  }
}

.hero-enhanced h1 {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 900;
}

.hero-enhanced p {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

/* ==================
   Process Steps Section
   ================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-weight: bold;
  font-size: 1.5rem;
}

.step-primary {
  background: var(--primary);
  color: white;
}

.step-secondary {
  background: var(--secondary);
  color: white;
}

.step-description {
  color: var(--gray-600);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
  }
  
  .step-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .step-description br {
    display: none;
  }
}

.hero-enhanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%23ffffff' fill-opacity='1' d='M0,32L48,37.3C96,43,192,53,288,56C384,59,480,53,576,45.3C672,37,768,27,864,26.7C960,27,1056,37,1152,42.7C1248,48,1344,48,1392,48L1440,48L1440,100L1392,100C1344,100,1248,100,1152,100C1056,100,960,100,864,100C768,100,672,100,576,100C480,100,384,100,288,100C192,100,96,100,48,100L0,100Z'%3E%3C/path%3E%3C/svg%3E");
  background-size: cover;
}

/* ==================
   Cards with Glassmorphism
   ================== */
.card-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.card-glass:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 40px 0 rgba(31, 38, 135, 0.25),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
}

/* ==================
   Feature Cards with Icons
   ================== */
.feature-card {
  position: relative;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* レスポンシブフィーチャーカード */
@media (max-width: 480px) {
  .feature-card {
    padding: 1.25rem;
    border-radius: 16px;
  }
  
  .feature-card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-radius: 16px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-card-icon {
    width: 65px;
    height: 65px;
    font-size: 1.75rem;
  }
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.feature-card-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #4338CA 0%, #5B21B6 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: 0 10px 30px rgba(67, 56, 202, 0.3);
}

/* ==================
   Statistics Section
   ================== */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

/* レスポンシブ統計 */
@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .stat-card {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 0.875rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, #4338CA 0%, #5B21B6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #4a5568;
  font-weight: 600;
}

/* ==================
   Process Timeline
   ================== */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-marker {
  width: 40px;
  height: 40px;
  background: white;
  border: 4px solid #667eea;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #667eea;
  z-index: 1;
}

.timeline-content {
  width: 45%;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* ==================
   Floating Elements
   ================== */
.floating {
  animation: float 6s ease-in-out infinite;
}

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

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ==================
   Decorative Shapes
   ================== */
.shape-blob {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  animation: blob 8s infinite;
}

@keyframes blob {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ==================
   Call-to-Action Enhanced
   ================== */
.cta-enhanced {
  position: relative;
  background: linear-gradient(135deg, #4338CA 0%, #5B21B6 100%);
  color: white;
  padding: 4rem 2rem;
  border-radius: 24px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* レスポンシブCTA */
@media (max-width: 480px) {
  .cta-enhanced {
    padding: 2.5rem 1.5rem;
    border-radius: 16px;
  }
  
  .cta-enhanced h2 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem;
  }
  
  .cta-enhanced p {
    font-size: 1rem !important;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .cta-enhanced {
    padding: 3rem 1.5rem;
    border-radius: 20px;
  }
  
  .cta-enhanced h2 {
    font-size: 1.75rem !important;
  }
}

.cta-enhanced h2 {
  color: white !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.cta-enhanced p {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 500;
  font-size: 1.125rem;
}

.cta-enhanced::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================
   Testimonial Cards
   ================== */
.testimonial-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  position: relative;
  margin: 2rem 0;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: #667eea;
  opacity: 0.3;
  font-family: serif;
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

/* ==================
   Mobile Responsive
   ================== */
/* 詳細なモバイルレスポンシブ */
@media (max-width: 480px) {
  .timeline::before {
    left: 25px;
  }
  
  .timeline-item {
    flex-direction: row !important;
    margin-bottom: 2rem;
  }
  
  .timeline-marker {
    left: 25px;
    width: 30px;
    height: 30px;
    font-size: 0.875rem;
  }
  
  .timeline-content {
    width: calc(100% - 70px);
    margin-left: 55px;
    padding: 1rem;
    font-size: 0.875rem;
  }
  
  .hero-wave {
    height: 40px;
  }
  
  .mobile-nav > a,
  .mobile-dropdown-toggle {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .mobile-dropdown-content a {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    flex-direction: row !important;
  }
  
  .timeline-marker {
    left: 30px;
    width: 35px;
    height: 35px;
  }
  
  .timeline-content {
    width: calc(100% - 80px);
    margin-left: 65px;
    padding: 1.25rem;
  }
  
  .hero-wave {
    height: 60px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero-wave {
    height: 80px;
  }
  
  .feature-card {
    padding: 1.75rem;
  }
}

/* ==================
   Loading Animation
   ================== */
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f4f6;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================
   モバイルファーストデザイン
   ================== */
@media (max-width: 768px) {
  /* タッチターゲットの最小サイズを確保 */
  .btn, .nav-link, .mobile-nav > a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* フォーム要素のタッチ性向上 */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--gray-200);
    font-size: 16px;
  }
  
  /* ホバーエフェクトをタッチ用に調整 */
  .card:hover {
    transform: none;
  }
  
  .card:active {
    transform: translateY(-2px);
  }
  
  /* スクロールパフォーマンスの最適化 */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* iOS Safariのズームを防ぐ */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* タブレット用最適化 */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 高解像度ディスプレイ対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-enhanced,
  .cta-enhanced {
    background-attachment: scroll; /* パフォーマンス最適化 */
  }
}

/* プリント用スタイル */
@media print {
  .quick-access-sidebar,
  .mobile-menu,
  .hero-enhanced,
  .cta-enhanced {
    display: none;
  }
  
  .card,
  .feature-card {
    box-shadow: none;
    border: 1px solid #000;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* ==================
   Badge Styles
   ================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* レスポンシブバッジ */
@media (max-width: 480px) {
  .badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.625rem;
  }
}

/* アニメーションのパフォーマンス最適化 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ダークモード対応（基本的なサポート） */
@media (prefers-color-scheme: dark) {
  :root {
    --gray-50: #1F2937;
    --gray-100: #374151;
    --gray-200: #4B5563;
    --gray-300: #6B7280;
    --gray-700: #F3F4F6;
    --gray-800: #F9FAFB;
    --gray-900: #FFFFFF;
  }
  
  body {
    background: #111827;
    color: #F3F4F6;
  }
  
  .card,
  .feature-card,
  .card-glass {
    background: #1F2937;
    color: #F3F4F6;
  }
}

.badge-primary {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* ==================
   サファリ・WebKit固有の問題の修正
   ================== */
/* iOS Safariのバウンスを無効化 */
body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

/* iOS Safariのズームを防ぐ */
meta[name="viewport"] {
  user-scalable: no;
  initial-scale: 1;
  maximum-scale: 1;
  minimum-scale: 1;
}

/* Chromeの自動填入スタイルをオーバーライド */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--gray-700);
  -webkit-box-shadow: 0 0 0px 1000px white inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* スムーズスクロールの有効化 */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ==================
   アクセシビリティ改善
   ================== */
/* フォーカス表示の改善 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* スキップリンク */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 6px;
}

/* スクリーンリーダー用テキスト */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}