/* ========================================
   FunterU Liquid Glass Design System
   iOS Water & Glass Texture Recreation
   ======================================== */

/* ---------- Core Design Tokens ---------- */
:root {
  /* Brand Identity */
  --app-yellow: #FFBE64;
  --app-yellow-light: #FFD89C;
  --app-yellow-dark: #E09B47;
  
  /* Glass & Liquid Colors - Dark Mode */
  --glass-bg-dark: rgba(255, 255, 255, 0.05);
  --glass-border-dark: rgba(255, 255, 255, 0.18);
  --glass-highlight-dark: rgba(255, 255, 255, 0.4);
  --background-dark: #0E1116;
  --text-high-dark: #ECEFF1;
  --text-medium-dark: #B5BCC4;
  --text-low-dark: #9FA4AA;
  
  /* Glass & Liquid Colors - Light Mode */
  --glass-bg-light: rgba(255, 255, 255, 0.55);
  --glass-border-light: rgba(255, 255, 255, 0.8);
  --glass-highlight-light: rgba(255, 255, 255, 0.9);
  --background-light: #F2F4F8;
  --text-high-light: #1C1E23;
  --text-medium-light: #5A6169;
  --text-low-light: #70757A;
  
  /* Active Theme Variables */
  --glass-bg: var(--glass-bg-dark);
  --glass-border: var(--glass-border-dark);
  --glass-highlight: var(--glass-highlight-dark);
  --background: var(--background-dark);
  --text-high: var(--text-high-dark);
  --text-medium: var(--text-medium-dark);
  --text-low: var(--text-low-dark);
  
  /* iOS Typography Scale */
  --large-title: clamp(28px, 5vw, 36px);
  --title-1: clamp(24px, 4vw, 28px);
  --title-2: clamp(20px, 3.5vw, 22px);
  --headline: clamp(16px, 2.5vw, 17px);
  --body: clamp(16px, 1.8vw, 20px);
  
  /* Spacing & Sizing */
  --radius-small: 16px;
  --radius-medium: 20px;
  --radius-large: 24px;
  --radius-xl: 28px;
  
  /* Glass Effects */
  --blur-intensity: 24px;
  --saturation: 160%;
  
  /* Animation Curves */
  --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  
  /* Safe Areas */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

/* Light Mode Override */
@media (prefers-color-scheme: light) {
  :root {
    --glass-bg: var(--glass-bg-light);
    --glass-border: var(--glass-border-light);
    --glass-highlight: var(--glass-highlight-light);
    --background: var(--background-light);
    --text-high: var(--text-high-light);
    --text-medium: var(--text-medium-light);
    --text-low: var(--text-low-light);
  }
  
  /* ライトモードでの文字太さ調整 */
  body, p, span, div, a, button, input, textarea, select, label, li, td, th, .text-high, .text-medium, .text-low {
    font-weight: 600 !important;
  }
  
  h1, h2, h3, h4, h5, h6, strong, b, .title, .headline, .hero-title, .hero-gradient-text, .section-title {
    font-weight: 900 !important;
  }
  
  .btn, nav a, .nav-link {
    font-weight: 700 !important;
  }
}

[data-theme="light"] {
  --glass-bg: var(--glass-bg-light);
  --glass-border: var(--glass-border-light);
  --glass-highlight: var(--glass-highlight-light);
  --background: var(--background-light);
  --text-high: var(--text-high-light);
  --text-medium: var(--text-medium-light);
  --text-low: var(--text-low-light);
}

/* data-theme="light"の場合の文字太さ調整 */
[data-theme="light"] body,
[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] div,
[data-theme="light"] a,
[data-theme="light"] button,
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select,
[data-theme="light"] label,
[data-theme="light"] li,
[data-theme="light"] td,
[data-theme="light"] th,
[data-theme="light"] .text-high,
[data-theme="light"] .text-medium,
[data-theme="light"] .text-low {
  font-weight: 600 !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] strong,
[data-theme="light"] b,
[data-theme="light"] .title,
[data-theme="light"] .headline,
[data-theme="light"] .hero-title,
[data-theme="light"] .hero-gradient-text,
[data-theme="light"] .section-title {
  font-weight: 900 !important;
}

[data-theme="light"] .btn,
[data-theme="light"] nav a,
[data-theme="light"] .nav-link {
  font-weight: 700 !important;
}

[data-theme="dark"] {
  --glass-bg: var(--glass-bg-dark);
  --glass-border: var(--glass-border-dark);
  --glass-highlight: var(--glass-highlight-dark);
  --background: var(--background-dark);
  --text-high: var(--text-high-dark);
  --text-medium: var(--text-medium-dark);
  --text-low: var(--text-low-dark);
}

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

html {
  font-size: var(--body);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
  /* scroll-snap-type: y mandatory; -- Removed to fix scroll bug */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: var(--background);
  color: var(--text-high);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Enhanced background system */
.liquid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--background);
}

.liquid-gradient {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background: 
    radial-gradient(ellipse at 10% 20%, rgba(255, 190, 100, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 10%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 70%, rgba(255, 102, 102, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 80%, rgba(102, 255, 178, 0.08) 0%, transparent 40%);
  animation: liquidGradientFlow 30s ease-in-out infinite;
}

@keyframes liquidGradientFlow {
  0%, 100% {
    transform: rotate(0deg) scale(1) translate(0, 0);
  }
  25% {
    transform: rotate(90deg) scale(1.1) translate(-10%, 10%);
  }
  50% {
    transform: rotate(180deg) scale(1) translate(10%, -10%);
  }
  75% {
    transform: rotate(270deg) scale(0.9) translate(-10%, -10%);
  }
}

.liquid-mesh {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.02) 35px, rgba(255, 255, 255, 0.02) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.02) 35px, rgba(255, 255, 255, 0.02) 70px);
  opacity: 0.5;
}

