/* ═══════════════════════════════════════════════════════════
   GONAR — AI競馬分析プラットフォーム UI v5.0
   World-Class Design System — Prediction Tool Edition
   ═══════════════════════════════════════════════════════════ */

/* ═══ Google Fonts ═══ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* GONARブランドカラー（ライトブルー基調） */
  --primary: #5BADE6;
  --primary-light: #7BC4ED;
  --primary-dark: #4A9BD9;
  --secondary: #1a2a3a;
  --accent-gold: #d4af37;
  --accent-green: #28a745;
  --accent-blue: #0066cc;
  --accent-nar: #3cb371;
  --accent-jra: #dc143c;

  --bg-main: #f0f4f8;
  --bg-card: #ffffff;
  --bg-dark: #1a2a3a;
  --bg-hover: #e8f0f8;

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  /* Layered shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.06), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-hover: 0 20px 40px rgba(91,173,230,0.18), 0 8px 16px rgba(91,173,230,0.08);
  --shadow-gold: 0 10px 30px rgba(255,215,0,0.18), 0 4px 12px rgba(255,215,0,0.08);
  --shadow-glow: 0 0 20px rgba(91,173,230,0.3), 0 0 60px rgba(91,173,230,0.1);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.3s;
  --duration-slow: 0.5s;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP',
               -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ═══ Scroll Reveal System ═══ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-spring);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }

/* ═══ ヘッダー ═══ */
.header {
  background: linear-gradient(135deg, var(--secondary) 0%, #16213e 100%);
  color: var(--text-inverse);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), var(--shadow-lg);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-inverse);
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  letter-spacing: -0.02em;
}

.logo:hover { opacity: 0.9; transform: scale(1.02); }
.logo-icon { font-size: 1.6rem; }
.logo-text span { color: var(--primary-light); }

.nav { display: flex; gap: 0.25rem; align-items: center; }
.nav-close { display: none; }

.nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  border-radius: 1px;
  transition: all var(--duration-normal) var(--ease-out);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 60%;
}

.nav-link.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
}

.nav-link.active::after {
  width: 60%;
  background: #ffd700;
}

/* Nav category labels (desktop: thin separator, mobile: section header) */
.nav-category {
  display: none;
}
.nav-link .nav-sub {
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 0.3rem;
  font-weight: 400;
}
.nav-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.15);
  margin: 0 0.15rem;
  flex-shrink: 0;
}

/* ═══ ヒーロー ═══ */
.hero {
  background: linear-gradient(135deg, #5BADE6 0%, #4A9BD9 40%, #3a8bc9 100%);
  color: var(--text-inverse);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,215,0,0.06) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
  animation: heroShift 12s ease-in-out infinite alternate;
}

@keyframes heroShift {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--bg-main);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, var(--text-5xl));
  font-weight: 900;
  margin-bottom: var(--space-md);
  animation: heroTitle 0.8s var(--ease-out) both;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

