/* ==================================================
   Tento Web Support - Style Sheet
   Design: シンプル・洗練・高速表示
   Corporate Colors:
     Primary (Dark):  #2D3436
     Accent (Blue):   #0984E3
     Accent Light:    #74B9FF
   ================================================== */

:root {
  --primary-color: #2D3436;
  --accent-color: #0984E3;
  --accent-light: #74B9FF;
  --bg-color: #FDFDFD;
  --text-color: #2D3436;
  --text-muted: #636E72;
  --card-bg: #FFFFFF;
  --border-color: #E8ECEF;
  --font-main: 'Noto Sans JP', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
  --transition: all 0.2s ease;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --primary-gradient: linear-gradient(135deg, #2D3436 0%, #0984E3 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0F172A;
    --text-color: #F1F5F9;
    --text-muted: #94A3B8;
    --card-bg: #1E293B;
    --border-color: #334155;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
}

/* === Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.8;
  overflow-x: hidden;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* === Layout === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 16px 0;
  z-index: 1000;
  background: rgba(253, 253, 253, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: padding 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(15, 23, 42, 0.92);
  }
}

header.scrolled {
  padding: 10px 0;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 480px) {
  .header-actions {
    gap: 8px;
  }
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
  transform-origin: left center;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

@media (max-width: 480px) {
  .logo span {
    display: none;
  }
}

.logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

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

.mobile-logo {
  display: none;
}

/* === CTA Button === */
.cta-button {
  background: var(--accent-color);
  color: white;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  display: inline-block;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: #0770C2;
  box-shadow: 0 4px 14px rgba(9, 132, 227, 0.3);
}

@media (max-width: 480px) {
  .cta-button {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 100px;
  padding-bottom: 60px;
  overflow: hidden;
  background-image: url('../images/hero-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background-image: url('../images/logo-mark.webp');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 背景が見えるよう透明度を調整 */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.4) 100%);
  /* ぼかしを少し弱めてデザインを生かす */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .hero-overlay {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

.hero-container {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  justify-content: center;
}

.hero-content.centered {
  flex: 1;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  background: rgba(9, 132, 227, 0.08);
  padding: 4px 16px;
  border-radius: 20px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 28px;
  color: var(--text-color);
  font-weight: 800;
  letter-spacing: -0.02em;
  /* 文字を背景から浮かび上がらせる多層シャドウ */
  text-shadow:
    0 2px 10px rgba(255, 255, 255, 1),
    0 4px 20px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  .hero h1 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
}

.hero h1 .accent-text {
  /* 背景の白に負けないよう、少し深いブルーからスタートするグラデーションに変更 */
  background: linear-gradient(135deg, #076ad2 0%, #0984E3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  /* 白背景でも沈まないよう、コントラストを強めるための影設定 */
  text-shadow: none !important;
  filter: drop-shadow(0 1px 3px rgba(7, 106, 210, 0.3));
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--text-color);
  max-width: 700px;
  margin: 0 auto 48px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  font-weight: 500;
}

.hero-actions.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-meta {
  font-size: 0.95rem;
  color: var(--text-color);
  /* 可読性のために濃い色に変更 */
  font-weight: 700;
}

.hero-image-wrapper {
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .hero-image-wrapper {
    background: #1E293B;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  }
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.hero-image-wrapper:hover {
  transform: translateY(-10px) rotate(2deg);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* === Sections === */
.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 64px;
  width: 100%;
}

.section-title h1,
.section-title h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--primary-color);
  text-align: center;
}

.section-title .strength-label {
  display: inline-block;
  text-align: center;
  margin: 0 auto 16px;
}

.section-title p {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .section-title p br {
    display: none;
  }
}

/* セクション表題に改行がある場合の制御用クラス */
.nowrap-title {
  white-space: nowrap;
}

/* === Feature Cards === */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover);
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  font-weight: 600;
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(9, 132, 227, 0.08);
  color: var(--accent-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

/* === Combined Value Section === */
.value-card {
  display: flex !important;
  flex-direction: column;
  gap: 24px;
}

.value-card .value-strength {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(9, 132, 227, 0.02);
  margin: 0 -32px -32px -32px;
  padding: 24px 32px 32px 32px;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

@media (prefers-color-scheme: dark) {
  .value-card .value-strength {
    background: rgba(9, 132, 227, 0.05);
  }
}

.strength-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-color);
  background: rgba(9, 132, 227, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.value-card h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 700;
}

.value-card .value-strength p {
  color: var(--text-color);
  opacity: 0.9;
  font-weight: 500;
}

.tagline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .tagline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tagline-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tag-item {
  background: var(--card-bg);
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  font-size: 1rem;
}

.tag-item i {
  color: var(--accent-color);
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.tag-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover);
  background: #fff;
}

.price-tag {
  margin-top: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-color);
  background: rgba(9, 132, 227, 0.06);
  padding: 8px 16px;
  display: inline-block;
  border-radius: 6px;
  border: 1px solid rgba(9, 132, 227, 0.12);
}

.price-tag small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

/* === Portfolio Section === */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.portfolio-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.75));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background 0.3s ease;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
  background: linear-gradient(to bottom, rgba(9, 132, 227, 0.2) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.portfolio-info h3 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 4px;
  font-weight: 600;
}

.portfolio-link {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.portfolio-link:hover {
  text-decoration: underline;
}

.portfolio-subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 48px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-color);
}