/* Light mode mesh pattern */
[data-theme="light"] .liquid-mesh {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0, 0, 0, 0.02) 35px, rgba(0, 0, 0, 0.02) 70px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(0, 0, 0, 0.02) 35px, rgba(0, 0, 0, 0.02) 70px);
  opacity: 0.5;
}

.liquid-orbs {
  position: absolute;
  width: 100%;
  height: 100%;
}

.liquid-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 190, 100, 0.2), transparent);
  filter: blur(40px);
  opacity: 0.6;
  animation: orbFloat 20s ease-in-out infinite;
}

.liquid-orb:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-duration: 25s;
}

.liquid-orb:nth-child(2) {
  width: 400px;
  height: 400px;
  bottom: -200px;
  right: -200px;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.15), transparent);
  animation-duration: 30s;
  animation-delay: -10s;
}

.liquid-orb:nth-child(3) {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 30% 30%, rgba(102, 255, 178, 0.1), transparent);
  animation-duration: 35s;
  animation-delay: -20s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ---------- Glass Card System ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-intensity)) saturate(var(--saturation));
  -webkit-backdrop-filter: blur(var(--blur-intensity)) saturate(var(--saturation));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-highlight),
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
  opacity: 0.6;
}

/* Removed generic glass hover animation */

.glass-strong {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
}

/* Card Variations */
.glass-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
}

.glass-panel {
  padding: 1.5rem;
  border-radius: var(--radius-medium);
}

.glass-button {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-small);
  border: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-high);
  font-weight: 500;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
}

.glass-button span {
  transition: transform 0.3s var(--ease-out-expo);
}

.glass-button svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.glass-button:hover {
  transform: translateY(-2px) scale(1.03) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px var(--glass-highlight) !important;
}

.glass-button:hover svg {
  transform: translateX(3px) scale(1.1) !important;
}

.glass-button:hover span {
  transform: translateY(-1px) !important;
}

.glass-button:active {
  transform: translateY(0) scale(0.98);
}

/* Primary Button */
.glass-button-primary {
  background: linear-gradient(135deg, var(--app-yellow), var(--app-yellow-light));
  color: rgba(0, 0, 0, 0.8);
  font-weight: 600;
  box-shadow: 
    0 4px 16px rgba(255, 190, 100, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.glass-button-primary:hover {
  background: linear-gradient(135deg, var(--app-yellow-light), var(--app-yellow)) !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 
    0 6px 24px rgba(255, 190, 100, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.glass-button-primary:active {
  transform: translateY(0) scale(1.01);
}

/* ---------- Liquid Navigation ---------- */
.liquid-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: calc(60px + var(--safe-top));
  padding-top: calc(8px + var(--safe-top));
  background: rgba(14, 17, 22, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s var(--ease-out-expo);
}

.liquid-nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-intensity)) saturate(var(--saturation));
  -webkit-backdrop-filter: blur(var(--blur-intensity)) saturate(var(--saturation));
  border-bottom-color: var(--glass-border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 max(1rem, var(--safe-left)) 0 max(1rem, var(--safe-right));
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-high);
  font-weight: 600;
  font-size: 1.125rem;
  transition: transform 0.2s var(--spring);
}

/* ライトモード時のみフォントを太く */
:root:not([data-theme="dark"]) .liquid-nav .nav-brand {
  font-weight: 700 !important;
}

:root:not([data-theme="dark"]) .liquid-nav .nav-brand span {
  font-weight: 700 !important;
}

.nav-brand:hover {
  transform: scale(1.05);
}

/* すべてのページで同寸法に固定 */
.liquid-nav .brand-logo,
nav.liquid-nav img.logo {
  height: 28px;       /* 製品ページに合わせた数値 */
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-high);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  transition: all 0.2s var(--ease-out-expo);
  position: relative;
  white-space: nowrap;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--app-yellow);
  transition: all 0.3s var(--ease-out-expo);
  transform: translateX(-50%);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link:hover::before {
  width: 80%;
}

.nav-link.active {
  color: var(--app-yellow);
}

.nav-link.active::before {
  width: 80%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-high);
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--glass-bg);
}