@keyframes heroTitle {
  from { opacity: 0; transform: translateY(25px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero h1 .highlight {
  color: #ffd700;
  text-shadow: 0 2px 20px rgba(255,215,0,0.4);
  position: relative;
}

.hero-sub {
  font-size: clamp(0.95rem, 2.5vw, var(--text-lg));
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
  line-height: 1.9;
  font-weight: 400;
}

/* Floating particles in hero */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ヒーローアニメーション */
.hero-animation {
  margin: var(--space-xl) auto;
  max-width: 600px;
  animation: fadeInUp 0.8s var(--ease-out) 0.25s both;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.flow-step {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: 1rem 1.3rem;
  text-align: center;
  min-width: 120px;
  animation: pulse 4s ease-in-out infinite;
  transition: all var(--duration-normal) var(--ease-out);
}

.flow-step:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.flow-step:nth-child(1) { animation-delay: 0s; }
.flow-step:nth-child(3) { animation-delay: 0.6s; }
.flow-step:nth-child(5) { animation-delay: 1.2s; }
.flow-step:nth-child(7) { animation-delay: 1.8s; }

.flow-step .icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
.flow-step .label { font-size: var(--text-xs); opacity: 0.9; font-weight: 600; letter-spacing: 0.03em; }

.flow-arrow {
  font-size: 1.2rem;
  color: #ffd700;
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { transform: scale(1.03); box-shadow: 0 4px 20px rgba(255,255,255,0.08); }
}

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(6px); opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(91,173,230,0.3); }
  50% { border-color: rgba(91,173,230,0.6); }
}

/* ═══ メイン ═══ */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  position: relative;
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
}

.page-title::before {
  content: '';
  width: 4px;
  height: 1.6rem;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}

/* ═══ カード ═══ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91,173,230,0.3), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.card-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: var(--text-xs);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(91,173,230,0.3);
}

/* ═══ Glass Cards ═══ */
.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: all var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
  background: rgba(255,255,255,0.85);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

/* ═══ Dark Context Cards ═══ */
.dark-card {
  background: linear-gradient(135deg, #1a2332 0%, #0d1117 100%);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.dark-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(91,173,230,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.dark-card .card-header {
  border-bottom-color: rgba(255,255,255,0.06);
}

/* ═══ 機能カード ═══ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--duration-slow) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold), var(--primary));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91,173,230,0.02), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(91,173,230,0.2);
}

.feature-card:hover::before {
  transform: scaleX(1);
  animation: gradientShift 3s ease infinite;
}

.feature-card:hover::after { opacity: 1; }

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: var(--space-md);
  box-shadow: 0 6px 20px rgba(91,173,230,0.3);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  z-index: 1;
}

.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 8px 25px rgba(91,173,230,0.4);
}

.feature-card h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-md);
  position: relative;
  z-index: 1;
}

.tag {
  background: rgba(91,173,230,0.06);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-weight: 500;
  transition: all var(--duration-fast) ease;
}

.tag:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91,173,230,0.1);
}

/* ═══ Section Titles ═══ */
.section-heading {
  font-size: var(--text-xl);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

/* ═══ Feature Items ═══ */
.feature-item {
  background: rgba(91,173,230,0.04);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border-left: 3px solid var(--primary);
  transition: all var(--duration-normal) var(--ease-out);
}

.feature-item:hover {
  background: rgba(91,173,230,0.08);
  border-left-color: var(--primary-dark);
  transform: translateX(4px);
}

.feature-item h4 {
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
  font-weight: 700;
}

.feature-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.feature-item li {
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--duration-fast);
}

.feature-item li:hover {
  color: var(--text-primary);
}

/* ═══ Quick Start Cards ═══ */
.quick-card {
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--duration-slow) var(--ease-out);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.2) 100%);
  pointer-events: none;
}

.quick-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl);
}

.quick-card .icon {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.quick-card:hover .icon {
  transform: scale(1.15);
}

.quick-card .title { font-size: var(--text-xl); font-weight: 700; color: #fff; position: relative; z-index: 1; }
.quick-card .subtitle { font-size: var(--text-sm); color: rgba(255,255,255,0.8); margin-top: 0.5rem; position: relative; z-index: 1; }
.quick-card .badge {
  margin-top: var(--space-md);
  padding: 0.4rem 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: #fff;
  display: inline-block;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ═══ Steps ═══ */
.step-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  font-size: var(--text-2xl);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(91,173,230,0.4);
  transition: all var(--duration-normal) var(--ease-spring);
}

.step-item:hover .step-circle {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(91,173,230,0.5);
}

.step-title {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.step-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══ Venue Tags ═══ */
.venue-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.venue-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
}

.venue-label .badge {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
}

/* ═══ フォーム ═══ */
.form-group { margin-bottom: var(--space-md); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--duration-normal) var(--ease-out);
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91,173,230,0.12);
}

