/* ==========================================================================
   UI Components Catalog & UX Diagnostic App - Style (Full 25 Components)
   Theme: Clean White & Emerald Green (メイン白・サブ緑の上品で清潔感のあるデザイン)
   ========================================================================== */

:root {
  /* メイン白・サブ緑のカラーパレット */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-secondary: #f1f5f9;
  --bg-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #10b981;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* サブカラー: 上品で爽やかなグリーン */
  --accent-green: #059669;
  --accent-green-light: #ecfdf5;
  --accent-green-border: #a7f3d0;
  --accent-green-hover: #047857;
  --accent-green-subtle: #d1fae5;

  --accent-blue: #0284c7;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 共通コンテナ */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ヘッダー */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-badge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-green), #10b981);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

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

.btn-header-slack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-slack:hover {
  background: var(--bg-surface);
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-header-ai {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  color: var(--accent-green);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-ai:hover {
  background: var(--accent-green-subtle);
  border-color: var(--accent-green);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* メインナビゲーションタブ */
.mode-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.tab-btn.active {
  background: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.tab-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
}

.tab-btn:not(.active) .tab-badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* セクション表示制御 */
.hidden {
  display: none !important;
}

/* カタログ検索＆フィルターツールバー */
.catalog-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: var(--text-muted);
}

.catalog-search-input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.catalog-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.filter-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 7px 15px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.filter-chip.active {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
  font-weight: 700;
}

/* ==========================================================================
   カタログテーブル（白基調 3列構成）
   ========================================================================== */
.catalog-table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.catalog-table th {
  background: #f8fafc;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-color);
}

.catalog-table td {
  padding: 22px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.catalog-row {
  transition: background-color 0.2s ease;
}

.catalog-row:hover {
  background: #f8fafc;
}

.catalog-row.highlight-pulse {
  animation: pulseRowWhite 2.5s ease;
}

@keyframes pulseRowWhite {
  0% { background: rgba(16, 185, 129, 0.25); }
  50% { background: rgba(16, 185, 129, 0.1); }
  100% { background: transparent; }
}

/* 列幅の配分 */
.col-name {
  width: 25%;
  min-width: 220px;
}

.col-effect {
  width: 45%;
  min-width: 320px;
}

.col-preview {
  width: 30%;
  min-width: 260px;
  text-align: center;
}

/* ① 部品名セル */
.comp-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid var(--accent-green-border);
  margin-bottom: 6px;
}

.comp-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.comp-subtitle {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 14px;
}

.btn-copy-prompt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-prompt:hover {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: translateY(-1px);
}

/* ② 効果セル */
.effect-description {
  margin-bottom: 12px;
}

.effect-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.effect-description p {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

.why-details {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.why-summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.why-summary:hover {
  color: var(--accent-green);
}

.why-content {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-secondary);
  line-height: 1.6;
}

.ai-prompt-preview {
  font-size: 12px;
  background: var(--accent-green-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-green);
  color: var(--accent-green-hover);
}

.prompt-tag {
  color: var(--accent-green);
  font-weight: 700;
}

/* ③ アニメーションセル（生きたUIプレビュー・白基調） */
.live-preview-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.preview-caption {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   生きたCSSアニメーション群（Live Demos - 白＆緑基調）
   ========================================================================== */

/* 1. ハンバーガーメニュー */
.demo-hamburger-box {
  width: 100%;
  max-width: 180px;
  height: 95px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.demo-phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.demo-burger-icon {
  width: 16px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.demo-burger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--accent-green);
  border-radius: 2px;
  animation: burgerTwist 4s infinite ease-in-out;
}

.demo-logo {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.demo-drawer-menu {
  position: absolute;
  top: 25px;
  left: 0;
  bottom: 0;
  width: 75%;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 8px;
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: drawerSlide 4s infinite ease-in-out;
  box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

@keyframes drawerSlide {
  0%, 15% { transform: translateX(-100%); }
  35%, 80% { transform: translateX(0); }
  95%, 100% { transform: translateX(-100%); }
}

@keyframes burgerTwist {
  0%, 15% { transform: none; }
  35%, 80% { background: #ef4444; }
  95%, 100% { transform: none; }
}

/* 2. パンくずリスト */
.demo-breadcrumbs-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.demo-bc-item {
  color: var(--accent-green);
  font-weight: 500;
  animation: bcPulse 3s infinite;
}

.demo-bc-sep {
  color: var(--text-muted);
  font-size: 10px;
}

.demo-bc-current {
  color: var(--text-primary);
  font-weight: 700;
}

@keyframes bcPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; text-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
}

/* 3. カルーセル */
.demo-carousel-box {
  width: 180px;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

.demo-carousel-track {
  display: flex;
  width: 300%;
  animation: slideCarousel 6s infinite ease-in-out;
}

.demo-slide {
  width: 180px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 4px;
}

.demo-slide.s1 { background: linear-gradient(135deg, #059669, #10b981); }
.demo-slide.s2 { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.demo-slide.s3 { background: linear-gradient(135deg, #d97706, #f59e0b); }

.demo-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 5px 0;
}

.demo-dots .dot {
  width: 6px;
  height: 6px;
  background: #cbd5e1;
  border-radius: 50%;
}

.demo-dots .dot.active {
  background: var(--accent-green);
  animation: dotBlink 6s infinite;
}

@keyframes slideCarousel {
  0%, 25% { transform: translateX(0); }
  33%, 58% { transform: translateX(-180px); }
  66%, 92% { transform: translateX(-360px); }
  100% { transform: translateX(0); }
}

/* 4. モーダル */
.demo-modal-box {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  animation: modalFade 4s infinite;
}

.demo-modal-dialog {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  width: 160px;
  font-size: 11px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: modalPop 4s infinite ease-out;
}

.demo-modal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.demo-modal-btn {
  margin-top: 8px;
  background: var(--accent-green);
  color: #fff;
  border-radius: 4px;
  padding: 3px 0;
  font-weight: 600;
}

@keyframes modalPop {
  0%, 15% { transform: scale(0.6); opacity: 0; }
  25%, 80% { transform: scale(1); opacity: 1; }
  90%, 100% { transform: scale(0.6); opacity: 0; }
}

@keyframes modalFade {
  0%, 15% { opacity: 0; }
  25%, 80% { opacity: 1; }
  90%, 100% { opacity: 0; }
}

/* 5. アコーディオン */
.demo-accordion-box {
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.demo-acc-item {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.demo-acc-head {
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-primary);
  background: #f8fafc;
}

.demo-acc-body {
  padding: 6px 8px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 10px;
  animation: accSlide 4s infinite ease-in-out;
}

@keyframes accSlide {
  0%, 20% { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
  35%, 80% { max-height: 50px; opacity: 1; padding: 6px 8px; }
  95%, 100% { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
}

/* 6. ラジオボタン */
.demo-radio-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.demo-radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.demo-radio-item.active .radio-circle {
  border-color: var(--accent-green);
}

.radio-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: radioDotPop 3s infinite;
}

@keyframes radioDotPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 7. プルダウンメニュー */
.demo-dropdown-box {
  width: 160px;
  position: relative;
  font-size: 11px;
}

.demo-dropdown-trigger {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.demo-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--accent-green);
  border-radius: 4px;
  margin-top: 2px;
  z-index: 10;
  box-shadow: var(--shadow-md);
  animation: dropdownOpen 3.5s infinite ease-in-out;
}

.demo-dropdown-list .item {
  padding: 5px 8px;
  color: var(--text-secondary);
}

.demo-dropdown-list .item.selected {
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-weight: 700;
}

@keyframes dropdownOpen {
  0%, 20% { opacity: 0; transform: translateY(-6px); pointer-events: none; }
  35%, 85% { opacity: 1; transform: translateY(0); pointer-events: auto; }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* 8. プルトゥリフレッシュ */
.demo-pull-box {
  width: 160px;
  text-align: center;
  animation: pullDownSim 4s infinite ease-in-out;
}

.demo-pull-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(16, 185, 129, 0.2);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  margin: 0 auto 4px;
  animation: spin 1s linear infinite;
}

.demo-pull-text {
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 6px;
}

.demo-pull-list .card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 4px;
  font-size: 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

@keyframes pullDownSim {
  0%, 20% { transform: translateY(-16px); }
  40%, 75% { transform: translateY(0); }
  90%, 100% { transform: translateY(-16px); }
}

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

/* 9. スケルトンスクリーン */
.demo-skeleton-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 180px;
}

.sk-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
}

.sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sk-line {
  height: 10px;
  border-radius: 4px;
  background: #e2e8f0;
}

.sk-line.w80 { width: 85%; }
.sk-line.w50 { width: 50%; }

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmerAnim 1.8s infinite;
}

@keyframes shimmerAnim {
  100% { transform: translateX(100%); }
}

/* 10. トースト通知 */
.demo-toast-box {
  position: relative;
  width: 170px;
  height: 75px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.demo-content-sim {
  font-size: 11px;
  color: var(--text-muted);
}

.demo-toast-item {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  background: var(--accent-green);
  color: #ffffff;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
  animation: toastPop 3.5s infinite ease-in-out;
}

@keyframes toastPop {
  0%, 15% { transform: translateY(35px); opacity: 0; }
  25%, 75% { transform: translateY(0); opacity: 1; }
  90%, 100% { transform: translateY(35px); opacity: 0; }
}

/* 11. ボトムシート */
.demo-bottomsheet-box {
  width: 150px;
  height: 95px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.demo-sheet-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid var(--accent-green);
  border-radius: 8px 8px 0 0;
  padding: 6px 8px;
  font-size: 10px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  animation: sheetSlide 4s infinite ease-in-out;
}

.sheet-handle {
  width: 22px;
  height: 3px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 5px;
}

.sheet-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

@keyframes sheetSlide {
  0%, 20% { transform: translateY(100%); }
  40%, 80% { transform: translateY(0); }
  95%, 100% { transform: translateY(100%); }
}

/* 12. スワイプアクション */
.demo-swipe-box {
  width: 170px;
  height: 40px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
}

.demo-swipe-row {
  display: flex;
  width: 230px;
  height: 100%;
  animation: swipeAnim 4s infinite ease-in-out;
}

.swipe-content {
  width: 170px;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text-primary);
}

.swipe-btn-delete {
  width: 60px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes swipeAnim {
  0%, 25% { transform: translateX(0); }
  40%, 75% { transform: translateX(-60px); }
  90%, 100% { transform: translateX(0); }
}

/* 13. オートコンプリート */
.demo-auto-box {
  width: 150px;
  font-size: 11px;
}

.auto-input {
  background: #ffffff;
  border: 1px solid var(--accent-green);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-primary);
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent-green);
}

.auto-dropdown {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-top: 2px;
  box-shadow: var(--shadow-sm);
}

.auto-item {
  padding: 4px 8px;
  color: var(--text-secondary);
}

.auto-item.highlight {
  background: var(--accent-green-light);
  color: var(--accent-green);
  font-weight: 700;
}

@keyframes blink { 50% { opacity: 0; } }

/* 14. キネティックタイポグラフィ */
.demo-kinetic-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  text-align: center;
}

.k-word.w1 { color: var(--accent-green); animation: kJump 3s infinite 0.1s; }
.k-word.w2 { color: #0284c7; animation: kJump 3s infinite 0.3s; }
.k-word.w3 { color: #0f172a; animation: kJump 3s infinite 0.5s; }

@keyframes kJump {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.2) skewX(-4deg); }
  50% { transform: scale(1); }
}

/* 15. インフォグラフィックアニメーション */
.demo-info-box {
  width: 150px;
  text-align: center;
}

.info-metric {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-green);
}

.info-bar-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin: 6px 0 4px;
  overflow: hidden;
}

.info-bar-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 3px;
  animation: fillBar 3s infinite ease-out;
}

.info-label {
  font-size: 10px;
  color: var(--text-muted);
}

@keyframes fillBar {
  0% { width: 0%; }
  60%, 85% { width: 98%; }
  100% { width: 0%; }
}

/* 16. フローティングアクションボタン (FAB) */
.demo-fab-box {
  width: 150px;
  height: 90px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  position: relative;
}

.demo-screen-sim {
  position: absolute;
  inset: 0;
}

.fab-circle {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
  animation: fabFloat 3s infinite ease-in-out;
}

@keyframes fabFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.06); box-shadow: 0 6px 16px rgba(5, 150, 105, 0.45); }
}

/* 17. チャットバブル */
.demo-chatbubble-box {
  width: 170px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
}

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.bubble-row.right {
  justify-content: flex-end;
}

.user-bubble {
  background: var(--accent-green);
  color: #fff;
  padding: 5px 9px;
  border-radius: 10px 10px 2px 10px;
  animation: bubblePopRight 4s infinite;
}

.avatar-sim {
  font-size: 14px;
}

.bot-bubble {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 5px 9px;
  border-radius: 10px 10px 10px 2px;
  box-shadow: var(--shadow-sm);
  animation: bubblePopLeft 4s infinite 0.5s;
}

@keyframes bubblePopRight {
  0%, 15% { opacity: 0; transform: scale(0.8) translateY(6px); }
  25%, 85% { opacity: 1; transform: scale(1) translateY(0); }
  95%, 100% { opacity: 0; transform: scale(0.8); }
}

@keyframes bubblePopLeft {
  0%, 25% { opacity: 0; transform: scale(0.8) translateY(6px); }
  35%, 85% { opacity: 1; transform: scale(1) translateY(0); }
  95%, 100% { opacity: 0; transform: scale(0.8); }
}

/* 18. アクションチップ */
.demo-chips-box {
  width: 180px;
  overflow: hidden;
}

.chips-track {
  display: flex;
  gap: 6px;
  animation: chipSlide 5s infinite ease-in-out;
}

.chip-bubble {
  padding: 3px 9px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.chip-bubble.active {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
  font-weight: 700;
}

@keyframes chipSlide {
  0%, 20% { transform: translateX(0); }
  40%, 75% { transform: translateX(-35px); }
  90%, 100% { transform: translateX(0); }
}

/* 19. タイピングインジケーター */
.demo-typing-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 7px 12px;
  box-shadow: var(--shadow-sm);
}

.t-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: tBounce 1.4s infinite ease-in-out;
}

.t-dot.d1 { animation-delay: 0s; }
.t-dot.d2 { animation-delay: 0.2s; }
.t-dot.d3 { animation-delay: 0.4s; }

.typing-label {
  font-size: 10px;
  color: var(--text-muted);
}

@keyframes tBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* 20. トグルスイッチ */
.demo-toggle-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.toggle-track {
  width: 46px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  animation: toggleSwitchAnim 3.5s infinite ease-in-out;
}

.toggle-thumb {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  animation: thumbSlideAnim 3.5s infinite ease-in-out;
}

.toggle-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-green);
}