/* ---------- Liquid Hero Section ---------- */
.liquid-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(60px + var(--safe-top) + 2rem) max(1rem, var(--safe-left)) 2rem max(1rem, var(--safe-right));
  position: relative;
  /* scroll-snap-align: start; -- Removed to fix scroll bug */
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 10;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--app-yellow);
  animation: badgeFloat 3s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-high);
  background: linear-gradient(135deg, var(--text-high), var(--app-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 4s ease-in-out infinite alternate;
  text-align: center;
}

/* Hero Gradient Text - Light mode optimized */
.hero-gradient-text {
  background: linear-gradient(135deg, var(--app-yellow), var(--app-yellow-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Light mode specific adjustment for better readability */
[data-theme="light"] .hero-gradient-text {
  background: linear-gradient(135deg, #4f4a4a, #B57A3C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .hero-gradient-text {
    background: linear-gradient(135deg, #4f4a4a, #B57A3C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-low);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 4vw, 2rem);
  flex-wrap: nowrap;
  margin-top: 3rem;
  overflow-x: hidden;
  overflow-y: hidden;
}

.stat-item {
  text-align: center;
  min-width: clamp(80px, 20vw, 120px);
  flex-shrink: 0;
  padding: 0.75rem clamp(0.25rem, 2vw, 0.5rem);
  /* Custom glass effect for stats without shadow */
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-medium);
  box-shadow: none;
  transform: none;
}

.stat-number {
  display: block;
  font-size: var(--title-1);
  font-weight: 700;
  color: var(--app-yellow);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-low);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ---------- Liquid Sections ---------- */
.liquid-section {
  padding: 5rem max(1rem, var(--safe-left)) 5rem max(1rem, var(--safe-right));
  position: relative;
  /* scroll-snap-align: start; -- Removed to fix scroll bug */
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: var(--large-title);
  font-weight: 700;
  color: var(--text-high);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.section-subtitle {
  font-size: var(--title-2);
  font-weight: 400;
  color: var(--text-low);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ---------- Card Grid System ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.liquid-card {
  padding: 2rem;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}

.liquid-card[data-popup] {
  cursor: pointer;
  outline: none;
}

.liquid-card[data-popup]:focus {
  outline: 2px solid var(--app-yellow);
  outline-offset: 2px;
}

/* Card hover animation moved to hover-animations.css */

/* Card hovering state moved to hover-animations.css */

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  /* Remove background for product logos */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: rgba(0, 0, 0, 0.8);
  font-size: 1.5rem;
  transition: transform 0.3s var(--ease-out-expo);
}

.card-title {
  font-size: var(--title-2);
  font-weight: 600;
  color: var(--text-high);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.card-description {
  color: var(--text-low);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.card-link {
  color: var(--app-yellow);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s ease;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.card-link:hover {
  gap: 0.75rem;
}

.card-link:focus {
  outline: none;
}

.card-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* ---------- Responsive Design ---------- */
@media (max-width: 768px) {
  html {
    font-size: clamp(16px, 4vw, 18px);
  }
  
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25),
                inset 0 0 0 0.5px rgba(255, 255, 255, 0.2);
  }
  
  /* Light mode adjustment for mobile nav */
  @media (prefers-color-scheme: light) {
    .nav-links {
      background: rgba(255, 255, 255, 0.95);
      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1),
                  inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
    }
  }
  
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1),
                inset 0 0 0 0.5px rgba(255, 255, 255, 0.8);
  }
  
  .nav-links.open {
    display: flex;
    transform: translateY(0);
  }
  
  .nav-toggle {
    display: block;
    z-index: 1000;
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 0 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .hero-actions .glass-button {
    width: 100%;
    max-width: 250px;
    justify-content: center;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }
  
  .hero-stats {
    gap: clamp(0.25rem, 2vw, 1rem);
    padding: 0 1rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .liquid-section {
    min-height: auto;
    padding: 3rem 1rem;
  }
  
  .liquid-card:hover {
    transform: translateY(-4px) scale(1.02);
  }
}

/* Desktop Hover Effects - Ensure they work on devices with hover capability */
@media (hover: hover) and (pointer: fine) {
  .liquid-card:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow:
      inset 0 0 0 0.5px var(--glass-highlight),
      0 8px 24px rgba(0, 0, 0, 0.2),
      0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  
  .glass-button:hover {
    transform: translateY(-2px) scale(1.03) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 
      0 6px 24px rgba(0, 0, 0, 0.15),
      inset 0 0 0 1px var(--glass-highlight) !important;
  }
  
  .glass-button:hover svg {
    transform: translateX(3px) scale(1.1) !important;
  }
  
  .glass-button:hover span {
    transform: translateY(-1px) !important;
  }
  
  .glass-button-primary:hover {
    background: linear-gradient(135deg, var(--app-yellow-light), var(--app-yellow)) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 
      0 8px 32px rgba(255, 190, 100, 0.5),
      0 4px 16px rgba(255, 190, 100, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
  }
  
  .glass-button-primary:hover svg {
    transform: translateX(4px) scale(1.15) !important;
  }
  
  .glass-button-primary:hover span {
    transform: translateY(-2px) !important;
  }
  
  .nav-link:hover {
    transform: translateY(-1px) !important;
  }
}

/* Touch Device Optimizations - Only disable on actual touch devices */
@media (hover: none) and (pointer: coarse) {
  .liquid-card:hover,
  .contract-project-card:hover,
  .glass-button:hover,
  .nav-link:hover,
  .stat-item:hover {
    transform: none !important;
  }
  
  .liquid-card:active,
  .contract-project-card:active {
    transform: scale(0.98) !important;
  }
  
  .glass-button:active {
    transform: scale(0.95) !important;
  }
  
  .stat-item:active {
    transform: scale(0.97) !important;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
}

/* High Contrast Support */
@media (prefers-contrast: high) {
  :root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-low: var(--text-high);
  }
}

/* ---------- Modal Popup ---------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out-expo);
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s var(--ease-out-expo);
  /* Opaque background for better readability */
  background: var(--background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* 汎用モーダル用閉じるボタン（製品モーダル以外） */
.modal-overlay:not(#detailModal) .modal-close {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: var(--text-high);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10001;
}

.modal-overlay:not(#detailModal) .modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-50%) scale(1.1);
}

.modal-body {
  padding: 2rem;
}

.modal-title {
  font-size: var(--title-1);
  font-weight: 600;
  color: var(--text-high);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.modal-text {
  color: var(--text-low);
  line-height: 1.6;
  font-size: 1rem;
}

.modal-text h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-high);
  margin: 1.5rem 0 0 0;
}

.modal-text h4:first-child {
  margin-top: 0;
}

.modal-text ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.modal-text li {
  margin: 0.5rem 0;
}


/* Contact Form Styles */
.contact-form-container {
  max-width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-high);
  font-size: 0.9rem;
}

.required {
  color: #ff6b6b;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-small);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity));
  color: var(--text-high);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--app-yellow);
  box-shadow: 0 0 0 2px rgba(255, 190, 100, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  cursor: pointer;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.submit-btn {
  min-width: 120px;
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: 90vh;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: var(--title-2);
  }
  
  .form-actions {
    justify-content: center;
  }
  
  .submit-btn {
    width: 100%;
  }
}

/* ========================================
   Product Card Logo Theme Support
   ======================================== */

/* ========================================
   Card Icon Containers - Base Styling
   ======================================== */

.card-icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
}

/* ========================================
   Info Card Icons - Elegant Glass Design (Different from App Icons)
   Sophisticated glass morphism for About/Services/Technology cards
   ======================================== */

.card-icon svg {
  /* Info card SVG icons - elegant and refined */
  width: 24px;
  height: 24px;
  color: var(--app-yellow);
  stroke-width: 1.5;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  filter: drop-shadow(0 1px 3px rgba(255, 190, 100, 0.3));
}

/* Info card icons - Sophisticated glass orb design */
.card-icon:not(:has(.product-card-logo)) {
  width: 56px;
  height: 56px;
  
  /* Perfect circle - elegant and modern */
  border-radius: 50%;
  
  /* Sophisticated glass gradient */
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.15) 0%,
    rgba(255, 190, 100, 0.08) 50%,
    rgba(255, 190, 100, 0.05) 100%
  );
  
  /* Elegant glass border */
  border: 1px solid rgba(255, 190, 100, 0.2);
  
  /* Premium glass morphism effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  
  /* Sophisticated shadow system */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.liquid-card:hover .card-icon:not(:has(.product-card-logo)) {
  /* Elegant hover animation */
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.25) 0%,
    rgba(255, 190, 100, 0.15) 50%,
    rgba(255, 190, 100, 0.1) 100%
  );
  
  border-color: rgba(255, 190, 100, 0.4);
  
  /* Enhanced glass effect on hover */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    
  transform: translateY(-2px);
}

.liquid-card:hover .card-icon svg {
  color: var(--app-yellow-light);
  transform: scale(1.15);
  filter: drop-shadow(0 2px 6px rgba(255, 190, 100, 0.4));
}

/* ========================================
   Home Page App Icons Grid - Simple Layout
   ======================================== */

.app-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 0 2rem 0;  /* 上部のパディングを少し減らして調整 */
}

/* ホバー時エフェクトの原点を中央に変更 */
.app-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem 0.5rem 0.5rem 0.5rem;  /* 上部のパディングを増やしてホバー範囲を拡大 */
  border-radius: 16px;
}