.form-row { display: flex; gap: 0.8rem; }
.form-row .form-input { flex: 1; }

/* ═══ ボタン ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  letter-spacing: 0.01em;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(91,173,230,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(91,173,230,0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-gold {
  background: linear-gradient(135deg, #ffd700, #f0c000, #daa520);
  background-size: 200% 200%;
  color: #000;
  box-shadow: var(--shadow-gold);
  font-weight: 700;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,215,0,0.4);
  animation: gradientShift 3s ease infinite;
}

.btn-lg { padding: 1rem 2.5rem; font-size: var(--text-lg); border-radius: var(--radius-lg); }

/* ═══ プログレスバー ═══ */
.progress-container { margin: var(--space-md) 0; }

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-main);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ═══ 統計グリッド ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.stat-card:hover::before { opacity: 1; }

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-value.positive { color: var(--accent-green); }
.stat-value.negative { color: var(--accent-jra); }
.stat-value.gold { color: var(--accent-gold); }

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* ═══ 判定バナー ═══ */
.verdict-banner {
  padding: 1.2rem var(--space-xl);
  border-radius: var(--radius-lg);
  text-align: center;
  font-weight: 700;
  font-size: var(--text-base);
  margin: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  animation: fadeInUp 0.5s var(--ease-out);
}

.verdict-banner.positive {
  background: linear-gradient(135deg, rgba(40,167,69,0.08), rgba(40,167,69,0.04));
  color: var(--accent-green);
  border: 1px solid rgba(40,167,69,0.2);
}

.verdict-banner.negative {
  background: linear-gradient(135deg, rgba(220,20,60,0.08), rgba(220,20,60,0.04));
  color: var(--accent-jra);
  border: 1px solid rgba(220,20,60,0.2);
}

.verdict-banner.neutral {
  background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(212,175,55,0.04));
  color: var(--accent-gold);
  border: 1px solid rgba(212,175,55,0.2);
}

/* ═══ テーブル ═══ */
.table-container {
  overflow-x: auto;
  margin: var(--space-md) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.9rem 0.7rem;
  text-align: center;
  border-bottom: 2px solid var(--border-medium);
  position: sticky;
  top: 0;
  white-space: nowrap;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 0.75rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
}

.data-table tbody tr {
  transition: background var(--duration-fast);
}

.data-table tbody tr:hover td { background: var(--bg-hover); }
.data-table tbody tr:nth-child(even) td { background: rgba(0,0,0,0.01); }
.data-table tbody tr:nth-child(even):hover td { background: var(--bg-hover); }

.cell-hit { color: var(--accent-green); font-weight: 700; }
.cell-miss { color: var(--text-muted); }
.cell-rank { font-weight: 700; color: var(--text-primary); }
.cell-rank.rank-1 { color: var(--accent-gold); }
.cell-rank.rank-2 { color: #a0a0a0; }
.cell-rank.rank-3 { color: #cd7f32; }

.video-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 1rem;
  transition: all var(--duration-fast) var(--ease-spring);
  display: inline-block;
}

.video-link:hover { transform: scale(1.2); }

/* ═══ グリッドレイアウト ═══ */
.grid-2col {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 900px) {
  .grid-2col { grid-template-columns: 1fr; }
}

.sidebar { position: sticky; top: 80px; }

/* ═══ スピナー ═══ */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--space-xl) auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Scroll Reveal via class ═══ */
.animate-in {
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }

/* ═══ データソース ═══ */
.data-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: var(--space-md) 0;
}

.source-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  border: 1px solid var(--border-light);
  transition: all var(--duration-fast);
}

.source-badge:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.source-badge .icon { font-size: 1rem; }

/* ═══ Footer ═══ */
.site-footer {
  background: linear-gradient(135deg, #3a8bc9 0%, #4A9BD9 50%, #5BADE6 100%);
  color: rgba(255,255,255,0.9);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  font-size: var(--text-sm);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--bg-main);
  clip-path: ellipse(55% 100% at 50% 0%);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: var(--space-md);
}