@keyframes toggleSwitchAnim {
  0%, 30% { background: #cbd5e1; }
  45%, 85% { background: var(--accent-green); }
  100% { background: #cbd5e1; }
}

@keyframes thumbSlideAnim {
  0%, 30% { transform: translateX(0); }
  45%, 85% { transform: translateX(22px); }
  100% { transform: translateX(0); }
}

/* 21. ツールチップ */
.demo-tooltip-box {
  position: relative;
}

.tooltip-trigger {
  position: relative;
  cursor: pointer;
}

.help-circle {
  font-size: 22px;
}

.tooltip-balloon {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  animation: tooltipFade 3s infinite ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #0f172a;
}

@keyframes tooltipFade {
  0%, 20% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  35%, 80% { opacity: 1; transform: translateX(-50%) translateY(0); }
  95%, 100% { opacity: 0; transform: translateX(-50%) translateY(4px); }
}

/* 22. スティッキーヘッダー */
.demo-sticky-box {
  width: 170px;
  height: 90px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.sticky-nav-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 2px solid var(--accent-green);
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--accent-green);
  font-weight: 700;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sticky-scroll-content {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 8px;
  padding-right: 8px;
  animation: stickyScrollContent 4s infinite linear;
}

.scroll-line {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
}

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

/* 23. タブナビゲーション */
.demo-tabs-box {
  width: 170px;
  font-size: 11px;
}

.tabs-header-sim {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  padding-bottom: 3px;
}

.tab-item {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--accent-green);
  font-weight: 700;
}

.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 33.3%;
  height: 2px;
  background: var(--accent-green);
  animation: tabIndMove 4s infinite ease-in-out;
}