.app-icon-item:hover {
  /* transform: translateY(-4px); */ /* 親要素は動かさない */
  background: rgba(255, 190, 100, 0.05);  /* ホバー時に薄い背景色を追加 */
}

.app-icon-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  margin-top: 1rem;  /* アイコンの上にスペースを追加 */
}

.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 22.37%; /* iOS standard */
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform var(--transition-base);
  transform-origin: 50% 50%;         /* X=中心, Y=中心 */
}

.app-icon-item:hover .app-icon {
  transform: translateY(-4px) scale(1.06); /* 上方向のみ */
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.app-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-high);
  text-align: center;
  line-height: 1.2;
  transition: color 0.3s ease;
}

.app-icon-item:hover .app-name {
  color: var(--app-yellow);
}

@media (max-width: 768px) {
  .app-icons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 400px;
  }
  
  .app-icon-container {
    width: 50px;
    height: 50px;
  }
  
  .app-icon {
    width: 50px;
    height: 50px;
  }
  
  .app-name {
    font-size: 0.8rem;
  }
}

/* ========================================
   Products Page Category Toggle
   ======================================== */

/* Modern Segmented Control Style */
.category-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  padding: 0.25rem;
  gap: 0;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 0;
}

.category-btn {
  padding: 0.5rem 1.75rem;
  border: none;
  border-radius: calc(var(--radius-large) - 0.25rem);
  background: transparent;
  color: var(--text-medium);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.category-btn:hover {
  color: var(--text-high);
}

.category-btn.active {
  color: var(--background);
  font-weight: 600;
}

/* Animated sliding background indicator */
.category-indicator {
  position: absolute;
  top: 0.25rem;
  height: calc(100% - 0.5rem);
  background: var(--app-yellow);
  border-radius: calc(var(--radius-large) - 0.25rem);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.products-category {
  margin-bottom: 4rem;
}

/* Category filtering is now handled by JavaScript */
/* Categories are visible by default until filtered */

/* Card Actions for Products Page */
.card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  justify-content: center;
}

/* Contract Development Card Styles */
.contract-projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contract-project-card {
  padding: 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  backdrop-filter: blur(var(--blur-intensity));
  -webkit-backdrop-filter: blur(var(--blur-intensity));
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}

.contract-project-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    inset 0 0 0 0.5px var(--glass-highlight),
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 190, 100, 0.3);
}

.project-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.project-icon {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-medium);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contract-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-info {
  flex: 1;
}

.project-title {
  font-size: 1.5rem;
  color: var(--text-high);
  margin-bottom: 0.75rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 190, 100, 0.1);
  color: var(--app-yellow);
  border-radius: var(--radius-small);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 190, 100, 0.2);
}

.project-body {
  margin-bottom: 1.5rem;
}