.footer-brand img {
  height: 44px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.footer-brand .name { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.footer-brand .version {
  color: #ffd700;
  background: rgba(0,0,0,0.2);
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
}

.footer-contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-contact-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.12);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
  font-size: var(--text-sm);
  font-weight: 500;
}

.footer-link:hover {
  background: rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.footer-link.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.footer-link.instagram:hover { opacity: 0.9; transform: translateY(-2px); }

/* ═══ Accuracy Table ═══ */
.accuracy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.accuracy-table thead tr {
  background: rgba(91,173,230,0.08);
}

.accuracy-table th {
  padding: 0.9rem var(--space-md);
  color: var(--primary-dark);
  border-bottom: 2px solid rgba(91,173,230,0.3);
  font-weight: 600;
  font-size: var(--text-sm);
}

.accuracy-table th:first-child { text-align: left; }
.accuracy-table th:not(:first-child) { text-align: center; }

.accuracy-table td {
  padding: 0.9rem var(--space-md);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
}

.accuracy-table tbody tr:hover td { background: var(--bg-hover); }

.accuracy-table td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.accuracy-table .value {
  text-align: center;
  color: var(--primary);
  font-size: var(--text-xl);
  font-weight: 700;
}

.accuracy-table .hits {
  text-align: center;
  color: var(--text-tertiary);
}

.accuracy-table .def {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ═══ Admin Dashboard ═══ */
.admin-stat {
  background: rgba(91,173,230,0.04);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
}

.admin-stat:hover {
  background: rgba(91,173,230,0.08);
  transform: translateY(-2px);
}

.admin-stat .number {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.admin-stat .label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

/* ═══ Venue Breakdown Table ═══ */
.venue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.venue-table thead tr {
  background: rgba(91,173,230,0.08);
}

.venue-table th {
  padding: 0.7rem;
  color: var(--primary-dark);
  border-bottom: 1px solid rgba(91,173,230,0.2);
  font-weight: 600;
}

.venue-table th:first-child { text-align: left; }
.venue-table th:not(:first-child) { text-align: center; }

.venue-table td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
}

.venue-table tbody tr:hover td { background: var(--bg-hover); }

/* ═══ ハンバーガーメニュー ═══ */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  transition: transform var(--duration-fast);
}

.hamburger:hover { transform: scale(1.1); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.nav-overlay.open { display: block; }

/* モバイルヘッダー内の認証表示 */
.header-auth-inline {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
}

.header-auth-inline .auth-email-short {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-auth-inline .auth-btn-sm {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.7rem;
  transition: background var(--duration-fast);
}

.header-auth-inline .auth-btn-sm:hover {
  background: rgba(255,255,255,0.25);
}

/* ═══ Tooltip ═══ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--secondary);
  color: #fff;
  font-size: var(--text-xs);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ═══ レスポンシブ ═══ */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: var(--text-base); padding: 0 0.5rem; }
  .main { padding: var(--space-lg) var(--space-md); }

  .hamburger { display: block; }
  .header-auth-inline { display: flex; }

  .nav {
    display: none;
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a2a3a 0%, #0f1923 100%);
    flex-direction: column;
    padding: 4.5rem 1.5rem 2rem;
    gap: 0.3rem;
    z-index: 200;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4);
    overflow-y: auto;
    animation: slideInRight 0.3s var(--ease-out);
  }

  .nav.open { display: flex; }

  .nav .nav-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration-fast);
  }

  .nav .nav-close:hover {
    background: rgba(255,255,255,0.15);
  }

  .nav .nav-link {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .nav .nav-link::after { display: none; }

  .nav .nav-category {
    display: block;
    color: rgba(255,255,255,0.35);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.6rem 1rem 0.15rem;
    margin-top: 0.3rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .nav .nav-category:first-of-type { border-top: none; margin-top: 0; }

  .nav .nav-sep { display: none; }

  .nav .nav-link .nav-sub {
    font-size: 0.75rem;
    opacity: 0.5;
  }

  .nav .lang-switcher {
    margin-left: 0;
    margin-top: 0.8rem;
    justify-content: center;
  }

  .nav .auth-buttons,
  .nav #auth-buttons-pc {
    flex-direction: column;
    margin-left: 0;
    margin-top: 0.8rem;
    gap: 0.5rem;
  }

  .nav .auth-buttons .auth-btn,
  .nav #auth-buttons-pc .auth-btn {
    text-align: center;
    padding: 0.7rem;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 600px) {
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .hero {
    padding: var(--space-xl) var(--space-sm);
  }
  .hero-content {
    padding: 0 var(--space-sm);
  }

  .main .card {
    margin-left: 0;
    margin-right: 0;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .site-footer::before,
  .hero::after {
    display: none;
  }
}

/* ═══ ユーティリティ ═══ */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-border {
  animation: borderGlow 3s ease-in-out infinite;
}

.number-animate {
  animation: countUp 0.6s var(--ease-out) both;
}

/* ═══ ボタン押下フィードバック（全ボタン共通） ═══ */

/* --- :active で「押し込み → バウンス戻り」 --- */
.btn:active,
.btn-primary:active,
.btn-gold:active,
.btn-cta-primary:active,
.btn-cta-secondary:active,
.auth-btn:active,
.nav-link:active,
.btn-refresh:active,
.range-btn:active,
.feature-card:active,
.engine-card:active,
.step-card:active,
.trust-item:active,
.quick-card:active {
  transform: scale(0.95) !important;
  transition: transform 0.08s ease-in !important;
}

/* --- バウンス戻りアニメーション --- */
@keyframes btnBounce {
  0%   { transform: scale(0.95); }
  40%  { transform: scale(1.04); }
  70%  { transform: scale(0.99); }
  100% { transform: scale(1); }
}

/* --- リップルエフェクト（JSで .ripple-container span を生成） --- */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-container .ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
  transform: scale(0);
  animation: rippleExpand 0.55s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}