.tab-pane-sim {
  margin-top: 8px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
}

@keyframes tabIndMove {
  0%, 30% { left: 0%; }
  45%, 75% { left: 33.3%; }
  85%, 100% { left: 66.6%; }
}

/* 24. ページネーション */
.demo-pagination-box {
  display: flex;
  gap: 4px;
  align-items: center;
}

.page-btn {
  width: 25px;
  height: 25px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-secondary);
  background: #ffffff;
  animation: pageBtnPulse 4s infinite;
}

.page-btn.active {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
  font-weight: 700;
}

@keyframes pageBtnPulse {
  0%, 35% { transform: scale(1); }
  50% { transform: scale(1.08); }
  65%, 100% { transform: scale(1); }
}

/* 25. スクロールトゥトップ */
.demo-scrolltop-box {
  width: 150px;
  height: 80px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.scroll-page-sim {
  position: absolute;
  inset: 0;
}

.scrolltop-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
  animation: scrolltopJump 3.5s infinite ease-in-out;
}

@keyframes scrolltopJump {
  0%, 20% { transform: translateY(35px); opacity: 0; }
  35%, 75% { transform: translateY(0); opacity: 1; }
  90%, 100% { transform: translateY(-35px); opacity: 0; }
}

/* ==========================================================================
   WEBサイト見やすさ診断モード (白＆緑基調)
   ========================================================================== */