.project-description {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-medium);
  border: 1px solid var(--glass-border);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-label {
  font-size: 0.75rem;
  color: var(--text-low);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  color: var(--text-high);
  font-weight: 500;
}

.project-footer {
  display: flex;
  justify-content: flex-end;
}

.glass-button-small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .project-info {
    width: 100%;
  }
  
  .project-tags {
    justify-content: center;
  }
  
  .project-details {
    grid-template-columns: 1fr;
  }
  
  .project-footer {
    justify-content: center;
  }
}

.portfolio-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--app-yellow);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.portfolio-btn:hover {
  background: rgba(255, 190, 100, 0.1);
  border-color: var(--app-yellow);
  transform: translateY(-1px);
}

/* Enhanced Product Detail Modal */
.modal-content {
  position: relative;
  /* Opaque background for better readability */
  background: var(--background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 var(--glass-highlight);
  padding: 0;
  max-width: 900px;
  max-height: 95vh;
  overflow: hidden;
  margin: 1rem;
  animation: modalSlideIn 0.4s var(--spring);
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  position: relative;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.05) 0%,
    rgba(255, 190, 100, 0.02) 100%
  );
}

.modal-header .app-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 22.37%;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 1rem;
}

.modal-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-high);
  margin-bottom: 0.5rem;
}

.modal-header .app-subtitle {
  font-size: 1.1rem;
  color: var(--app-yellow);
  font-weight: 500;
  margin-bottom: 1rem;
}

.modal-header .app-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 190, 100, 0.1);
  border: 1px solid rgba(255, 190, 100, 0.3);
  border-radius: var(--radius-small);
  color: var(--app-yellow);
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-body {
  padding: 0;
  overflow-y: auto;
  max-height: calc(95vh - 140px);
  min-height: calc(95vh - 140px);
  scrollbar-width: thin;
  scrollbar-color: var(--app-yellow) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--app-yellow);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--app-yellow-light);
}

.modal-tabs {
  display: flex;
  justify-content: center;
  background: transparent;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
  height: 44px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

/* モバイルで横スクロール可能であることを示すインジケーター */
@media (max-width: 640px) {
  .modal-tabs {
    justify-content: flex-start;
  }
  
  .modal-tabs::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--background) 90%);
    pointer-events: none;
    z-index: 1;
  }
  
  .modal-tabs.scrolled-end::after {
    display: none;
  }
}

.modal-tab {
  flex: 1;
  flex-shrink: 0;
  padding: 0 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-low);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 640px) {
  .modal-tab {
    flex: none;
    min-width: max-content;
  }
}

.modal-tab:hover {
  color: var(--text-medium);
  opacity: 1;
}

.modal-tab.active {
  color: var(--app-yellow);
  opacity: 1;
  font-weight: 600;
}

.modal-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--app-yellow);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.modal-tab.active::after {
  transform: scaleX(1);
}

.modal-tab-content {
  padding: 2rem;
  display: none;
  opacity: 0;
  /* transformとtransitionを削除してスクロールをスムーズに */
  /* min-heightを削除してスクロールを正常化 */
  height: auto;
}

.modal-tab-content.active {
  display: block;
  opacity: 1;
  /* animationを削除してスクロールのパフォーマンスを向上 */
}

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

.detail-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 190, 100, 0.02);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 190, 100, 0.08);
}

.detail-section:last-child {
  margin-bottom: 50vh; /* ビューポートの半分の余白を追加 */
}

.detail-section h4 {
  color: var(--app-yellow);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-section h4::before {
  content: "✨";
  font-size: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-card {
  background: rgba(255, 190, 100, 0.05);
  border: 1px solid rgba(255, 190, 100, 0.15);
  border-radius: var(--radius-medium);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

/* Removed hover animation for feature cards in modal */

.feature-card h5 {
  color: var(--app-yellow);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-medium);
  font-size: 0.9rem;
  line-height: 1.5;
}

.download-section {
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.1) 0%,
    rgba(255, 190, 100, 0.05) 100%
  );
  border: 1px solid rgba(255, 190, 100, 0.2);
  border-radius: var(--radius-medium);
  padding: 2rem;
  /* 下部に余白を追加 */
  padding-bottom: 4rem;
  text-align: center;
  margin: 2rem 0;
  margin-bottom: 50vh; /* ビューポートの半分の余白を追加 */
  overflow: hidden;
}

.download-section h4 {
  color: var(--app-yellow);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--app-yellow), var(--app-yellow-light));
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  border-radius: var(--radius-medium);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 190, 100, 0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 190, 100, 0.4);
}

/* App Store公式ボタン */
.download-btn.app-store-btn {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: inline-block;
  line-height: 0;
}

.download-btn.app-store-btn:hover {
  transform: scale(1.05) translateY(0);
  box-shadow: none;
}

.download-btn.app-store-btn img {
  display: block;
  width: auto;
  height: 40px;
}

/* プラットフォームメッセージ */
.platform-message {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-medium);
  min-height: 1.5rem;
}

/* Portfolio Modal Styling - Enterprise Focus */
.portfolio-modal {
  max-width: 1200px;
  max-height: 95vh;
  animation: portfolioSlideIn 0.5s var(--spring);
}

@keyframes portfolioSlideIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portfolio-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.1) 0%,
    rgba(255, 190, 100, 0.03) 100%
  );
  border-radius: var(--radius-large);
  border: 1px solid rgba(255, 190, 100, 0.2);
}

.portfolio-icon {
  width: 100px;
  height: 100px;
  border-radius: 22.37%;
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.25),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.15),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.portfolio-title-section h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-high);
  margin-bottom: 0.5rem;
}