@keyframes rippleExpand {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}

/* 暗いボタン用リップル */
.ripple-dark .ripple {
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 70%);
}

/* 明るいボタン用リップル */
.ripple-light .ripple {
  background: radial-gradient(circle, rgba(91,173,230,0.3) 0%, rgba(91,173,230,0) 70%);
}

/* --- 成功フラッシュ（ボタン押下後に一瞬光る） --- */
@keyframes pressFlash {
  0%   { box-shadow: 0 0 0 0 rgba(91,173,230,0.5); }
  50%  { box-shadow: 0 0 20px 4px rgba(91,173,230,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(91,173,230,0); }
}

@keyframes pressFlashGold {
  0%   { box-shadow: 0 0 0 0 rgba(255,215,0,0.5); }
  50%  { box-shadow: 0 0 20px 4px rgba(255,215,0,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(255,215,0,0); }
}

.press-flash {
  animation: pressFlash 0.4s ease-out !important;
}

.press-flash-gold {
  animation: pressFlashGold 0.4s ease-out !important;
}


/* ═══════════════════════════════════════════════════════════
   UI改善 v5.1 — アクセシビリティ・モバイル・UX強化
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. アクセシビリティ: タッチターゲット最小44px ─── */
.hamburger {
  min-width: 44px;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
}

.nav .nav-close {
  min-width: 44px;
  min-height: 44px;
}

.lang-btn {
  min-height: 36px;
  min-width: 44px;
}

/* ─── 2. フォーカスリング（キーボードナビゲーション） ─── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form-input:focus-visible,
.auth-form .form-input:focus-visible {
  outline: none; /* box-shadow で代替済み */
}

/* ─── 3. ナビゲーション: active リンク強調 ─── */
.nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 700;
  position: relative;
}