.portfolio-subtitle::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* === Simulator Section (Updated) === */
.simulator-container {
  max-width: 1100px;
  margin: 0 auto;
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

@media (min-width: 1024px) {
  .simulator-grid {
    grid-template-columns: 1fr 360px;
  }
}

.simulator-form {
  display: grid;
  gap: 32px;
}

.simulator-group {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.simulator-group h3 {
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulator-group h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--accent-color);
  border-radius: 2px;
}

.option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch; /* 高さを揃える */
}

.option-item {
  display: flex !important;
  flex-direction: row; /* 基本は横並び */
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start; /* 内容を上寄せ */
  gap: 12px;
  padding: 20px;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  height: 100%; /* グリッド内で高さを一杯に */
  min-height: 110px; /* 最小高さを少し上げ、安定させます */
}

.quantity-icon {
  font-size: 1.1rem;
  color: var(--accent-color);
  width: 20px; /* チェックボックスと同じ幅 */
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.option-details {
  flex: 1;
  min-width: 150px;
}

.option-details span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (prefers-color-scheme: dark) {
  .option-item {
    background: rgba(255, 255, 255, 0.02);
  }
}

.option-item:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.option-item.selected,
.option-item.active {
  border-color: var(--accent-color);
  background: rgba(9, 132, 227, 0.04);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent-color);
}

.option-details {
  flex: 1;
}

.label-with-help {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.help-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.help-btn:hover {
  opacity: 1;
}

.option-description {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  transition: all 0.3s ease;
  width: 100%; /* 全幅を確保 */
}

.option-description.active {
  max-height: 500px; /* 制限を緩和して全文表示 */
  opacity: 1;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(9, 132, 227, 0.04);
  border-left: 2px solid var(--accent-color);
  border-radius: 4px;
}

/* 数量セレクター (垂直) */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-color);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.quantity-selector .qty-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qty-btn {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.quantity-selector input {
  width: 32px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-color);
  -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-selector .unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- Price Summary (New Sticky Design) --- */
.price-summary {
  position: sticky;
  top: 100px;
  background: var(--card-bg);
  border: 2px solid var(--accent-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.free-badge {
  display: inline-block;
  background: #d32f2f;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .free-badge {
    background: #ff5252;
  }
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.summary-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.reset-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.reset-link:hover {
  color: var(--accent-color);
}

/* 明細リスト */
.selected-details {
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
}

.details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  gap: 12px;
}

.detail-name {
  color: var(--text-muted);
}

.detail-price {
  font-weight: 600;
  white-space: nowrap;
}

.detail-price small {
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: normal;
}

.detail-item.base {
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--border-color);
}

.detail-item.base .detail-name {
  color: var(--text-color);
  font-weight: 700;
}

.detail-item.discount .detail-name,
.detail-item.discount .detail-price {
  color: #d32f2f;
}

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px 0;
}

/* 結果表示エリア */
.price-results {
  background: var(--bg-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.result-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-color);
}

.result-value small {
  font-size: 0.9rem;
  margin-left: 2px;
}

.result-value-group {
  text-align: right;
}

.free-badge {
  font-size: 0.7rem;
  background: #d32f2f;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* フッター */
.price-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.monthly-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.confirmation-note {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.8;
  text-align: center;
  line-height: 1.4;
}

.price-summary .cta-button.full-width {
  width: 100%;
  text-align: center;
  padding: 14px;
}

/* モバイル対応 */
@media (max-width: 1023px) {
  .price-summary {
    position: relative;
    top: 0;
    margin-top: 32px;
  }
}

@media (max-width: 480px) {
  .simulator-group {
    padding: 20px;
  }
  
  .price-summary {
    padding: 16px;
  }
  
  .result-value {
    font-size: 1.35rem;
  }
}

/* === Flow Section === */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.flow-item {
  background: var(--card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  position: relative;
  transition: var(--transition);
}

.flow-item:hover {
  border-color: var(--accent-color);
}

.flow-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-color);
  opacity: 0.12;
  position: absolute;
  top: 10px;
  right: 16px;
  line-height: 1;
}