.portfolio-subtitle {
  font-size: 1.1rem;
  color: var(--app-yellow);
  font-weight: 500;
  margin-bottom: 1rem;
}

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

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 190, 100, 0.1);
  border: 1px solid rgba(255, 190, 100, 0.3);
  border-radius: var(--radius-medium);
  color: var(--text-high);
  font-size: 0.9rem;
  font-weight: 500;
}

.portfolio-content {
  padding: 0 2rem 2rem;
}

.portfolio-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(255, 190, 100, 0.02);
  border: 1px solid rgba(255, 190, 100, 0.1);
  border-radius: var(--radius-large);
}

.portfolio-section:last-child {
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2rem;
}

.portfolio-section h4 {
  color: var(--app-yellow);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portfolio-section h4::before {
  content: "🎯";
  font-size: 1.2rem;
}

.portfolio-section h4[data-section="tech"]::before { content: "⚡"; }
.portfolio-section h4[data-section="team"]::before { content: "👥"; }
.portfolio-section h4[data-section="features"]::before { content: "✨"; }
.portfolio-section h4[data-section="challenges"]::before { content: "🎯"; }
.portfolio-section h4[data-section="results"]::before { content: "📊"; }
.portfolio-section h4[data-section="gallery"]::before { content: "🖼️"; }

.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.enterprise-card {
  background: rgba(255, 190, 100, 0.05);
  border: 1px solid rgba(255, 190, 100, 0.2);
  border-radius: var(--radius-medium);
  padding: 2rem;
  transition: all 0.3s ease;
}

/* Removed hover animation for enterprise cards in modal */

.enterprise-card h5 {
  color: var(--app-yellow);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.enterprise-card p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.enterprise-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.metric-card {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, 
    rgba(255, 190, 100, 0.1) 0%,
    rgba(255, 190, 100, 0.05) 100%
  );
  border: 1px solid rgba(255, 190, 100, 0.2);
  border-radius: var(--radius-medium);
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--app-yellow);
  display: block;
  margin-bottom: 0.5rem;
}

.metric-label {
  color: var(--text-medium);
  font-size: 0.9rem;
  font-weight: 500;
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.tech-tag {
  padding: 0.75rem 1rem;
  background: rgba(255, 190, 100, 0.1);
  border: 1px solid rgba(255, 190, 100, 0.3);
  border-radius: var(--radius-medium);
  color: var(--app-yellow);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(255, 190, 100, 0.15);
  border-color: rgba(255, 190, 100, 0.4);
  transform: translateY(-2px);
}

.challenge-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
  position: relative;
}

.challenge-solution::before {
  content: '→';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: var(--app-yellow);
  font-weight: bold;
  background: var(--background);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--app-yellow);
  z-index: 2;
}

.challenge-item,
.solution-item {
  padding: 1.5rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 190, 100, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.challenge-item:hover,
.solution-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.challenge-item {
  background: rgba(255, 100, 100, 0.05);
  border-color: rgba(255, 100, 100, 0.2);
}

.solution-item {
  background: rgba(100, 255, 100, 0.05);
  border-color: rgba(100, 255, 100, 0.2);
}

.challenge-item h6 {
  color: #ff6b6b;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.solution-item h6 {
  color: #51cf66;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.portfolio-image {
  width: 100%;
  border-radius: var(--radius-medium);
  border: 2px solid var(--glass-border);
  transition: all 0.3s ease;
}

.portfolio-image:hover {
  border-color: var(--app-yellow);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .portfolio-header {
    flex-direction: column;
    text-align: center;
  }
  
  .challenge-solution {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .challenge-solution::before {
    content: '↓';
    top: auto;
    left: 50%;
    bottom: -60px;
    transform: translateX(-50%);
  }
  
  .enterprise-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .modal-tab-content {
    padding: 1.5rem;
  }
  
  .enterprise-grid {
    grid-template-columns: 1fr;
  }
  
  .challenge-solution {
    grid-template-columns: 1fr;
  }
  
  .portfolio-modal {
    max-width: 95vw;
    margin: 0.5rem;
  }
}

.portfolio-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.portfolio-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.portfolio-section h4 {
  color: var(--app-yellow);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 190, 100, 0.1);
  border: 1px solid rgba(255, 190, 100, 0.3);
  border-radius: var(--radius-small);
  color: var(--app-yellow);
  font-size: 0.8rem;
  font-weight: 500;
}

.development-info p,
.features-list ul,
.challenges-solutions p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.features-list ul {
  list-style: none;
  padding: 0;
}

.features-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 190, 100, 0.1);
}

.features-list li:before {
  content: "✨";
  margin-right: 0.5rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.portfolio-image {
  width: 100%;
  border-radius: var(--radius-medium);
  border: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
  .category-toggle {
    padding: 0.2rem;
  }
  
  .category-btn {
    padding: 0.4rem 1.2rem;
    font-size: 0.8rem;
  }
  
  .card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .portfolio-modal {
    max-width: 95vw;
    margin: 1rem;
  }
}

/* ========================================
   Product Card App Icons - iOS Style
   Distinct from UI icons with premium styling
   ======================================== */

.product-card-logo {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 56px;
  height: 56px;
  
  /* iOS app icon styling - premium look */
  border-radius: 22.37%; /* iOS standard rounded corners */
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15); /* Premium highlight */
  
  /* iOS icon glass effect */
  background: 
    linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%, rgba(0,0,0,0.05) 100%),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 0%, transparent 100%);
  background-blend-mode: overlay, normal;
  
  /* Smooth scaling with premium animation */
  transform-origin: center;
  
  /* Prevent image artifacts */
  object-fit: cover;
  object-position: center;
}