@media (max-width: 768px) {
  .nav .nav-link.active {
    background: linear-gradient(135deg, rgba(91,173,230,0.2), rgba(91,173,230,0.08));
    border-left: 3px solid var(--primary-light);
  }
}

/* ─── 4. ボタン: ローディングスピナー ─── */
.btn-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 5. ボタン: disabled 状態の明確化 ─── */
.btn:disabled,
.btn-primary:disabled,
.analyze-btn:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* ─── 6. トップへ戻るボタン (FAB) ─── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--ease-out);
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* ─── 7. テーブル横スクロールラッパー ─── */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.table-scroll-wrapper::after {
  content: '';
  display: block;
  height: 1px;
}

@media (max-width: 768px) {
  .table-scroll-wrapper {
    position: relative;
  }
  .table-scroll-wrapper::before {
    content: '← スクロール →';
    display: block;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.3rem 0;
    opacity: 0.7;
  }
}

/* ─── 8. パスワード表示トグル ─── */
.password-wrapper {
  position: relative;
}

.password-wrapper .form-input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1.1rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast);
}

.password-toggle:hover {
  color: var(--primary);
}

/* ─── 9. フォームバリデーション表示 ─── */
.form-input.valid {
  border-color: var(--accent-green);
}

.form-input.invalid {
  border-color: var(--accent-jra);
}

.form-feedback {
  font-size: var(--text-xs);
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.form-feedback.success { color: var(--accent-green); }
.form-feedback.error { color: var(--accent-jra); }

/* ─── 10. reduced-motion 対応 ─── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── 11. タッチデバイスのhover無効化 ─── */
@media (hover: none) {
  .card:hover,
  .feature-card:hover,
  .glass-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
}

/* ─── 12. パンくずリスト ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

/* ─── 13. CTA階層の明確化 ─── */
.btn-cta-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: var(--text-base);
  box-shadow: 0 4px 15px rgba(91,173,230,0.3);
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91,173,230,0.4);
}