.diagnosis-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.diagnosis-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-full);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.diagnosis-header h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.diagnosis-lead {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.diagnosis-input-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 28px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.diagnosis-textarea {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.diagnosis-textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.quick-samples {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sample-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-sample {
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-sample:hover {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-primary-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--accent-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-primary-large:hover {
  background: var(--accent-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

/* 診断結果表示 */
.diagnosis-summary-panel {
  margin-top: 32px;
}

.summary-top {
  display: flex;
  align-items: center;
  gap: 28px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.score-circle-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-box {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-box.current {
  background: #fff1f2;
  border: 3px solid #f43f5e;
}

.score-box.current .score-val {
  font-size: 30px;
  font-weight: 800;
  color: #e11d48;
}

.score-box.potential {
  background: var(--accent-green-light);
  border: 3px solid var(--accent-green);
}

.score-box.potential .score-val {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent-green);
}

.score-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
}

.score-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

.summary-text-group h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.summary-text-group p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* AIへの一括改修指示プロンプトカード (白＆緑基調) */
.master-prompt-card {
  background: var(--accent-green-light);
  border: 2px solid var(--accent-green-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.master-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.master-prompt-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--accent-green);
  color: #ffffff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.master-prompt-title {
  font-size: 17px;
  color: var(--accent-green-hover);
  font-weight: 800;
  margin-bottom: 4px;
}

.master-prompt-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-copy-master {
  padding: 10px 18px;
  background: var(--accent-green);
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-copy-master:hover {
  background: var(--accent-green-hover);
  transform: translateY(-1px);
}

.master-prompt-body {
  background: #ffffff;
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  max-height: 260px;
  overflow-y: auto;
}

.master-prompt-code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.issues-container-header h3 {
  font-size: 17px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* 個別課題カード */
.issue-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.issue-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}

.issue-number {
  color: var(--accent-green);
  font-weight: 700;
}

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

.issue-title {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.issue-improvement-box {
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.improve-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.improve-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
}

.issue-why-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.why-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.why-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 個別課題のプロンプト枠 */
.issue-prompt-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.prompt-title-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
}

.btn-copy-prompt-issue {
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-prompt-issue:hover {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.prompt-code-block {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 4px;
}

.issue-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.recommended-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rec-label {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-goto-comp {
  padding: 5px 12px;
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-sm);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-goto-comp:hover {
  background: var(--accent-green);
  color: #fff;
}

.btn-goto-comp.secondary {
  background: #f1f5f9;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* ==========================================================================
   ニーズ相談AIボット (白＆緑基調)
   ========================================================================== */
.chatbot-float-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-green);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.35);
  transition: all 0.25s ease;
}

.chatbot-float-trigger:hover {
  background: var(--accent-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(5, 150, 105, 0.45);
}

.bot-icon {
  font-size: 19px;
}

.bot-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
}

.chatbot-window {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 560px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chat-header {
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar-badge {
  width: 28px;
  height: 28px;
  background: var(--accent-green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.chat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.chat-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-chat-icon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.btn-chat-icon:hover {
  color: var(--text-primary);
}

.chat-quick-chips {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
}

.chip-item {
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.chip-item:hover {
  background: var(--accent-green-light);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #f8fafc;
}

.chat-bubble {
  display: flex;
  gap: 8px;
  max-width: 90%;
}

.chat-bubble.bot {
  align-self: flex-start;
}

.chat-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-green);
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  padding: 2px 6px;
  border-radius: 4px;
  height: fit-content;
  margin-top: 4px;
}

.chat-bubble.bot .bubble-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px 12px 12px 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

.chat-bubble.user .bubble-content {
  background: var(--accent-green);
  border-radius: 12px 4px 12px 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.chat-rec-cards {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-rec-card {
  background: var(--accent-green-light);
  border: 1px solid var(--accent-green-border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.rec-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.rec-name {
  font-weight: 700;
  color: var(--accent-green);
  font-size: 12px;
}

.rec-name-en {
  font-size: 10px;
  color: var(--text-muted);
}

.rec-effect-short {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rec-card-actions {
  display: flex;
  gap: 6px;
}

.btn-chat-view-comp,
.btn-chat-copy-prompt {
  flex: 1;
  padding: 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn-chat-view-comp {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-chat-copy-prompt {
  background: var(--accent-green);
  border: none;
  color: #ffffff;
}

.chat-input-row {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 9px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.chat-input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.btn-chat-send {
  padding: 0 16px;
  background: var(--accent-green);
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* API設定モーダル */
.chat-api-modal {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.api-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.api-modal-card h4 {
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.api-modal-card p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.api-input {
  width: 100%;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 12px;
  margin-bottom: 12px;
}

.api-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-save {
  padding: 6px 12px;
  background: var(--accent-green);
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-cancel {
  padding: 6px 12px;
  background: #e2e8f0;
  color: var(--text-secondary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* グローバルトースト通知 */
.global-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* フッター */
.app-footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 50px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .catalog-table th, .catalog-table td {
    padding: 14px 12px;
  }
  .col-preview {
    min-width: 200px;
  }
  .summary-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .master-prompt-header {
    flex-direction: column;
  }
  .btn-copy-master {
    width: 100%;
    justify-content: center;
  }
}