.product-card-logo:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

/* ========================================
   Universal App Icon Template
   For 1024x1024 PNG files
   
   Usage Examples:
   <img src="icon.png" class="app-icon-small">   <!-- 40x40px -->
   <img src="icon.png" class="app-icon-medium">  <!-- 56x56px -->
   <img src="icon.png" class="app-icon-large">   <!-- 80x80px -->
   <img src="icon.png" class="app-icon-xl">      <!-- 120x120px -->
   
   Features:
   - iOS-style rounded corners with accurate percentages
   - Automatic shadow and highlight effects
   - Hover animations with scale effect
   - Works with any 1024x1024 PNG file
   - Maintains aspect ratio and prevents distortion
   ======================================== */

.app-icon-small {
  width: 40px;
  height: 40px;
  border-radius: 8.95%; /* iOS small icon radius */
}

.app-icon-medium {
  width: 56px;
  height: 56px;
  border-radius: 12.53%; /* iOS medium icon radius */
}

.app-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 17.9%; /* iOS large icon radius */
}

.app-icon-xl {
  width: 120px;
  height: 120px;
  border-radius: 26.84%; /* iOS extra large icon radius */
}

/* Base iOS app icon styling for all sizes */
.app-icon-small,
.app-icon-medium, 
.app-icon-large,
.app-icon-xl {
  /* iOS standard styling */
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
  
  /* Subtle overlay effect */
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.05) 100%);
  background-blend-mode: overlay;
  
  /* Smooth transitions */
  transition: all 0.3s ease;
  transform-origin: center;
  
  /* Prevent image distortion */
  object-fit: cover;
  object-position: center;
}

.app-icon-small:hover,
.app-icon-medium:hover,
.app-icon-large:hover,
.app-icon-xl:hover {
  transform: scale(1.05);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.3),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.15);
}

/* Default visibility - show dark theme icons by default */
.light-theme-icon.product-card-logo {
  display: none;
}

.dark-theme-icon.product-card-logo {
  display: block;
}

/* Light theme product card logo visibility */
[data-theme="light"] .light-theme-icon.product-card-logo {
  display: block;
}
[data-theme="light"] .dark-theme-icon.product-card-logo {
  display: none;
}

/* Dark theme product card logo visibility */
[data-theme="dark"] .light-theme-icon.product-card-logo {
  display: none;
}
[data-theme="dark"] .dark-theme-icon.product-card-logo {
  display: block;
}

/* System preference fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .light-theme-icon.product-card-logo {
    display: block;
  }
  :root:not([data-theme]) .dark-theme-icon.product-card-logo {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .light-theme-icon.product-card-logo {
    display: none;
  }
  :root:not([data-theme]) .dark-theme-icon.product-card-logo {
    display: block;
  }
}

/* ========================================
   Theme Toggle Button
   ======================================== */

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Default theme icon visibility - show sun icon by default (for dark mode) */
.theme-icon.light-theme-icon {
  display: block;
}
.theme-icon.dark-theme-icon {
  display: none;
}

/* Theme icon visibility */
[data-theme="light"] .theme-icon.light-theme-icon {
  display: none;
}
[data-theme="light"] .theme-icon.dark-theme-icon {
  display: block;
}

[data-theme="dark"] .theme-icon.light-theme-icon {
  display: block;
}
[data-theme="dark"] .theme-icon.dark-theme-icon {
  display: none;
}

/* System preference fallback for theme icons */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-icon.light-theme-icon {
    display: none;
  }
  :root:not([data-theme]) .theme-icon.dark-theme-icon {
    display: block;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-icon.light-theme-icon {
    display: block;
  }
  :root:not([data-theme]) .theme-icon.dark-theme-icon {
    display: none;
  }
}

/* ========================================
   UI Icons (Non-App Icons)
   Clear distinction from app icons
   ======================================== */

/* UI Icons - Simple, functional styling */
.ui-icon {
  display: inline-block;
  color: var(--text-high);
  transition: all 0.2s ease;
}

.ui-icon:hover {
  color: var(--app-yellow);
  transform: scale(1.1);
}

/* Navigation SVG icons */
.nav-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: all 0.2s ease;
}

.nav-icon:hover {
  stroke: var(--app-yellow);
}

/* Theme toggle specific styles */
.theme-toggle {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 8px; /* Square rounded, not circular like app icons */
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--glass-highlight);
  border-color: var(--app-yellow);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-icon {
  font-size: 1.1rem;
  line-height: 1;
  transition: all 0.2s ease;
}


/* Mobile responsive */
@media (max-width: 768px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }
  
  .theme-icon {
    font-size: 1rem;
  }
  
  .nav-icon {
    width: 20px;
    height: 20px;
  }
}

/* ---------- Unified Modal Animation for All Modals ---------- */
/* Apply same animation to detailModal and portfolioModal */
#detailModal,
#portfolioModal,
#unifiedModal,
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out-expo);
}

#detailModal.active,
#portfolioModal.active,
#unifiedModal.active,
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Ensure content animation for all modals */
#detailModal .modal-content,
#portfolioModal .modal-content {
  transform: scale(0.95) translateY(20px);
  transition: all 0.3s var(--ease-out-expo);
}

#detailModal.active .modal-content,
#portfolioModal.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Fallback for modals without .modal-overlay class */
#detailModal:not(.modal-overlay),
#portfolioModal:not(.modal-overlay) {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