.btn-cta-secondary {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  cursor: pointer;
  font-size: var(--text-base);
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-cta-secondary:hover {
  background: rgba(91,173,230,0.08);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   UI v5.2 — Flowing Design System
   セクション間の滑らかな視覚フローとビジュアルリズム
   ═══════════════════════════════════════════════════════════ */

/* ─── 1. 流れるボディ背景 ─── */
body {
  background:
    linear-gradient(180deg,
      #f0f4f8 0%,
      #e8f0f8 25%,
      #f0f4f8 50%,
      #edf2f7 75%,
      #f0f4f8 100%);
  background-size: 100% 200vh;
}

/* ─── 2. セクション間の滑らかな繋ぎ ─── */
/* 各セクションが自然にグラデーションで溶け込む */
.section-flow-light {
  position: relative;
}
.section-flow-light::before {
  content: '';
  position: absolute;
  top: -60px; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(240,244,248,0.4) 30%,
    rgba(240,244,248,0.8) 60%,
    rgba(240,244,248,1) 100%);
  pointer-events: none;
  z-index: 1;
}

.section-flow-dark {
  position: relative;
}
.section-flow-dark::before {
  content: '';
  position: absolute;
  top: -60px; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(15,23,42,0.3) 40%,
    rgba(15,23,42,0.7) 70%,
    rgba(15,23,42,1) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ─── 3. ウェーブディバイダー ─── */
.wave-top {
  position: relative;
}
.wave-top::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 80px;
  background: inherit;
  clip-path: ellipse(60% 100% at 50% 100%);
  z-index: 2;
}

.wave-bottom {
  position: relative;
}
.wave-bottom::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  background: inherit;
  clip-path: ellipse(60% 100% at 50% 0%);
  z-index: 2;
}

/* ─── 4. よりスムーズなスクロールリビール ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-25px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(25px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── 5. カードの流れるホバー効果 ─── */
.card {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover {
  box-shadow: 0 20px 40px rgba(91,173,230,0.1), 0 8px 16px rgba(0,0,0,0.04);
  transform: translateY(-3px);
}

.feature-card {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(91,173,230,0.12), 0 10px 20px rgba(0,0,0,0.04);
}

/* ─── 6. ヒーローからの滑らかなフェード ─── */
.hero::after {
  height: 100px;
  clip-path: ellipse(65% 100% at 50% 100%);
}

/* ─── 7. フッターへの滑らかなフェード ─── */
.site-footer::before {
  height: 100px;
  clip-path: ellipse(65% 100% at 50% 0%);
}

/* ─── 8. セクションの視覚リズム（統一パディング） ─── */
section {
  position: relative;
}

/* ─── 9. ステガー遅延の改善（より自然な間隔） ─── */
.stagger-1 { transition-delay: 0.06s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.18s; }
.stagger-4 { transition-delay: 0.24s; }
.stagger-5 { transition-delay: 0.30s; }
.stagger-6 { transition-delay: 0.36s; }
.stagger-7 { transition-delay: 0.42s; }
.stagger-8 { transition-delay: 0.48s; }

/* ─── 10. スムーズなセクション背景グラデーション ─── */
.section-bg-gradient {
  background: linear-gradient(180deg,
    rgba(240,247,255,0) 0%,
    rgba(240,247,255,0.6) 15%,
    rgba(240,247,255,0.9) 50%,
    rgba(240,247,255,0.6) 85%,
    rgba(240,247,255,0) 100%);
}

.section-bg-gradient-dark {
  background: linear-gradient(180deg,
    rgba(15,23,42,0) 0%,
    rgba(15,23,42,0.7) 10%,
    rgba(15,23,42,1) 30%,
    rgba(15,23,42,1) 70%,
    rgba(15,23,42,0.7) 90%,
    rgba(15,23,42,0) 100%);
}

/* ─── 11. アンビエントフロート（微かな浮遊感） ─── */
@keyframes ambientFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.ambient-float {
  animation: ambientFloat 6s ease-in-out infinite;
}

/* ─── 12. テキストの流れ改善 ─── */
.section-title {
  line-height: 1.4;
  letter-spacing: -0.025em;
}
.section-desc {
  line-height: 1.9;
  letter-spacing: 0.01em;
}

/* ─── 13. グラスカードの滑らかなトランジション ─── */
.glass-card,
.glass-light {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.glass-card:hover,
.glass-light:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(91,173,230,0.12);
}

/* ─── 14. 滑らかなフェードイン（改善版） ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── 15. ヘッダーの流れ改善 ─── */
.header {
  transition: background 0.5s ease, box-shadow 0.5s ease;
}

/* ─── 16. テーブルの流れ改善 ─── */
.data-table tbody tr {
  transition: background 0.3s ease, transform 0.3s ease;
}
.venue-table tbody tr {
  transition: background 0.3s ease;
}

/* ─── 17. セクション間の微妙なボーダーグロー ─── */
.card::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(91,173,230,0.15) 20%,
    rgba(91,173,230,0.3) 50%,
    rgba(91,173,230,0.15) 80%,
    transparent 100%);
}

/* ─── 18. タイポグラフィのフロー ─── */
h1, h2, h3, h4, h5, h6 {
  text-rendering: optimizeLegibility;
}

p {
  text-rendering: optimizeLegibility;
}

/* ─── 19. レスポンシブフロー改善 ─── */
@media (max-width: 600px) {
  .hero::after {
    height: 60px;
    clip-path: ellipse(70% 100% at 50% 100%);
  }
  .site-footer::before {
    height: 60px;
    clip-path: ellipse(70% 100% at 50% 0%);
  }
}
