/* ==========================================================================
   Ploto LP - Premium Styling Sheet (Vanilla CSS)
   ========================================================================== */

/* --- 1. Variables & Design Tokens --- */
:root {
  /* Common Fonts */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dark Theme Variables (Default) */
[data-theme="dark"] {
  --bg-main: #0a0f1d;
  --bg-card: #131b2e;
  --bg-card-hover: #1e294b;
  --bg-header: rgba(10, 15, 29, 0.8);
  --border-color: #1f2d4d;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --color-primary: #6366f1; /* Indigo */
  --color-primary-light: #818cf8;
  --color-secondary: #06b6d4; /* Cyan */
  --color-accent: #f59e0b; /* Amber */
  --color-success: #10b981;
  --color-danger: #ef4444;
  
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  --gradient-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  --scrollbar-track: #0e1322;
  --scrollbar-thumb: #26355a;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-main: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  --bg-header: rgba(243, 244, 246, 0.8);
  --border-color: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-inverse: #ffffff;
  
  --color-primary: #0078d4;
  --color-primary-light: #106ebe;
  --color-secondary: #107c41;
  --color-accent: #f7630c;
  --color-success: #107c41;
  --color-danger: #a80000;
  
  --gradient-primary: linear-gradient(135deg, #0078d4 0%, #005a9e 100%);
  --gradient-glow: radial-gradient(circle, rgba(0, 120, 212, 0.05) 0%, rgba(0,0,0,0) 70%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 15px rgba(0, 120, 212, 0.15);
  
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
}

/* --- 2. CSS Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-primary-light);
}

/* --- 3. Helper Classes --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-inverse) !important;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  transition: var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-large {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

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

/* --- 4. Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.header-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.nav-menu a:hover {
  color: var(--color-primary-light);
}

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

/* Hide sun/moon icons based on active theme */
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

.btn-icon svg {
  width: 20px;
  height: 20px;
}

.lang-text {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* --- 言語切替ドロップダウン --- */
.lang-switcher {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  z-index: 1100;
}

.lang-switcher.is-open .lang-menu {
  display: flex;
}

.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.lang-option:hover {
  background-color: var(--bg-card-hover);
  color: var(--color-primary-light);
}

.lang-option.active {
  color: var(--color-primary-light);
  font-weight: 700;
}

/* --- ハンバーガーボタン（デフォルトは非表示・PCのみ） --- */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

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

.hamburger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

/* メニューオープン時に×アイコンへ変形 */
.hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger-btn[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* スマホ幅（768px以下）でのヘッダー調整 */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }

  /* PCのナビメニューを非表示 */
  .nav-menu {
    display: none;
  }

  /* ヘッダー右側のダウンロードボタンを非表示（ドロワー内に移動） */
  .header-actions .btn-primary {
    display: none;
  }

  /* ドロワーナビ本体 */
  .nav-menu-mobile {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* 初期状態：上に隠れた位置 */
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-menu-mobile.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu-mobile a {
    display: block;
    padding: 14px 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
  }

  .nav-menu-mobile a:last-of-type {
    border-bottom: none;
  }

  .nav-menu-mobile a:hover {
    color: var(--color-primary-light);
    padding-left: 16px;
  }

  /* ドロワー内ダウンロードボタン */
  .nav-mobile-cta {
    margin-top: 16px;
  }

  .nav-mobile-cta .btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    border-radius: 10px;
    justify-content: center;
  }

}



/* --- 5. Hero Section --- */
.hero-section {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
}

.glow-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.orb-primary {
  width: 500px;
  height: 500px;
  background: var(--color-primary);
  top: -100px;
  right: -50px;
}

.orb-secondary {
  width: 400px;
  height: 400px;
  background: var(--color-secondary);
  bottom: 100px;
  left: -100px;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  /* 見出しの1行がカラム幅（最大600px）に収まる大きさまで自動で縮める。
     固定サイズだと日本語・韓国語で語の途中に改行が入ってしまうため。 */
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  /* CJK は既定だと文字単位で折り返せてしまう（「プロジェクト管／理」）。
     keep-all で読点・スペースの位置だけを改行位置にし、
     それでも収まらない極端に狭い画面でのみ break-word を効かせる。 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-meta-info {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-meta-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* --- 6. Browser UI Mockup --- */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.hero-screenshot-container {
  width: 100%;
  max-width: 550px;
  border-radius: 8px;
  /* 境界線を物理borderではなくbox-shadowの1px拡張で表現することで、角丸の隙間から白フチが漏れるのを防ぐ */
  box-shadow: 0 0 0 1px var(--border-color), 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(5deg);
  transition: var(--transition-bounce);
  background-color: transparent; /* フェード中に親の背景が白く浮き出るのを防ぐ */
}

.hero-screenshot-container:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 0 0 1px var(--border-color), 0 25px 50px rgba(0, 0, 0, 0.4);
}

.app-screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: inherit; /* 画像自体にも親コンテナと全く同じ角丸を適用して隙間をなくす */
  transform: scale(1.015); /* 画像自体の端に映り込んでいる白枠や影を枠外に押し出して隠す */
  transition: opacity 0.3s ease-in-out;
}

/* --- 7. Features Section --- */
.features-section {
  padding: 100px 0;
  background-color: var(--bg-main);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  /* 中央揃えのリード文は、語の途中で割れて最終行に短い断片だけが残ると目立つ
     （「…確か／めてみてください。」）。読点・句点の位置だけを改行位置にし、
     balance で行の長さを均す。balance 非対応のブラウザでも keep-all は効く。 */
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* --- AI integration story --- */
.ai-feature-section {
  padding: 104px 0;
  border-top: 1px solid var(--border-color);
  background: radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent 45%), var(--bg-card);
}

.ai-feature-section .section-header { max-width: 780px; margin-bottom: 48px; }
.ai-feature-eyebrow { display: block; margin-bottom: 12px; color: var(--color-primary-light); font-size: .9rem; font-weight: 750; letter-spacing: .08em; }
.ai-feature-layout { display: grid; gap: 32px; }
.ai-story-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ai-story-icon { display: inline-block; flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.ai-story { min-width: 0; overflow: hidden; border: 1px solid #d8dcdf; border-radius: 14px; color: #26313a; background: #fff; box-shadow: 0 20px 48px rgba(26, 42, 76, .13); }
.ai-story-topbar { display: flex; align-items: center; gap: 17px; min-height: 48px; padding: 8px 15px; border-bottom: 1px solid #e2e4e6; background: #f7f8f8; font-size: .77rem; }
.ai-story-topbar strong { white-space: nowrap; font-size: .95rem; }
.ai-story-topbar em { font-style: normal; }
.ai-story-appmark { display: block; flex: none; width: 24px; height: 24px; object-fit: contain; }
.ai-story-menu { white-space: nowrap; font-weight: 700; }
.ai-story-file { overflow: hidden; flex: 1; margin-left: 7%; text-align: center; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ai-story-file b { font-weight: 400; }
.ai-story-top-actions { display: flex; align-items: center; gap: 9px; flex: none; color: #687179; }
.ai-story-workspace { display: grid; grid-template-columns: 42px minmax(280px, 32%) minmax(0, 1fr); min-height: 460px; }
.ai-story-rail { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 5px 12px; border-right: 1px solid #e3e6e7; background: #fafbfb; color: #686f70; }
.ai-story-rail span { display: grid; place-items: center; width: 31px; height: 31px; font-size: 1.23rem; }
.ai-story-rail .ai-story-icon { width: 20px; height: 20px; }
.ai-story-rail .is-active { border-left: 3px solid #4b6cc0; border-radius: 4px; color: #4166bd; background: #eef2fa; }
.ai-story-rail .ai-story-rail-settings { margin-top: auto; }
.ai-story-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 0 12px 12px; border-right: 1px solid #dce0e1; background: #f3f5f5; }
.ai-story-sidehead { display: flex; align-items: center; justify-content: space-between; min-height: 61px; padding: 0 6px; border-bottom: 1px solid #e2e5e5; font-size: .88rem; font-weight: 800; }
.ai-story-sidehead span { color: #757d7e; font-size: 1rem; font-weight: 400; }
.ai-story-sidehead .ai-story-icon { width: 17px; height: 17px; }
.ai-story-permission { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 59px; margin: 12px 0; padding: 8px 10px; border: 1px solid #7d9be4; border-left: 3px solid #4d71c3; border-radius: 8px; color: #335496; background: #f1f3f8; font-size: .7rem; }
.ai-story-permission strong { display: block; font-size: .73rem; }
.ai-story-permission strong .ai-story-icon { width: 15px; height: 15px; margin-right: 4px; }
.ai-story-permission small { display: block; margin-top: 3px; color: #334052; font-size: .63rem; line-height: 1.3; }
.ai-story-permission i { position: relative; flex: none; width: 30px; height: 18px; border-radius: 9px; background: #4d70bf; }
.ai-story-permission i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: white; }
.ai-story-tab { display: flex; justify-content: space-between; align-items: center; min-height: 34px; padding: 5px 9px; border-bottom: 2px solid #4b6cc0; color: #4166bd; background: #f7f8f8; font-size: .72rem; font-weight: 700; }
.ai-story-tab span { color: #747d85; font-size: 1rem; font-weight: 400; }
.ai-story-terminal { flex: 1; min-height: 0; height: 275px; overflow-y: auto; margin-top: 8px; padding: 12px 10px; border: 1px solid #333b43; border-radius: 7px; color: #eef0f2; background: #1b2026; font-family: Consolas, 'Courier New', monospace; font-size: .71rem; line-height: 1.48; scrollbar-width: thin; scrollbar-color: #4d5666 #1b2026; }
.ai-story-terminal-line { margin-bottom: 6px; overflow-wrap: anywhere; }
.ai-story-terminal-line b { font-weight: 700; }
.ai-story-terminal-line small { color: #8e99a8; font-size: .65rem; }
.ai-story-command b { color: #b6becb; }
.ai-story-client b { color: #d8a2ff; }
.ai-story-client small { margin-left: 6px; color: #a8c5a6; }
.ai-story-prompt { margin-top: 10px; color: #f0f0f2; }
.ai-story-prompt b { color: #ded5ff; }
.ai-story-tool { color: #e6e8eb; }
.ai-story-tool b { color: #69b808; }
.ai-story-result { padding-left: 12px; color: #aab7c4; }
.ai-story-reply { margin-top: 9px; color: #f0f0f2; }
.ai-story-terminal-cursor { padding-top: 6px; color: #f0f0f2; }
.ai-story-terminal-cursor span { color: #9ca7b7; }
.ai-story-connection { display: flex; align-items: center; gap: 4px; padding: 9px 4px 0; color: #6e767b; font-size: .69rem; }
.ai-story-connection .ai-story-icon { width: 14px; height: 14px; }
.ai-story-gantt { min-width: 0; background: #e7ecf8; }
.ai-story-gantt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 61px; padding: 9px 14px; border-bottom: 2px solid #5878cf; color: #456bbd; background: #fff; font-size: .82rem; }
.ai-story-gantt-head strong { display: inline-flex; align-items: center; gap: 5px; }
.ai-story-gantt-head span { color: #778087; font-size: 1rem; }
.ai-story-gantt-toolbar { display: flex; align-items: center; gap: 8px; min-height: 43px; padding: 5px 9px; border-bottom: 1px solid #d7dce8; background: #fff; color: #656d73; font-size: .69rem; }
.ai-story-gantt-toolbar > span { display: inline-flex; align-items: center; gap: 3px; padding: 5px 7px; border: 1px solid #e0e3e7; border-radius: 5px; white-space: nowrap; }
.ai-story-toolbar-pro b { margin-left: 3px; padding: 1px 3px; border: 1px solid #f2c987; border-radius: 3px; color: #c87808; font-size: .57rem; }
.ai-story-gantt-toolbar .ai-story-toolbar-level { margin-left: auto; border-color: #9eb4e8; color: #4668b6; background: #eff3ff; font-weight: 700; }
.ai-story-calendar, .ai-story-row { display: grid; grid-template-columns: minmax(145px, 35%) minmax(0, 1fr); }
.ai-story-calendar { grid-template-columns: minmax(145px, 35%) repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #c6cedf; color: #606970; background: #fff; font-size: .67rem; }
.ai-story-calendar span { padding: 8px 5px; border-right: 1px solid #e3e5e9; text-align: center; }
.ai-story-calendar span:first-child { text-align: left; padding-left: 15px; }
.ai-story-row { height: 55px; min-height: 55px; overflow: hidden; border-bottom: 1px solid #bfc9df; background: #e7ecf8; font-size: .72rem; }
.ai-story-row > span { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 7px 5px 7px 10px; border-right: 1px solid #c5cddc; font-weight: 700; }
.ai-story-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-story-row > span b { color: #647285; font-size: .65rem; }
.ai-story-row > span small { display: block; overflow: hidden; margin-left: 13px; color: #737e8b; font-size: .59rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.ai-story-track { position: relative; min-width: 0; background: repeating-linear-gradient(to right, transparent 0, transparent calc(25% - 1px), #c9d2e4 calc(25% - 1px), #c9d2e4 25%); }
.ai-story-bar { position: absolute; top: 15px; height: 25px; border: 2px solid #9fa8e8; border-radius: 5px; box-shadow: 0 3px 5px rgba(43, 57, 83, .13); }
.ai-story-bar-one { left: 4%; width: 19%; background: #fa9e4a; }
.ai-story-bar-two { left: 25%; width: 28%; background: #ff9d3b; }
.ai-story-bar-three { left: 48%; width: 46%; border-color: #bf74d9; background: #f3912f; transition: width .8s ease; }
.ai-story-bar-four { left: 72%; width: 23%; border-color: #926bdd; background: #b789ef; }
.ai-story[data-ai-animated] .ai-story-construction:not(.is-extended) .ai-story-bar-three { width: 22%; }
.ai-story-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 8px 16px; border-top: 1px solid #d8dcdf; color: #67737d; background: #fff; font-size: .72rem; }
.ai-story-replay { flex: none; padding: 5px 8px; border: 0; border-radius: 6px; color: var(--color-primary-light); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.ai-story-replay:hover, .ai-story-replay:focus-visible { background: var(--bg-card-hover); }
.ai-story[data-ai-animated] [data-ai-time] { max-height: 0; min-height: 0; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; opacity: 0; visibility: hidden; transform: translateY(9px); transition: max-height .35s ease, opacity .35s ease, transform .35s ease; }
.ai-story[data-ai-animated] [data-ai-time].is-visible { max-height: 120px; min-height: 0; visibility: visible; opacity: 1; transform: translateY(0); }
.ai-story[data-ai-animated] .ai-story-terminal-line.is-visible { margin-bottom: 6px; }
.ai-story[data-ai-animated] .ai-story-prompt.is-visible, .ai-story[data-ai-animated] .ai-story-reply.is-visible { margin-top: 10px; }
.ai-story[data-ai-animated] .ai-story-row.is-visible { min-height: 55px; border-bottom-width: 1px; }
.ai-story[data-ai-animated] .ai-story-row.is-visible > span { border-right-width: 1px; padding: 7px 5px 7px 10px; }

.ai-feature-copy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; min-width: 0; }
.ai-feature-point { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.ai-feature-point > span { padding-top: 2px; color: var(--color-primary-light); font-family: var(--font-display); font-size: .81rem; font-weight: 800; }
.ai-feature-point h3 { margin-bottom: 7px; font-size: 1.05rem; line-height: 1.4; }
.ai-feature-point p, .ai-feature-plan { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }
.ai-feature-plan { grid-column: 1 / -1; margin: 18px 0 14px; }
.ai-feature-link { display: inline-flex; gap: 8px; align-items: center; color: var(--color-primary-light); font-size: .92rem; font-weight: 700; }
.ai-feature-link:hover { text-decoration: underline; }

@media (max-width: 900px) { .ai-feature-copy { grid-template-columns: 1fr; } .ai-story-menu, .ai-story-top-actions { display: none; } }
@media (max-width: 820px) { .ai-story-workspace { grid-template-columns: 38px minmax(0, 1fr); } .ai-story-gantt { grid-column: 2; } .ai-story-sidebar { border-right: 0; border-bottom: 1px solid #dce0e1; } .ai-story-rail { grid-row: 1 / 3; } }
@media (max-width: 600px) {
  .ai-feature-section { padding: 70px 0; }
  .ai-feature-section .container { padding: 0 14px; }
  .ai-feature-section .section-header { margin-bottom: 30px; }
  .ai-story-topbar { gap: 9px; }
  .ai-story-file { margin-left: 0; text-align: right; font-size: .66rem; }
  .ai-story-workspace { grid-template-columns: 1fr; }
  .ai-story-rail { display: none; }
  .ai-story-sidebar { min-height: 390px; }
  .ai-story-terminal { height: 250px; }
  .ai-story-gantt { grid-column: 1; min-height: 325px; }
  .ai-story-gantt-toolbar { gap: 4px; }
  .ai-story-toolbar-pro { display: none; }
  .ai-story-calendar, .ai-story-row { grid-template-columns: minmax(125px, 40%) minmax(0, 1fr); }
  .ai-story-calendar { grid-template-columns: minmax(125px, 40%) repeat(4, minmax(0, 1fr)); }
  .ai-story-footer { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-story [data-ai-time], .ai-story-bar-three { transition: none !important; }
}

/* --- 8. Manual Guide Section --- */
/* マニュアル各ページへの導線。リンクであることが分かるよう、
   ホバーで矢印を動かす。 */
.manual-guide-section {
  padding: 100px 0;
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.manual-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.manual-guide-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 28px;
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.manual-guide-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

.manual-guide-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-inverse);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

.manual-guide-icon svg {
  width: 22px;
  height: 22px;
}

.manual-guide-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.manual-guide-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  /* 説明文の高さが揃わなくてもリンク文言は常にカード下端に並ぶ */
  flex-grow: 1;
  margin-bottom: 20px;
}

.manual-guide-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-light);
  transition: var(--transition-smooth);
}

.manual-guide-card:hover .manual-guide-more {
  letter-spacing: 0.5px;
}

/* スマホ幅では6枚のフルカードが縦に長く並んでしまい、直前のジャーニーの
   長いスクロールに続けてさらにスクロールを強いることになるため、
   説明文を落として2列×3行のコンパクトなアイコン+タイトルだけに圧縮する。
   カード自体がリンクなので、説明文が無くてもタップ先は変わらない。 */
@media (max-width: 640px) {
  .manual-guide-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .manual-guide-card {
    align-items: center;
    padding: 14px 8px;
    text-align: center;
  }

  .manual-guide-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
  }

  .manual-guide-icon svg {
    width: 18px;
    height: 18px;
  }

  .manual-guide-card-title {
    margin-bottom: 0;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .manual-guide-card-desc,
  .manual-guide-more {
    display: none;
  }
}

/* --- 9. Pricing --- */
.pricing-section {
  padding: 100px 0;
  background-color: var(--bg-main);
}

.pricing-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pricing-box::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(0,0,0,0) 70%);
  top: -150px;
  right: -150px;
  pointer-events: none;
}

.pricing-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.pricing-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 40px;
}

.pricing-info-card {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.info-card-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-card-item.border-left {
  border-left: 1px solid var(--border-color);
}

.info-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.text-green {
  color: var(--color-success);
}

.license-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 44px auto 0;
  text-align: left;
}

.license-option {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 23px 24px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-main);
}

.license-option-pro { border-color: color-mix(in srgb, var(--color-primary) 45%, var(--border-color)); background: color-mix(in srgb, var(--color-primary) 5%, var(--bg-card)); }
.license-option-ai { border-color: color-mix(in srgb, var(--color-secondary) 45%, var(--border-color)); background: color-mix(in srgb, var(--color-secondary) 5%, var(--bg-card)); }
.license-option-tag { display: inline-block; align-self: flex-start; margin-bottom: 15px; padding: 5px 9px; border-radius: 999px; color: var(--color-primary-light); background: var(--bg-card-hover); font-size: .74rem; font-weight: 800; }
.license-option h3 { margin-bottom: 9px; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.3; }
.license-option-summary { min-height: 3em; margin-bottom: 22px; color: var(--text-muted); font-size: .91rem; line-height: 1.55; }
.license-option ul { display: grid; gap: 11px; margin: 0 0 25px; padding: 0; list-style: none; }
.license-option li { position: relative; padding-left: 19px; font-size: .87rem; line-height: 1.5; }
.license-option li::before { content: '✓'; position: absolute; left: 0; color: var(--color-primary-light); font-weight: 800; }
.license-option-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 9px; width: 100%; margin-top: auto; padding: 12px 14px; border: 1px solid var(--color-primary); border-radius: 10px; color: var(--color-primary-light); background: var(--bg-card); font-size: .87rem; font-weight: 800; }
.license-option-link:hover, .license-option-link:focus-visible { color: #fff; background: var(--color-primary); }
.license-option-free .license-option-link { color: #fff; background: var(--color-primary); }
.license-option-free .license-option-link:hover, .license-option-free .license-option-link:focus-visible { background: var(--color-primary-light); }
.license-purchase-note { max-width: 900px; margin: 20px auto 0; color: var(--text-muted); font-size: .86rem; line-height: 1.7; text-align: left; }

@media (max-width: 820px) { .license-options { grid-template-columns: 1fr; } .license-option-summary { min-height: 0; } }

/* 無料版 / Pro の比較表（pricing-box 内） */
.plan-compare {
  max-width: 860px;
  margin: 56px auto 0;
  text-align: left;
}

.plan-compare-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.plan-compare-desc {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

/* 狭い画面では表だけを横スクロールさせ、ページ本体は横に伸ばさない */
.plan-compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background-color: var(--bg-main);
}

.plan-compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.plan-compare-table th,
.plan-compare-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-color);
}

.plan-compare-table tbody tr:last-child th,
.plan-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.plan-compare-table thead th {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background-color: var(--bg-card);
  white-space: nowrap;
}

.plan-compare-table thead th:first-child,
.plan-compare-table tbody th {
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  font-weight: 600;
  width: 34%;
}

.plan-compare-table thead th:nth-child(2),
.plan-compare-table tbody td:first-of-type {
  background-color: var(--bg-main);
}

.plan-compare-table td {
  color: var(--text-muted);
}

/* Pro 列だけ地色を敷いて、購入で変わる範囲を目で追えるようにする */
.plan-compare-table .is-pro {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  font-weight: 600;
}

.plan-compare-table thead .is-pro {
  color: var(--color-primary-light);
}

/* 無料版で使えない項目は、読み流しても分かるよう淡く見せる */
.plan-compare-table .is-off {
  color: var(--text-muted);
  opacity: 0.7;
}

.plan-compare-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.7;
}

/* --- 11. Feedback Section --- */
.feedback-section {
  padding: 72px 0 88px;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.feedback-form-container {
  padding: 40px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.feedback-form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feedback-form-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.feedback-form-container form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-control-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-control-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control-wrap input,
.form-control-wrap textarea {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  color: var(--text-main);
  width: 100%;
}

.form-control-wrap input:focus,
.form-control-wrap textarea:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.feedback-form-container .btn-primary {
  align-self: flex-start;
  margin-top: 8px;
}

.feedback-success {
  margin-top: 20px;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--color-success);
  color: var(--color-success);
  padding: 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

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

@media (max-width: 576px) {
  .feedback-section {
    padding: 56px 0 64px;
  }

  .feedback-form-container {
    padding: 32px 20px;
  }

  .form-group-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* --- 10. Download Section --- */
.download-section {
  padding: 100px 0;
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.download-box {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.download-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.download-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.download-btn-store {
  background-color: #000000;
  color: #ffffff !important;
  border: 1px solid #333333;
  border-radius: 10px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-bounce);
}

.download-btn-store:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: #555555;
}

.store-icon {
  width: 28px;
  height: 28px;
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.store-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}

.download-btn-direct {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition-bounce);
}

.download-btn-direct:hover {
  transform: translateY(-3px);
  background-color: var(--bg-card-hover);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.direct-icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary-light);
}

.direct-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.direct-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.direct-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}

.download-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 12. Footer --- */
.footer {
  background-color: var(--bg-main);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a:hover {
  color: var(--color-primary-light);
}

/* --- 12. Responsive Adjustments --- */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  /* 1カラムになるとテキスト幅は min(600px, 画面幅) になるので、
     2カラム時（4vw）より速く縮める必要がある。 */
  .hero-title {
    font-size: clamp(1.5rem, 7.5vw, 3rem);
  }
  
  .hero-content {
    margin: 0 auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-meta-info {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
}

@media (max-width: 768px) {
  .pricing-section .container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .header-container {
    padding: 0 16px;
  }
  
  .nav-menu {
    display: none; /* Can build simple menu toggler or keep it simple */
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .pricing-box {
    padding: 40px 16px;
  }

  .pricing-title {
    font-size: 1.8rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .pricing-desc {
    font-size: 1rem;
  }
  
  .pricing-info-card {
    flex-direction: column;
    gap: 16px;
  }
  
  .info-card-item.border-left {
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    width: 100%;
  }

  /* スマホでも3列の比較表を保ち、横スクロールなしで一覧できるようにする */
  .plan-compare {
    margin-top: 40px;
  }

  .plan-compare-scroll {
    overflow: hidden;
  }

  .plan-compare-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.78rem;
  }

  .plan-compare-table thead th {
    padding: 10px 8px;
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .plan-compare-table thead th:first-child,
  .plan-compare-table tbody th {
    width: 34%;
  }

  .plan-compare-table thead th:nth-child(2) {
    width: 27%;
  }

  .plan-compare-table thead th:nth-child(3) {
    width: 39%;
  }

  .plan-compare-table tbody th,
  .plan-compare-table tbody td {
    padding: 11px 8px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .plan-compare-table tbody th {
    font-size: 0.8rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Security / Trust Section
   ========================================================================== */
.security-section {
  padding: 5rem 0;
  position: relative;
}

/* セクション全体に微妙なグラデーション背景を付与して Features と差別化 */
[data-theme="dark"] .security-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(99, 102, 241, 0.04) 50%, rgba(15, 23, 42, 0) 100%);
}
[data-theme="light"] .security-section {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(79, 70, 229, 0.03) 50%, rgba(248, 250, 252, 0) 100%);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* カード上辺のグラデーションライン */
.security-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-smooth);
}

.security-card:hover {
  border-color: var(--color-primary);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

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

.security-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  display: block;
  line-height: 1;
}

.security-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.875rem;
}

.security-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* ==========================================================================
   主要機能セクションのビュー識別色と見出し幅
   --------------------------------------------------------------------------
   レイアウトとスクロール演出は、実画面モックの定義後にある .journey で扱う。
   ========================================================================== */

/* 5つの見え方の識別色。dataviz の検証済みカテゴリ配色スロット1〜6をドキュメント順の
   まま使っている。並び順そのものが CVD 安全性の担保なので入れ替えないこと
   （隣接ペアで dark / light とも全チェック通過を確認済み）。
   色は装飾で、どの画面かはモックの形とラベルが担っている。 */
[data-view='gantt'],      [data-active='gantt']      { --vc: #3987e5; }
[data-view='kanban'],     [data-active='kanban']     { --vc: #d95926; }
[data-view='matrix'],     [data-active='matrix']     { --vc: #199e70; }
[data-view='note'],       [data-active='note']       { --vc: #d55181; }
[data-view='whiteboard'], [data-active='whiteboard'] { --vc: #008300; }

/* light は同じ6色を明るい面に合わせて踏み直した段。自動反転ではない。 */
[data-theme='light'] :is([data-view='gantt'],      [data-active='gantt'])      { --vc: #2a78d6; }
[data-theme='light'] :is([data-view='kanban'],     [data-active='kanban'])     { --vc: #eb6834; }
[data-theme='light'] :is([data-view='matrix'],     [data-active='matrix'])     { --vc: #1baf7a; }
[data-theme='light'] :is([data-view='note'],       [data-active='note'])       { --vc: #e87ba4; }
[data-theme='light'] :is([data-view='whiteboard'], [data-active='whiteboard']) { --vc: #008300; }

/* 共通の .section-header は 700px 上限。日本語の見出しがそこで割れるので
   この節だけ広げる（他セクションの見出しには影響させない）。 */
.features-section .section-header {
  max-width: 860px;
}
/* ==========================================================================
   実画面モック（ガント / カンバン / ノート / 優先度マトリクス）

   スクリーンショットを縮小すると文字が潰れるので、実際の画面の「必要な部分だけ」を
   HTML/CSS で等倍に組み直したもの。セクションごとに、その機能の説明に要る範囲だけを
   切り出している。

   配色と寸法はアプリ本体（ライト画面）から取り、LP のテーマには追随させない。
   ここは「アプリの画面が写っているもの」なので、写真がダークモードで反転しないのと
   同じ扱いにする。そのため色は var(--text-main) 等ではなく、このブロック内で閉じた
   --u-* に定義する。

   図は装飾ではなく説明なので aria-hidden を付け、同じ内容は必ずリード文と
   要点3点で読めるようにしてある。
   ========================================================================== */
.ui {
  --u-bg: #f4f6f9; /* 画面の下地 */
  --u-surface: #ffffff;
  --u-line: #e6e9ee;
  --u-line-soft: #f0f2f5;
  --u-ink: #1f2733; /* タスク名・見出し */
  --u-ink-2: #5b6675; /* ラベル */
  --u-ink-3: #97a1ae; /* 補助 */
  --u-blue: #3b82f6;
  --u-blue-ink: #2563eb;
  --u-blue-soft: #e8effc; /* 選択行 */
  --u-red: #ef4444;
  --u-red-soft: #fdecec;
  --u-amber: #f0a52e;
  --u-amber-soft: #fdf1de;
  --u-green: #16a34a;
  --u-green-soft: #dff2e6;
  --u-shade: #f1f3f6;

  margin-bottom: 1.75rem;
  /* タブが横に並ぶぶん中身の最小幅が広くなる。列幅より広がって
     ページごと横スクロールしてしまうので、ここで頭を押さえる。
     はみ出したタブは .ui-tabs 側で切り落とす。 */
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--u-surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  color: var(--u-ink);
  /* 画面の再現なので、ルートの文字サイズには追随させず px で固定する */
  font-size: 12px;
  line-height: 1.4;
}

.ui,
.ui * {
  box-sizing: border-box;
}

/* --- タブ列。4つのビューが同じデータの切り替えであることをここで示す ---------
   幅に収まらないぶんは切り落とす。実画面でもタブは端で切れるので、
   語の長い言語（de/fr）で崩れるのではなく「続きがある」ように見える。 */
.ui-tabs {
  display: flex;
  align-items: stretch;
  height: 38px;
  padding: 0 6px;
  border-bottom: 1px solid var(--u-line);
  background-color: var(--u-bg);
  overflow: hidden;
}

.ui-tab {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--u-ink-2);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ui-tab.is-on {
  border-bottom-color: var(--u-blue-ink);
  border-radius: 8px 8px 0 0;
  background-color: var(--u-surface);
  color: var(--u-blue-ink);
}

/* タブのアイコン。currentColor の矩形を重ねて作るので画像を持たない */
.ui-ti {
  width: 12px;
  height: 12px;
  flex: none;
  background-repeat: no-repeat;
  background-image: linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
}

.ui-ti.tg {
  background-size: 7px 2px, 10px 2px, 5px 2px, 0 0;
  background-position: 0 1px, 2px 5px, 4px 9px, 0 0;
}

.ui-ti.tk {
  background-size: 2px 11px, 2px 7px, 2px 9px, 0 0;
  background-position: 1px 1px, 5px 4px, 9px 2px, 0 0;
}

.ui-ti.tn {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background-size: 5px 1.5px, 3px 1.5px, 0 0, 0 0;
  background-position: 1.5px 2px, 1.5px 5px, 0 0, 0 0;
}

.ui-ti.tw {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background-size: 4px 3px, 3px 5px, 0 0, 0 0;
  background-position: 1.5px 1.5px, 1.5px 5px, 0 0, 0 0;
}

.ui-ti.tx {
  background-size: 5px 5px, 5px 5px, 5px 5px, 5px 5px;
  background-position: 0 0, 7px 0, 0 7px, 7px 7px;
}

.ui-view {
  /* 既定は「画面の一部を切り出した」高さ。ジャーニーのステージに
     置かれたときだけ --ui-view-h で画面いっぱいに差し替わる。 */
  height: var(--ui-view-h, 330px);
  overflow: hidden;
  background-color: var(--u-bg);
}

/* ==========================================================================
   共通のタスクカード。カンバンと優先度マトリクスで同じ部品が出るのは
   実画面でも同じカードコンポーネントを使っているため。
   ========================================================================== */
.uic {
  padding: 9px 10px;
  border: 1px solid var(--u-line);
  border-left: 3px solid var(--uic-c, #5b9bf0);
  border-radius: 8px;
  background-color: var(--u-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.uic.is-on {
  border-color: var(--u-blue);
  box-shadow: 0 0 0 1px var(--u-blue), 0 3px 10px rgba(59, 130, 246, 0.2);
}

/* カード左端の色は所属する工程のもの */
.uic.ac-blue { --uic-c: #4a90e8; }
.uic.ac-purple { --uic-c: #a855f7; }
.uic.ac-amber { --uic-c: #f0a52e; }

.uic-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.uic-pill {
  min-width: 0;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 5px;
  background-color: var(--u-shade);
  color: var(--u-ink-2);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uic-score {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 5px;
  background-color: var(--u-shade);
  color: var(--u-ink-2);
  font-size: 10.5px;
  font-weight: 700;
}

.uic-t {
  margin-top: 7px;
  overflow: hidden;
  color: var(--u-ink);
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uic-tags {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}

.u-tag {
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.u-tag.tg-front { background-color: #4a90e8; }
.u-tag.tg-design { background-color: #a855f7; }
.u-tag.tg-imp { background-color: #f0803c; }

.uic-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--u-line);
}

.uic-sp { flex: 1; }

/* 期日チップ。実画面と同じく赤系で、遅れているかどうかが目に留まるようにしてある */
.u-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background-color: var(--u-red-soft);
  color: #e0574c;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.u-cal {
  width: 9px;
  height: 9px;
  flex: none;
  border: 1.2px solid currentColor;
  border-top-width: 3px;
  border-radius: 2px;
}

/* 優先度バッジ。ローマ数字が象限、隣の数字が優先度スコア */
.u-pb {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 4px;
  background-color: #f4685f;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.u-pb.p2 { background-color: #4a90e8; }

.u-pri {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--u-ink);
  font-size: 11px;
  font-weight: 700;
}

.u-av {
  display: flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
}

.u-av.a1 { background-color: #22c55e; }
.u-av.a2 { background-color: #a855f7; }

.uic-prog {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.u-track {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background-color: #eceff3;
}

.u-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background-color: #4c6ef5;
}

.u-track i.p20 { width: 20%; }
.u-track i.p40 { width: 40%; }

.uic-pct {
  color: var(--u-ink-2);
  font-size: 10px;
  font-weight: 600;
}

/* ==========================================================================
   1. ガントチャート — 「実装」グループの3行だけを切り出す
   ========================================================================== */
/* 行が4つしかないぶん、他のビューより低く切り出す（下の余白は実画面にもある） */
.gv {
  display: grid;
  height: var(--ui-view-h, 260px);
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  background-color: var(--u-surface);
}

.gv-tbl {
  min-width: 0;
  border-right: 1px solid var(--u-line);
}

.gv-hrow,
.gv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 74px 46px;
  align-items: center;
  height: 30px;
  border-bottom: 1px solid var(--u-line-soft);
}

/* 左の見出しは、右の「月」「週」2段ぶんの高さを1セルで受ける */
.gv-hrow {
  height: 50px;
  border-bottom: 1px solid var(--u-line);
  background-color: var(--u-bg);
  color: var(--u-ink-2);
  font-size: 11px;
  font-weight: 600;
}

.gv-hrow > *,
.gv-row > * {
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gv-hrow > * + *,
.gv-row > * + * {
  text-align: center;
}

.gv-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--u-ink);
}

.gv-row.is-group .gv-name { font-weight: 700; }
.gv-row:not(.is-group) .gv-name { padding-left: 20px; }

.gv-caret {
  width: 0;
  height: 0;
  flex: none;
  border: 4px solid transparent;
  border-top-color: var(--u-ink-3);
  transform: translateY(2px);
}

/* 選択行。左端の橙の線と淡い青の帯は表とタイムラインの両方に掛ける */
.gv-row.is-sel {
  background-color: var(--u-blue-soft);
  box-shadow: inset 3px 0 0 var(--u-amber);
}

.gv-date { color: var(--u-ink-2); font-size: 11px; }
.gv-num { color: var(--u-ink-2); font-size: 11px; }

.gv-tl {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.gv-th,
.gv-tw {
  display: grid;
  height: 25px;
  background-color: var(--u-bg);
}

.gv-th { grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--u-line-soft); }
.gv-tw { grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--u-line); }

.gv-th span,
.gv-tw span {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.gv-th span {
  border-right: 1px solid var(--u-line);
  color: var(--u-ink-2);
  font-size: 11px;
}

.gv-tw span { color: var(--u-ink-3); font-size: 10.5px; }

/* 週の区切り線。行が尽きた下も引き続き描かれるのは実画面と同じ */
.gv-lanes {
  position: relative;
  flex: 1;
  background-image: repeating-linear-gradient(
    to right,
    var(--u-line-soft) 0 1px,
    transparent 1px 20%
  );
}

.gv-lane { position: relative; height: 30px; }
.gv-lane.is-sel { background-color: var(--u-blue-soft); }

.gv-bar,
.gv-sum {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gv-bar {
  height: 16px;
  border-radius: 4px;
  background-color: #5b9bf0;
}

/* 親行のサマリーバー。子の期間を束ねた帯なので塗りを淡くしてある */
.gv-sum {
  display: flex;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: var(--u-amber-soft);
  color: #cf9227;
  font-size: 10.5px;
  font-weight: 700;
}

.gv-lane em {
  position: absolute;
  top: 50%;
  color: var(--u-ink-2);
  font-size: 10.5px;
  font-style: normal;
  white-space: nowrap;
  transform: translateY(-50%);
}

/* 7/20 を左端とした5週ぶん（35日）を 100% とみなした位置。
   上から デザイン(親) / ワイヤーフレーム / ビジュアルデザイン / デザインシステム構築 /
   実装(親) / フロント基盤構築 / トップページ実装 / CMS連携 の8行。 */
.gv-lane:nth-child(1) .gv-sum { left: 0; width: 31.4%; }
.gv-lane:nth-child(2) .gv-bar { left: 0; width: 8.6%; }
.gv-lane:nth-child(2) em { left: 9.6%; }
.gv-lane:nth-child(3) .gv-bar { left: 5.7%; width: 14.3%; }
.gv-lane:nth-child(3) em { left: 21%; }
.gv-lane:nth-child(4) .gv-bar { left: 11.4%; width: 22.9%; }
.gv-lane:nth-child(4) em { left: 35.3%; }
.gv-lane:nth-child(5) .gv-sum { left: 22.9%; width: 45.7%; }
.gv-lane:nth-child(6) .gv-bar { left: 22.9%; width: 11.4%; }
.gv-lane:nth-child(6) em { left: 35.3%; }
.gv-lane:nth-child(7) .gv-bar { left: 34.3%; width: 17.1%; }
.gv-lane:nth-child(7) em { left: 52.4%; }
.gv-lane:nth-child(8) .gv-bar { left: 51.4%; width: 20%; }
.gv-lane:nth-child(8) em { left: 72.5%; }

/* デザイン工程のサマリーバー。工程ごとに色が変わるのは実画面と同じ */
.gv-sum.design {
  background-color: #efe3fb;
  color: #8b5cd0;
}

/* 依存線。前工程の終わりと次の始まりが同じ日なので縦一本になる */
.gv-dep {
  position: absolute;
  left: 34.3%;
  top: 165px;
  width: 1px;
  height: 24px;
  background-color: #b6bfcc;
}

.gv-dep::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -3px;
  border: 3.5px solid transparent;
  border-top-color: #b6bfcc;
}

.gv-today {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 38%;
  width: 1.5px;
  background-color: var(--u-red);
}

.gv-today i {
  position: absolute;
  top: -25px;
  left: 50%;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: var(--u-red);
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

/* ==========================================================================
   2. カンバン — 3列ぶん。中央の列の1枚が当該タスク
   ========================================================================== */
.kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.kv-col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.55);
}

.kv-col.c1 { --kc: #a855f7; --kc-soft: #f4ebfd; }
.kv-col.c2 { --kc: #f0a52e; --kc-soft: #fdf1de; }
.kv-col.c3 { --kc: #f4685f; --kc-soft: #fdeceb; }

.kv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 3px solid var(--kc);
  border-radius: 10px 10px 0 0;
  background-color: var(--kc-soft);
}

.kv-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kv-count { color: var(--u-ink-2); font-size: 11px; font-weight: 600; }

.kv-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

/* 列のアイコン。実画面の目／再生／虫眼鏡を図形だけで作る */
.kv-ic {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--kc);
}

.kv-ic.eye {
  height: 10px;
  margin-top: 2px;
  border: 1.5px solid currentColor;
  border-radius: 50% / 60%;
}

.kv-ic.play {
  width: 0;
  height: 0;
  margin-left: 3px;
  border: 5px solid transparent;
  border-left-color: currentColor;
}

.kv-ic.search::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.kv-ic.search::after {
  content: '';
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 5px;
  height: 1.5px;
  background-color: currentColor;
  transform: rotate(45deg);
}

/* ==========================================================================
   3. ノート — 左のアウトラインと、当該タスクの本文
   ========================================================================== */
.nv {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  background-color: var(--u-surface);
}

.nv-side {
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  border-right: 1px solid var(--u-line);
}

.nv-search {
  display: flex;
  height: 26px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--u-line);
  border-radius: 6px;
  color: var(--u-ink-3);
  font-size: 10.5px;
}

.nv-search i {
  width: 9px;
  height: 9px;
  flex: none;
  border: 1.4px solid currentColor;
  border-radius: 50%;
}

.nv-tree { margin-top: 8px; }

.nv-node {
  display: flex;
  height: 24px;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  overflow: hidden;
  border-radius: 5px;
  color: var(--u-ink);
  font-size: 11px;
  white-space: nowrap;
}

.nv-node.lv2 { padding-left: 16px; }
.nv-node.lv3 { padding-left: 30px; color: var(--u-ink-2); }
.nv-node.lv1 { font-weight: 600; }

.nv-node.is-on {
  background-color: var(--u-blue-soft);
  color: var(--u-blue-ink);
  font-weight: 700;
}

.nv-node > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.u-doc {
  width: 10px;
  height: 12px;
  flex: none;
  border: 1.2px solid var(--u-ink-3);
  border-radius: 2px;
}

.nv-node.is-on .u-doc { border-color: var(--u-blue-ink); }

/* ノートが書かれているタスクの印 */
.nv-dot,
.nv-count { margin-left: auto; flex: none; }

.nv-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--u-green);
}

.nv-count { color: var(--u-ink-3); font-size: 10px; }

.nv-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.nv-bar {
  display: flex;
  height: 32px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid var(--u-line);
  color: var(--u-ink-2);
  font-size: 11px;
}

.nv-sel {
  display: flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--u-line);
  border-radius: 5px;
}

.nv-fmt { display: flex; gap: 10px; font-weight: 700; }
.nv-fmt i { font-style: normal; }
.nv-fmt i:nth-child(2) { font-style: italic; }
.nv-fmt i:nth-child(3) { text-decoration: underline; }
.nv-chars { margin-left: auto; color: var(--u-ink-3); font-size: 10.5px; }

/* 本文。左の縦線と丸は、タスクの並び順を示す実画面のレール */
.nv-doc {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 0 24px;
  overflow: hidden;
}

.nv-doc::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #cfe9da;
}

.nv-doc::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 40px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--u-surface);
  border-radius: 50%;
  background-color: var(--u-green);
}

.nv-crumb { color: var(--u-ink-3); font-size: 10.5px; }

.nv-h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.nv-h1 i {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 7px;
  background-color: var(--u-green-soft);
}

.nv-h1 i::before {
  content: '';
  width: 11px;
  height: 14px;
  border: 1.5px solid var(--u-green);
  border-radius: 2px;
}

.nv-h1 b {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nv-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  color: var(--u-ink-2);
  font-size: 10.5px;
  white-space: nowrap;
}

.nv-meta > span { display: inline-flex; align-items: center; gap: 5px; }

.nv-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--u-line);
}

.nv-body h4 {
  margin: 0 0 8px;
  color: var(--u-ink);
  font-size: 14px;
  font-weight: 800;
}

.nv-body p {
  margin: 0 0 6px;
  color: #33404f;
  font-size: 11.5px;
}

.nv-body ul { margin: 0 0 6px; padding-left: 17px; }

.nv-body li {
  margin-bottom: 3px;
  color: #33404f;
  font-size: 11.5px;
  list-style: disc;
}

.nv-todo {
  align-self: start;
  padding: 9px 10px;
  border: 1px solid var(--u-line);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nv-todo-h {
  display: flex;
  align-items: center;
  color: var(--u-blue-ink);
  font-size: 11px;
  font-weight: 800;
}

.nv-todo-h span {
  margin-left: auto;
  color: var(--u-ink-3);
  font-size: 10px;
  font-weight: 600;
}

.nv-todo-r {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 10.5px;
}

.nv-todo-r i {
  width: 15px;
  height: 15px;
  flex: none;
  border: 1.4px solid var(--u-blue);
  border-radius: 50%;
}

.nv-todo-r b { margin-left: auto; color: var(--u-ink-3); font-weight: 600; }

.nv-add {
  margin-top: 7px;
  padding-left: 22px;
  color: var(--u-ink-3);
  font-size: 10px;
}

/* ==========================================================================
   4. 優先度マトリクス — 4象限とカード3枚。右上（重要かつ緊急）が当該タスク
   ========================================================================== */
.xv { padding: 14px; }

.xv-plane {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--u-line);
  border-radius: 12px;
  background-color: var(--u-surface);
}

.xv-plane::before,
.xv-plane::after {
  content: '';
  position: absolute;
  border-color: #dfe3e9;
  border-style: dashed;
  border-width: 0;
}

.xv-plane::before { left: 7%; right: 7%; top: 50%; border-top-width: 1px; }
.xv-plane::after { top: 7%; bottom: 7%; left: 50%; border-left-width: 1px; }

/* 象限の番号は下地の一部。カードより後ろに置く */
.xv-q {
  position: absolute;
  width: 50%;
  text-align: center;
}

.xv-q b {
  display: block;
  color: #eff1f4;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
}

.xv-q span {
  display: block;
  margin-top: 4px;
  color: #e6eaef;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.xv-q.q1 { left: 50%; top: 14%; }
.xv-q.q2 { left: 0; top: 14%; }
.xv-q.q3 { left: 50%; top: 60%; }
.xv-q.q4 { left: 0; top: 60%; }

.xv-ax {
  position: absolute;
  color: var(--u-ink-3);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.xv-ax.t { top: 7px; left: 50%; transform: translateX(-50%); }
.xv-ax.b { bottom: 7px; left: 50%; transform: translateX(-50%); }
.xv-ax.l { left: 8px; top: 50%; transform: translateY(-50%); }
.xv-ax.r { right: 8px; top: 50%; transform: translateY(-50%); }

.xv .uic { position: absolute; width: 172px; }
.xv .uic.x1 { left: 53%; top: 10%; z-index: 2; }
.xv .uic.x2 { left: 17%; top: 20%; }
.xv .uic.x3 { left: 57%; top: 50%; }

/* ==========================================================================
   5. ホワイトボード — 締めのビュー

   ここだけ他より背が高い。flyer がこのボードの .wb-slot へ収まるため、
   その受け皿ぶんの余白が要る。
   ========================================================================== */
.wb {
  position: relative;
  /* 締めのビューなので他より背が高い。主役カードが等身大に近いまま
     着地できるだけの受け皿を、囲いの中に確保する必要がある。 */
  height: var(--ui-view-h, 480px);
  background-color: #fbfcfd;
  /* キャンバスのドット方眼 */
  background-image: radial-gradient(#dfe4ea 1px, transparent 1px);
  background-size: 16px 16px;
}

.wb-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wb-link {
  fill: none;
  stroke: #9aa4b2;
  stroke-width: 1.2;
}

/* 着地したときだけ現れるコネクタ。線を自分の長さぶんずらしておき、
   dashoffset を 0 に戻すことで描かれていくように見せる。 */
.wb-link-land {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  opacity: 0;
  transition: stroke-dashoffset 0.7s ease-out, opacity 0.3s ease-out;
}

/* 親タスクの「囲い」 */
.wb-group {
  position: absolute;
  left: 3%;
  top: 6%;
  width: 33%;
  padding: 10px;
  border: 1px solid #9cc0f0;
  border-radius: 10px;
  background-color: rgba(147, 190, 245, 0.42);
}

.wb-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px 8px;
  color: #1f2733;
  font-size: 11.5px;
  font-weight: 700;
}

.wb-group-head b {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
}

.wb-card {
  padding: 7px 9px;
  border: 1px solid #bcd4f4;
  border-radius: 7px;
  background-color: #e9f1fd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
}

.wb-card + .wb-slot,
.wb-slot + .wb-card {
  margin-top: 8px;
}

.wb-card-h {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.wb-card-h span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-card-m {
  display: flex;
  gap: 8px;
  margin-top: 5px;
  color: #5b6675;
  font-size: 10px;
  white-space: nowrap;
}

.wb-card-m span:last-child {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-card-p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.wb-card-p b {
  color: #5b6675;
  font-size: 10px;
  font-weight: 600;
}

/* flyer の着地点。中の静的カードへ重なってからフェードアウトする。 */
.wb-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 既定はほぼ正方形。JS が動く環境では、飛んでくるカードの実際の縦横比に
     合わせて高さを入れ直す（言語によってカードの高さが変わるため）。 */
  aspect-ratio: 1 / 1;
  max-height: 250px;
  border: 1.5px dashed #6d9ddb;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.35);
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

/* JS が飛ばせない環境（モバイル・動きを減らす設定・JS無効）では
   代わりにここへ静的なカードを出す。枠が空のまま終わらないようにするため。 */
.wb-slot-card {
  width: 100%;
}

.wb-note {
  position: absolute;
  left: 42%;
  top: 5%;
  width: 21%;
  padding: 10px 11px;
  border-radius: 3px;
  background-color: #f79b4e;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  color: #3d2508;
  font-size: 10.5px;
  line-height: 1.5;
}

/* キャンバスへの書き込み。カードでも図形でもない自由テキスト */
.wb-text {
  position: absolute;
  left: 41%;
  top: 38%;
  color: #303a47;
  font-size: 11.5px;
  font-weight: 600;
}

.wb-widget {
  position: absolute;
  left: 67%;
  top: 22%;
  width: 30%;
  padding: 10px 11px;
  border: 1px solid #e6e9ee;
  border-radius: 9px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.wb-w-h {
  display: flex;
  align-items: center;
  color: #1f2733;
  font-size: 11px;
  font-weight: 700;
}

.wb-w-h b {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: #f1f3f6;
  color: #5b6675;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.wb-w-n {
  display: flex;
  align-items: flex-end;
  margin-top: 8px;
}

.wb-w-n div { display: flex; flex-direction: column; }
.wb-w-n div.r { margin-left: auto; align-items: flex-end; }
.wb-w-n span { color: #97a1ae; font-size: 9.5px; }
.wb-w-n strong { color: #1f2733; font-size: 19px; font-weight: 800; line-height: 1.1; }

.wb-w-bar {
  display: block;
  height: 4px;
  margin-top: 7px;
  border-radius: 2px;
  background-color: #eceff3;
}

.wb-w-bar i {
  display: block;
  width: 22%;
  height: 100%;
  border-radius: 2px;
  background-color: #f4685f;
}

.wb-w-late { margin-top: 6px; color: #e0574c; font-size: 10px; font-weight: 700; }
.wb-w-done { margin-top: 5px; color: #5b6675; font-size: 10px; }
/* ==========================================================================
   主要機能ジャーニー（同じ1件が画面ごとに姿を変える）
   --------------------------------------------------------------------------
   既定は素直な縦並び。デスクトップかつ motion 許可時に app.js が
   data-enhanced を付けたときだけ sticky と飛行演出を有効にする。
   ========================================================================== */
.journey {
  position: relative;
  min-width: 0;
  --vc: var(--color-primary-light);
}

.journey-steps,
.journey-step {
  min-width: 0;
}

.journey-steps {
  counter-reset: journey-step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-step {
  padding: 3rem 0 5rem;
}

.journey-screen {
  position: relative;
  min-width: 0;
  transform-origin: 50% 12%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease, filter 0.45s ease;
}

.journey-screen .ui {
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
}

html body .journey-panel,
html body .journey .journey-panel,
.journey-panel {
  position: relative;
  z-index: 30;
  width: min(100%, 620px);
  margin: 0 0 0 auto;
  padding: 1rem 0.5rem !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  transition: opacity 0.45s ease;
}

/* 説明の裏。白い円を敷くと、文字が出そろう前に円だけが浮いて見えるので、
   塗りはほとんど持たせず「背景をぼかすだけ」にしてある。縁は mask で溶かす。 */
.journey-panel::before {
  content: '';
  position: absolute;
  inset: -52px -76px;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.28) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  /* 縁を切り落とさずに溶かす。border-radius だと輪郭が出てしまう */
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 50%, transparent 86%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, #000 50%, transparent 86%);
  pointer-events: none;
}

[data-theme='dark'] .journey-panel::before {
  background: radial-gradient(
    ellipse at center,
    rgba(18, 24, 38, 0.62) 0%,
    rgba(18, 24, 38, 0.34) 55%,
    rgba(18, 24, 38, 0) 100%
  );
}

/* パネルの固定表示・段階フェードはデスクトップだけ。狭い画面ではモックの
   隣に置く余地がなく、指スクロールと合わない浮遊演出になってしまうため、
   901px未満は通常フロー（下の素の .journey-panel）のまま何もしない。
   タスクが飛ぶ演出（flyer）はここでは触らない＝幅を問わず有効。 */
@media (min-width: 901px) {
  /* ぼかしは文字より少しだけ先に立ち上げる。いきなり出ると切り替わりが目立つ */
  .journey[data-enhanced] .journey-panel::before {
    opacity: clamp(0, calc(var(--journey-panel-p, 1) * 2.4), 1);
  }

  .journey[data-enhanced] .journey-panel {
    position: fixed;
    /* 上端固定だと、語の長い言語で下にはみ出す。中央に置いて上下の逃げを均す。 */
    top: 50%;
    z-index: 30;
    width: min(calc(100vw - 48px), 620px);
    margin: 0;
    opacity: var(--journey-panel-opacity, 0);
    pointer-events: none;
    transform: none !important;
    transition: none;
    /* それでも収まらないぶんは縮める。倍率は app.js が言語・ステップごとに
       実測して入れる（1 を超えることはない＝拡大はしない）。 */
    translate: 0 -50%;
    scale: var(--journey-panel-scale, 1);
    transform-origin: var(--journey-panel-origin, right) center;
  }

  /* 説明は左右交互に出す。ガント=右、カンバン=左、ノート=右… と振ることで、
     モックのどちら側を見せたいかを切り替えられる。 */
  .journey[data-enhanced] .journey-step:nth-child(odd) .journey-panel {
    right: max(24px, calc((100vw - 1200px) / 2 + 24px));
    left: auto;
    --journey-panel-origin: right;
  }

  .journey[data-enhanced] .journey-step:nth-child(even) .journey-panel {
    left: max(24px, calc((100vw - 1200px) / 2 + 24px));
    right: auto;
    --journey-panel-origin: left;
  }

  .journey[data-enhanced] .journey-step.is-panel-visible .journey-panel {
    pointer-events: auto;
    transform: none !important;
  }

  /* 説明は一度に出さず、番号 → 見出し → リード → 要点 → リンク の順に出す。
     --journey-panel-p はステップ内の進行度 0→1（app.js が毎フレーム入れる）。
     --d はその要素が出はじめる位置。消えるときは親の不透明度で一括。 */
  .journey[data-enhanced] .journey-index,
  .journey[data-enhanced] .journey-title,
  .journey[data-enhanced] .journey-lead,
  .journey[data-enhanced] .journey-points,
  .journey[data-enhanced] .journey-free-note,
  .journey[data-enhanced] .journey-more {
    --jp: clamp(0, calc((var(--journey-panel-p, 1) - var(--d, 0)) * 2.6), 1);
    opacity: var(--jp);
    translate: 0 calc((1 - var(--jp)) * 14px);
  }

  .journey[data-enhanced] .journey-index { --d: 0; }
  .journey[data-enhanced] .journey-title { --d: 0.08; }
  .journey[data-enhanced] .journey-lead { --d: 0.24; }
  .journey[data-enhanced] .journey-points { --d: 0.40; }
  .journey[data-enhanced] .journey-free-note,
  .journey[data-enhanced] .journey-more { --d: 0.56; }
}

.journey-index::before {
  counter-increment: journey-step;
  content: counter(journey-step, decimal-leading-zero);
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--vc);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.journey-title {
  margin-bottom: 0.8rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.45;
}

.journey-lead {
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.journey-points {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.journey-points li {
  position: relative;
  padding-left: 1.1rem;
}

.journey-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--vc);
}

.journey-points strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.journey-points span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.journey-free-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.journey-free-label {
  color: var(--color-success);
  font-weight: 700;
}

.journey-more {
  display: block;
  width: fit-content;
  color: var(--color-primary-light);
  font-size: 0.9rem;
  font-weight: 700;
}

.journey-more:hover {
  text-decoration: underline;
}


/* JS が動かない環境でも、ホワイトボードの主役カードは静的に見える。 */
.journey .wb-slot {
  aspect-ratio: auto;
  max-height: none;
  border-color: transparent;
  background-color: transparent;
}

.journey[data-enhanced] .journey-step {
  /* 内訳: モックが sticky で止まる可動域 + モック自身の高さ。
     ここを削ると、説明のフェードに割けるスクロール量が減る。 */
  min-height: 180vh;
  padding: 2rem 0;
}

/* 背の高いホワイトボードも、説明のフェードアウト完了まではstickyを保つ。 */
.journey[data-enhanced] .journey-step:last-child {
  min-height: 205vh;
}

.journey[data-enhanced] .journey-screen {
  position: sticky;
  top: calc(80px + 1.5rem);
  z-index: 1;
  translate: 0 var(--journey-entry-y, 0px);
}

/* ステージに置くようになったので、モックはヘッダー下から画面下までを使う。
   .ui-view 330px / .gv 260px / .wb 480px は、右カラムの上部に小さく
   置いていた頃の固定値で、画面の高さに対して足りていなかった。

   内訳: 80px（固定ヘッダー）+ 1.5rem（sticky の余白）+ 24px（画面下の余白）
         + 38px（モックのタブ列）。上限は、内側が px 組みで間延びしない範囲。 */
@media (min-width: 901px) {
  .journey[data-enhanced] {
    --ui-view-h: clamp(360px, calc(100vh - 190px), 820px);
  }

  /* 固定パネルのぶんモックを少し引かせる演出。パネルが通常フローのままの
     モバイルでは隣に避けるスペースが要らないので、デスクトップだけで良い。 */
  .journey[data-enhanced] .journey-step.is-back .journey-screen {
    transform: scale(0.98);
    opacity: 0.92;
  }
}

.journey-step [data-journey-anchor] {
  transition: box-shadow 0.35s ease, opacity 0.35s ease;
}

.journey-step.is-current [data-journey-anchor],
.journey-step.is-arrived [data-journey-anchor] {
  box-shadow: 0 0 0 2px var(--vc),
    0 0 0 8px color-mix(in srgb, var(--vc) 28%, transparent);
}

.journey-step.is-departing [data-journey-anchor] {
  opacity: 0.4;
  box-shadow: none;
}

/* ホワイトボードへ収まったときだけ、主役カードから先の線を描く。 */
.journey-step.is-arrived .wb-link-land {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* --- 飛ぶタスク ---------------------------------------------------------- */
.journey-flyer {
  --u-bg: #f4f6f9;
  --u-surface: #ffffff;
  --u-line: #e6e9ee;
  --u-line-soft: #f0f2f5;
  --u-ink: #1f2733;
  --u-ink-2: #5b6675;
  --u-ink-3: #97a1ae;
  --u-blue: #3b82f6;
  --u-blue-ink: #2563eb;
  --u-blue-soft: #e8effc;
  --u-red: #ef4444;
  --u-red-soft: #fdecec;
  --u-amber: #f0a52e;
  --u-amber-soft: #fdf1de;
  --u-green: #16a34a;
  --u-green-soft: #dff2e6;
  --u-shade: #f1f3f6;

  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  display: none;
  contain: layout paint;
  pointer-events: none;
  color: var(--u-ink);
  font-size: 12px;
  line-height: 1.4;
}

.journey-flyer,
.journey-flyer * {
  box-sizing: border-box;
}

.journey-flyer.is-active {
  will-change: transform;
}

.jf-plate,
.jf-face {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.jf-plate {
  z-index: 0;
  border: 1.5px solid color-mix(in srgb, var(--vc, #3b82f6) 45%, rgba(15, 23, 42, 0.18));
  border-radius: 11px;
  background-color: var(--u-surface);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.32), 0 0 28px color-mix(in srgb, var(--vc, #3b82f6) 30%, transparent);
}

.jf-face {
  z-index: 1;
  max-width: calc(100vw - 48px);
  overflow: hidden;
  opacity: 0;
}

.jf-face[data-face='gantt'] {
  width: min(520px, calc(100vw - 48px));
}

.jf-gantt-row {
  width: 100%;
  min-height: 38px;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 0;
  border-radius: 9px;
}

.jf-gantt-row .gv-name {
  padding-left: 14px;
  font-weight: 700;
}

.jf-gantt-period {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding-right: 14px;
  color: var(--u-ink-2);
  font-size: 10.5px;
}

.jf-gantt-period b {
  color: var(--u-ink);
  font-size: 11.5px;
}

.jf-face[data-face='kanban'] {
  width: 228px;
}

.jf-face[data-face='note'] {
  width: min(360px, calc(100vw - 48px));
  height: 140px;
  border-radius: 9px;
  background-color: var(--u-surface);
}

.jf-note-doc {
  width: 100%;
  height: 100%;
  padding: 12px 16px 10px 18px;
}

.jf-note-copy {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--u-line);
  color: #33404f;
  font-size: 11px;
  line-height: 1.5;
}

.jf-note-copy p {
  margin: 0 0 5px;
}

.jf-face[data-face='matrix'] {
  width: 190px;
  min-height: 150px;
}

.jf-matrix-card {
  min-height: 150px;
}

.jf-face[data-face='whiteboard'] {
  width: 228px;
}

.jf-whiteboard-card {
  width: 100%;
}

.jf-face.is-incoming .jf-new {
  transition: opacity 0.25s ease 0.12s, transform 0.25s ease 0.12s;
}

.jf-face.is-incoming:not(.is-revealed) .jf-new {
  opacity: 0;
  transform: translateY(4px);
}

@media (max-width: 900px) {
  .journey-title {
    font-size: 1.3rem;
  }
}

/* reduced-motion は幅を問わず常に縦並びの素の見た目に落とす
   （sticky も flyer も data-enhanced も JS 側で立てないが、CSS 側にも
   保険として同じ既定値に戻す処理を残す）。 */
@media (prefers-reduced-motion: reduce) {
  .journey-step {
    min-height: 0;
    padding: 2.5rem 0;
  }

  .journey-flyer {
    display: none !important;
  }

  /* 縦並びに落ちる側ではステージが無いので、切り出しの既定値に戻す */
  .journey[data-enhanced] {
    --ui-view-h: initial;
  }
}

/* Responsive: モバイルは1カラム */
@media (max-width: 768px) {
  .security-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .security-section {
    padding: 3rem 0;
  }
}

@media (max-width: 700px) {
  /* Preserve the desktop mock's proportions on phones and shrink it as one
     canvas, rather than compressing or removing its internal columns. */
  .journey-screen {
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .journey-screen .ui {
    --ui-view-h: 608px;
    position: absolute;
    left: 0;
    top: 0;
    width: 1152px;
    max-width: none;
    transform: scale(calc((100vw - 48px) / 1152px));
    transform-origin: top left;
  }
}