/* Portfolio List Styles */
.portfolio-list-card {
  position: relative;
  transition: all 0.3s ease;
}

.portfolio-list-card:hover {
  transform: translateY(-5px);
}

.portfolio-badges {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.portfolio-badge {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 190, 100, 0.1);
  border: 1px solid rgba(255, 190, 100, 0.3);
  border-radius: var(--radius-small);
  color: var(--app-yellow);
  font-size: 0.75rem;
  font-weight: 500;
}

.portfolio-metrics-preview {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-small);
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.metric-icon {
  font-size: 1.1rem;
}

.metric-value {
  color: var(--text-high);
  font-weight: 600;
}

.portfolio-detail-btn {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--app-yellow), var(--app-yellow-light));
  color: var(--background);
  border: none;
  border-radius: var(--radius-small);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-detail-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 190, 100, 0.3);
}

#portfolio-section {
  min-height: 50vh;
}

#portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Portfolio List Cards */
.portfolio-list-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.portfolio-list-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 190, 100, 0.2);
}

.portfolio-badges {
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portfolio-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 190, 100, 0.15);
  color: var(--app-yellow);
  border-radius: var(--radius-medium);
  font-size: 0.85rem;
  font-weight: 500;
}

.portfolio-metrics-preview {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.portfolio-metrics-preview .metric-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-small);
  font-size: 0.9rem;
}

.portfolio-metrics-preview .metric-icon {
  font-size: 1.1rem;
}

.portfolio-metrics-preview .metric-value {
  color: var(--text-high);
  font-weight: 600;
}

/* Business Value Cards - Removed */

/* Challenge & Solution Items */
.challenge-solution-item {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
}

.challenge-solution-item:last-child {
  margin-bottom: 0;
}

.challenge-part,
.solution-part,
.result-part {
  margin-bottom: 1rem;
}

.challenge-part:last-child,
.solution-part:last-child,
.result-part:last-child {
  margin-bottom: 0;
}

.challenge-part h6,
.solution-part h6,
.result-part h6 {
  font-size: 0.9rem;
  color: var(--app-yellow);
  margin-bottom: 0.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenge-part p,
.solution-part p,
.result-part p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin: 0;
}

.result-part {
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

/* Update Timeline Styles */
.update-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
  /* スクロール設定を調整 */
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
  padding-right: 0.5rem;
  /* 下部に十分な余白を追加してスクロール可能にする */
  padding-bottom: 50vh;
  /* スクロール関連のプロパティを削除 */
  /* Prevent layout jumps */
  position: relative;
  /* Standard scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: var(--app-yellow) transparent;
}

.update-timeline::-webkit-scrollbar {
  width: 6px;
}

.update-timeline::-webkit-scrollbar-track {
  background: transparent;
}

.update-timeline::-webkit-scrollbar-thumb {
  background: var(--app-yellow);
  border-radius: 3px;
  opacity: 0.5;
}

.update-timeline::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
}

/* Alternative: Use a wrapper to control height */
.update-timeline-wrapper {
  max-height: 400px;
  overflow: hidden;
  position: relative;
}

.update-timeline-wrapper .update-timeline {
  max-height: none;
  overflow-y: visible;
  padding-bottom: 1rem;
}

/* Update item styling */
.update-item {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-medium);
  position: relative;
}

.update-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.update-version {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--app-yellow);
  background: rgba(255, 190, 100, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-small);
}

.update-date {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.update-changes {
  list-style: none;
  padding: 0;
  margin: 0;
}

.update-changes li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.5;
}

.update-changes li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--app-yellow);
  font-weight: bold;
}

.update-changes li:last-child {
  margin-bottom: 0;
}

/* Footer Link Hover Effects */
footer a {
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

footer a:hover {
  color: var(--app-yellow) !important;
  transform: translateY(-2px);
}

footer a:active {
  transform: translateY(0);
}

/* Navigation Overlay for Mobile Menu */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(14, 17, 22, 0.4) 0%,
    rgba(14, 17, 22, 0.6) 50%,
    rgba(14, 17, 22, 0.7) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Light mode overlay */
@media (prefers-color-scheme: light) {
  .nav-overlay {
    background: linear-gradient(
      to bottom,
      rgba(242, 244, 248, 0.3) 0%,
      rgba(242, 244, 248, 0.5) 50%,
      rgba(242, 244, 248, 0.6) 100%
    );
    backdrop-filter: blur(2px) brightness(0.95);
    -webkit-backdrop-filter: blur(2px) brightness(0.95);
  }
}

[data-theme="light"] .nav-overlay {
  background: linear-gradient(
    to bottom,
    rgba(242, 244, 248, 0.3) 0%,
    rgba(242, 244, 248, 0.5) 50%,
    rgba(242, 244, 248, 0.6) 100%
  );
  backdrop-filter: blur(2px) brightness(0.95);
  -webkit-backdrop-filter: blur(2px) brightness(0.95);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .update-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  /* Modal tabs horizontal scroll for mobile */
  .modal-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
  }
  
  .modal-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  /* Add padding for smooth scrolling */
  .modal-tabs::before,
  .modal-tabs::after {
    content: '';
    flex: 0 0 1rem;
  }
  
  /* Ensure tabs don't shrink */
  .modal-tab {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 0 1.25rem;
  }
  
  /* Visual indicator for scrollable content */
  .modal-tabs-wrapper {
    position: relative;
  }
  
  .modal-tabs-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--background) 80%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .modal-tabs-scrollable .modal-tabs-wrapper::after {
    opacity: 1;
  }
}