.flow-item h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--accent-color);
  font-weight: 600;
}

.flow-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* === Contact Section === */
#contact {
  background: var(--primary-color);
  color: white;
  text-align: center;
}

#contact .section-title h2 {
  color: white;
}

#contact .section-title p {
  color: rgba(255, 255, 255, 0.65);
}

.contact-form-wrapper {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-form-wrapper iframe {
  border: none;
  width: 100%;
  height: 800px;
}

/* === Section Background Alternation === */
.section-alt {
  background: rgba(9, 132, 227, 0.02);
}

@media (prefers-color-scheme: dark) {
  .section-alt {
    background: rgba(9, 132, 227, 0.03);
  }
}

/* === Footer === */
footer {
  background: var(--primary-color);
  color: #fff;
  padding: 48px 0 20px;
}

footer .container {
  text-align: center;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo img {
  height: 48px;
  width: auto;
  filter: brightness(0) invert(1);
  margin: 0 auto;
}

.footer-tagline {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.footer-links {
  margin-bottom: 20px;
}

.footer-links a {
  color: #888;
  text-decoration: none;
  margin: 0 10px;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

.copyright {
  text-align: center;
  font-size: 0.78rem;
  color: #666;
  border-top: 1px solid #444;
  padding-top: 16px;
}

/* ==================================================
   Responsive Design
   ================================================== */

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
  .hero>.container {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero {
    min-height: auto;
    padding-top: 160px;
    padding-bottom: 100px;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    max-width: 90%;
  }

  .hero-actions {
    align-items: center;
    margin-bottom: 32px;
  }

  .hero-image-container {
    width: 100%;
    margin-top: 60px;
    justify-content: center;
  }

  .hero-image-wrapper {
    width: 85%;
    max-width: 380px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(253, 253, 253, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1050;
    display: flex;
  }

  .mobile-logo {
    display: block;
    width: 100%;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
  }

  .pc-only,
  .sp-hidden {
    display: none !important;
  }

  .mobile-logo img {
    height: 44px;
    margin: 0 auto;
  }

  @media (prefers-color-scheme: dark) {
    .nav-links {
      background: rgba(15, 23, 42, 0.98);
    }
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    margin-bottom: 48px;
  }

  .portfolio-item {
    aspect-ratio: 16 / 10;
  }
}

/* --- Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  /* モバイルでは表題のbrを無効化して自然に改行 */
  .hero h1 br.sp-hidden {
    display: none;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-actions .cta-button {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }

  .hero-image-container {
    width: 100%;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 1.35rem;
  }

  .section-title p {
    font-size: 0.88rem;
  }

  .feature-card {
    padding: 24px;
  }

  .flow-item {
    padding: 24px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .features-grid {
    gap: 16px;
  }

  .flow-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  footer {
    padding: 36px 0 16px;
  }
}

/* === ユーティリティ === */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

/* === Bento Grid Layout === */
.services-bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .services-bento-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 行の高さが自動調整されるように、明示的なrow指定を外すか調整 */
    grid-auto-rows: auto;
  }
}

.bento-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-hover);
}

.bento-main {
  grid-row: span 2;
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.bento-main .feature-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.bento-main .strength-label {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.bento-main h3,
.bento-main p {
  color: white;
}

.bento-accent {
  background: linear-gradient(135deg, rgba(9, 132, 227, 0.05) 0%, rgba(9, 132, 227, 0.01) 100%);
  border: 1px solid rgba(9, 132, 227, 0.15);
}

@media (min-width: 768px) {
  .bento-accent {
    grid-column: span 2;
  }
}

@media (min-width: 768px) {
  .bento-wide {
    grid-column: span 3;
  }
}

.bento-content h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.bento-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.bento-main .bento-content p {
  color: rgba(255, 255, 255, 0.9);
}

.bento-list {
  list-style: none;
  margin-top: 24px;
}

.bento-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.bento-list i {
  font-size: 1rem;
  opacity: 0.8;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.mini-tag {
  font-size: 0.75rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
}

.mini-tag:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.bento-split {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 768px) {
  .bento-split {
    flex-direction: row;
    align-items: center;
    position: relative;
    gap: 64px;
  }

  .bento-split>div {
    flex: 1;
  }

  .bento-split::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
    transform: translateX(-50%);
  }
}

/* === Use Cases (Chat) === */
.chat-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.chat-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-row.revealed {
  opacity: 1;
  transform: translateY(0);
}

.chat-row.user {
  justify-content: flex-start;
}

.chat-row.tws {
  justify-content: flex-start;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chat-row.user .chat-avatar {
  background: #F1F5F9;
  color: #94A3B8;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.chat-row.tws .chat-avatar {
  background: var(--accent-color);
  padding: 6px;
  border: 2px solid white;
  margin-bottom: 4px;
}

.chat-row.tws .chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.chat-bubble {
  padding: 14px 22px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 80%;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  font-weight: 500;
  word-wrap: break-word;
}

.chat-row.user .chat-bubble {
  background: white;
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.chat-row.tws .chat-bubble {
  background: linear-gradient(135deg, var(--accent-color) 0%, #0770C2 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

@media (max-width: 768px) {
  .chat-container {
    gap: 32px;
    padding: 0 10px;
  }

  .chat-bubble {
    max-width: 82%;
    font-size: 0.875rem;
    padding: 12px 18px;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
  }
}

/* === FAQ Section === */
/* === FAQ Section === */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: var(--text-color);
  font-size: 1.05rem;
  transition: var(--transition);
}

.faq-question span {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.faq-question span::before {
  content: 'Q.';
  color: var(--accent-color);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-question i {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: 16px;
}

.faq-item.active .faq-question {
  background: rgba(9, 132, 227, 0.03);
  color: var(--accent-color);
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--accent-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(9, 132, 227, 0.01);
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
  /* Large enough for any content */
  opacity: 1;
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.faq-answer-inner {
  padding: 20px 24px;
  display: flex;
  gap: 12px;
}

.faq-answer-inner::before {
  content: 'A.';
  color: #e67e22;
  /* Different color for A to distinguish */
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 4px;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .faq-question {
    padding: 16px 20px;
    font-size: 0.95rem;
  }

  .faq-answer-inner {
    padding: 16px 20px;
  }

  .faq-answer p {
    font-size: 0.875rem;
  }
}

/* === Tool Grid Section === */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.tool-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition);
}

.tool-item:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-color);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tool-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.tool-info h3 small {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.tool-info p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.tool-info p strong {
  color: var(--text-color);
}

@media (max-width: 640px) {
  .tool-item {
    flex-direction: column;
    gap: 16px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* === Mobile Sticky Price Bar === */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 12px 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

/* 明細ドロワー */
.mobile-details-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg);
}

.mobile-sticky-bar.drawer-open .mobile-details-drawer {
  max-height: 80vh;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.drawer-actions .reset-link {
  font-size: 0.75rem;
  margin: 0;
}

/* === Mobile Sticky Price Bar === */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  padding: 10px 0; /* Padding slightly reduced */
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

/* 明細ドロワー */
.mobile-details-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card-bg);
}

.mobile-sticky-bar.drawer-open .mobile-details-drawer {
  max-height: 80vh;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border-color);
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.drawer-actions .reset-link {
  font-size: 0.75rem;
  margin: 0;
}

.drawer-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color);
}

.close-drawer {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

#mobile-bar-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px; /* Reduced for narrow screens */
  padding: 4px 8px;
  background: rgba(9, 132, 227, 0.05);
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

#mobile-bar-trigger:active {
  background: rgba(9, 132, 227, 0.1);
  transform: scale(0.98);
}

.mobile-sticky-bar.drawer-open #mobile-bar-trigger {
  border-color: var(--accent-color);
  background: white;
}

.details-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  color: white;
  width: 38px; /* Slightly smaller */
  height: 38px;
  border-radius: 8px;
  gap: 1px;
  flex-shrink: 0;
}

.details-badge i {
  font-size: 0.8rem;
}

.details-badge span {
  font-size: 0.55rem;
  font-weight: 700;
}

.mobile-sticky-bar.drawer-open .details-badge {
  background: var(--text-muted);
}

@media (max-width: 1023px) {
  .mobile-sticky-bar {
    display: block;
  }
  
  /* バーの高さ分、フッターの下に余白を作る */
  footer {
    padding-bottom: 120px;
  }

  .option-item {
    padding: 16px; /* Reduced for mobile */
  }

  .price-summary {
    padding: 20px; /* Reduced for mobile */
  }
}

/* Extra adjustments for very narrow screens */
@media (max-width: 360px) {
  .mobile-bar-content {
    gap: 8px;
  }
  
  .mobile-bar-prices {
    gap: 10px;
  }

  .price-mini .value {
    font-size: 0.95rem; /* Slightly smaller for 320px */
  }

  .mobile-sticky-bar .cta-button {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

.mobile-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.mobile-bar-prices {
  display: flex;
  gap: 16px;
}

.price-mini {
  display: flex;
  flex-direction: column;
}

.price-mini .label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 2px;
}

.price-mini .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-color);
  font-family: var(--font-heading);
}

.mobile-sticky-bar .cta-button {
  padding: 10px 20px;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .mobile-sticky-bar {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .mobile-details-drawer {
    background: var(--primary-color);
  }
  .mobile-sticky-bar.drawer-open #mobile-bar-trigger {
    background: rgba(255, 255, 255, 0.05);
  }
}