/* ============================================================
   PALMAGINE — Landing page
   Deep night indigo × aurora magic (matches the app icon)
   ============================================================ */

:root {
  --ink: #070912;
  --ink-2: #0c101f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(165, 180, 252, 0.16);
  --border-strong: rgba(165, 180, 252, 0.32);
  --text: #eef0fb;
  --text-dim: #a8aec8;
  --text-faint: #767d9c;
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #f0c24b;
  --grad: linear-gradient(96deg, #22d3ee 0%, #8b5cf6 45%, #f0c24b 100%);
  --radius: 20px;
  --font-display: "Sora", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans JP", system-ui, sans-serif;
}

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

/* 長い単語 (独語の複合語など) がカード幅を突き破らないための保険 */
body { overflow-wrap: break-word; }

/* 改行位置の調整 (全言語・特に小画面):
   見出しは行長を均等化 (balance)、本文は最終行の孤立を防ぐ (pretty)。
   非対応ブラウザでは無視され従来の折り返しになる */
h1, h2, h3, summary, .scrub-caption { text-wrap: balance; }
p { text-wrap: pretty; }

/* 韓国語: 単語 (어절) の途中で折り返さない */
:lang(ko) { word-break: keep-all; }

html { scroll-behavior: smooth; }

/* clip: 横パンを禁止しつつ position:sticky を壊さない
   (overflow-x:hidden はスクロールコンテナ化して sticky を無効にするため使わない) */
html, body { overflow-x: clip; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html[lang="ja"] body { font-family: "Noto Sans JP", var(--font-body); }
html[lang="ja"] .hero-title,
html[lang="ja"] .section-title,
html[lang="ja"] .cta-title { letter-spacing: 0.01em; }

::selection { background: rgba(139, 92, 246, 0.45); }

/* ---------- Background layers ---------- */

#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.55;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}

.blob-a {
  width: 55vmax; height: 55vmax;
  top: -22vmax; left: -12vmax;
  background: radial-gradient(circle at 30% 30%, rgba(79, 70, 229, 0.55), transparent 65%);
}

.blob-b {
  width: 46vmax; height: 46vmax;
  top: 10vmax; right: -18vmax;
  background: radial-gradient(circle at 60% 40%, rgba(34, 211, 238, 0.34), transparent 65%);
  animation-duration: 32s;
  animation-delay: -8s;
}

.blob-c {
  width: 50vmax; height: 50vmax;
  bottom: -25vmax; left: 22vw;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.4), transparent 65%);
  animation-duration: 38s;
  animation-delay: -16s;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

/* Everything above the background */
.nav, .hero, .section, .footer { position: relative; z-index: 1; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(7, 9, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(165, 180, 252, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.55);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  background: linear-gradient(96deg, #eef0fb 30%, #a5b4fc 70%, #f0c24b 105%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}

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

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

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

.lang-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lang-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* 言語セレクタ (index の 13言語ドロップダウン) */
select.lang-toggle {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23a8aec8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  max-width: 150px;
}

select.lang-toggle option {
  background: var(--ink-2);
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s;
}

.btn-small { padding: 9px 18px; font-size: 0.82rem; }
.btn-large { padding: 17px 34px; font-size: 1.05rem; }

.btn-primary {
  color: #fff;
  background: linear-gradient(96deg, var(--indigo), var(--violet));
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-glow { box-shadow: 0 8px 32px rgba(99, 82, 246, 0.45); }
.btn-glow:hover { box-shadow: 0 12px 44px rgba(99, 82, 246, 0.65); }

.btn-ghost {
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: transparent;
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* 公式ストアバッジ (Apple/Google配布のアートワークをそのまま使用) */
.store-badge {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, filter 0.25s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 8px 24px rgba(99, 82, 246, 0.5));
}

.store-badge img { display: block; width: auto; }

/* 公式バッジは英語版を全言語共通で使用 (Apple/Google公認の標準運用)。
   英語版同士は縦横比がほぼ同じため、同じ高さで大きさが揃う。
   日本語版バッジはApple側の縦横比が特殊で、どう拡縮しても揃わない */
.store-badge-apple img,
.store-badge-play img { height: 52px; width: auto; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 56px) clamp(60px, 10vh, 120px);
  min-height: calc(100vh - 64px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  background: var(--surface);
}

.spark { color: var(--gold); animation: twinkle 2.4s ease-in-out infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 26px 0 22px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  max-width: 34em;
  margin-bottom: 34px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero-note {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* ---------- Phone mockup ---------- */

.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-halo {
  position: absolute;
  inset: -12% -18%;
  background:
    radial-gradient(circle at 50% 42%, rgba(139, 92, 246, 0.36), transparent 58%),
    radial-gradient(circle at 62% 60%, rgba(34, 211, 238, 0.2), transparent 55%),
    radial-gradient(circle at 40% 62%, rgba(240, 194, 75, 0.13), transparent 50%);
  filter: blur(28px);
  animation: haloPulse 6s ease-in-out infinite;
}

@keyframes haloPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.phone {
  position: relative;
  width: min(320px, 82vw);
  aspect-ratio: 9 / 19;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(160deg, #23263c, #101322);
  border: 1px solid rgba(165, 180, 252, 0.25);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(99, 82, 246, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: phoneFloat 7s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}

.phone-notch {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 24px;
  border-radius: 999px;
  background: #05060c;
  z-index: 3;
}

.phone-screen {
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, #10132a 0%, #0a0c1a 100%);
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 50px 16px 12px;
  background: #23214b;
}

.app-logo { width: 26px; height: 26px; border-radius: 7px; }

/* 実アプリのホーム画面のセリフ体ワードマークを再現 */
.app-wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: #fff;
}

.app-gear { margin-left: auto; color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; }

.app-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  justify-content: flex-start;
}

.msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.74rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  animation: msgIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}

@keyframes msgIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-user {
  align-self: flex-end;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  color: #fff;
  border-bottom-right-radius: 5px;
}

.msg-genie {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(165, 180, 252, 0.14);
  color: var(--text-dim);
  border-bottom-left-radius: 5px;
}

/* ツール実行行 (実アプリの「🔧 Write: src/...」表示を再現) */
.msg-tool {
  align-self: stretch;
  max-width: 100%;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 4px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-tool .tool-glyph { font-size: 0.55rem; flex: none; opacity: 0.7; }

.msg-done {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0 4px;
  color: #34d399;
  font-size: 0.68rem;
  font-weight: 600;
}

.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: bounce 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px 12px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(165, 180, 252, 0.18);
  font-size: 0.68rem;
  color: var(--text-faint);
}

.chat-clip { font-size: 0.7rem; opacity: 0.6; }

.chat-send {
  margin-left: auto;
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--indigo), var(--violet));
  color: #fff;
  font-size: 0.7rem;
}

/* 下部タブバー (チャット / コード / プレビュー) */
.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 9px 0 14px;
  border-top: 1px solid rgba(165, 180, 252, 0.12);
  background: rgba(10, 12, 24, 0.85);
  color: var(--text-faint);
  font-size: 0.72rem;
}

.tab { transition: color 0.3s; }
.tab.active { color: #a5b4fc; }

/* 家計簿シナリオ用: チャット画面のライトテーマ (実アプリのライト表示を再現) */
.phone-screen.light { background: #f6f7fb; }

.phone-screen.light .app-header { background: #34309a; }

.phone-screen.light .msg-genie {
  background: #fff;
  border-color: #e6e8f2;
  color: #3a3f52;
  box-shadow: 0 2px 8px rgba(26, 29, 41, 0.05);
}

.phone-screen.light .msg-tool { color: #8a91a6; }

.phone-screen.light .msg-done { color: #4f46e5; }

.phone-screen.light .typing i { background: #9aa1b5; }

.phone-screen.light .chat-input {
  background: #fff;
  border-color: #e2e5f0;
  color: #9aa1b5;
}

.phone-screen.light .tabbar {
  background: #fff;
  border-top-color: #e8eaf2;
  color: #a3a9bc;
}

.phone-screen.light .tab.active { color: #4f46e5; }

/* プレビュー画面 (生成された習慣トラッカー "RITUAL" のダークUI) */
.preview-screen {
  position: absolute;
  inset: 0;
  background: #0b0b12;
  color: #f4f4f8;
  padding: 14px 13px;
  transform: translateY(103%);
  transition: transform 0.55s cubic-bezier(0.3, 0.8, 0.3, 1);
  overflow: hidden;
}

.preview-screen.shown { transform: translateY(0); }

.pv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pv-eyebrow {
  font-size: 0.42rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  color: #6f6f7e;
}

.pv-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  margin-top: 3px;
}

.pv-accent { color: #a78bfa; }

.pv-avatar {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #cabffd;
  color: #241a4d;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 800;
}

/* 連続記録カード */
.pv-streak-card {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  padding: 11px 12px 10px;
  border-radius: 16px;
  background: #7c4dff;
  color: #fff;
}

.pv-streak-card::before,
.pv-streak-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.pv-streak-card::before {
  width: 92px; height: 92px;
  top: -40px; right: -18px;
  background: rgba(255, 255, 255, 0.16);
}

.pv-streak-card::after {
  width: 64px; height: 64px;
  bottom: -34px; right: 24px;
  border: 9px solid rgba(255, 255, 255, 0.14);
}

.pv-streak-label {
  font-size: 0.42rem;
  letter-spacing: 0.26em;
  font-weight: 700;
  opacity: 0.85;
}

.pv-streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0 9px;
}

.pv-streak-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
}

.pv-streak-days b {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.pv-streak-days i {
  font-style: normal;
  font-size: 0.5rem;
  opacity: 0.85;
}

.pv-streak-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.5rem;
}

.pv-fire-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 13, 32, 0.72);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.pv-fire-pill i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #4ade80;
}

.pv-pop { animation: pvPop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

@keyframes pvPop {
  from { transform: scale(0.4); }
  to { transform: scale(1); }
}

/* MY RITUALS */
.pv-sec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 8px;
}

.pv-sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.pv-sec-sub { font-size: 0.48rem; color: #6f6f7e; margin-top: 2px; }

.pv-plus { font-size: 0.95rem; font-weight: 300; color: #d9d9e2; line-height: 1; }

.pv-cards { display: flex; gap: 7px; }

.pv-rcard {
  flex: none;
  width: 96px;
  position: relative;
  overflow: hidden;
  padding: 9px 9px 10px;
  border-radius: 12px;
  background: #15151d;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pv-rcard.is-active {
  border-color: rgba(167, 139, 250, 0.65);
  background: #17132a;
}

.pv-ricon {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 6px;
  font-size: 0.62rem;
  margin-bottom: 13px;
}

.pv-ricon-violet { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.pv-ricon-green { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.pv-ricon-amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }

.pv-rname { font-weight: 700; font-size: 0.58rem; }

.pv-rstreak { font-size: 0.48rem; font-weight: 600; color: #a78bfa; margin-top: 2px; }
.pv-rstreak.green { color: #34d399; }
.pv-rstreak.amber { color: #fbbf24; }

.pv-rbar {
  position: absolute;
  left: 9px; right: 9px; bottom: 4px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.pv-rbar i {
  display: block;
  height: 100%;
  width: 64%;
  border-radius: 99px;
  background: #8b5cf6;
  transition: width 0.7s ease;
}

.pv-rcard.charged .pv-rbar i { width: 100%; }

/* カレンダー */
.pv-cal {
  margin-top: 10px;
  padding: 10px 11px 9px;
  border-radius: 14px;
  background: #15151d;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.pv-cal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pv-cal-title { font-family: var(--font-display); font-weight: 800; font-size: 0.68rem; }

.pv-cal-sub {
  font-size: 0.42rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #6f6f7e;
  margin-top: 2px;
}

.pv-cal-navs { display: flex; gap: 4px; }

.pv-cal-nav {
  width: 16px; height: 16px;
  border-radius: 5px;
  background: #23232e;
  color: #c9c9d4;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  line-height: 1;
}

.pv-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  justify-items: center;
  align-items: center;
  row-gap: 4px;
  margin-top: 8px;
}

.pv-dow {
  font-size: 0.36rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #6f6f7e;
}

.pv-day {
  width: 17px; height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.44rem;
  color: #c9c9d4;
}

.pv-day.on {
  background: #7c4dff;
  color: #fff;
  font-weight: 700;
}

.pv-cal-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.46rem;
  color: #8a8a98;
  margin-top: 7px;
}

.pv-cal-legend i {
  flex: none;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #8b5cf6;
}

/* プレビュー画面その2 (生成された家計簿 "凪帳" のライトUI) */
.preview-screen.pv2 {
  background: #f3f1e8;
  color: #33362e;
  padding: 13px 13px 0;
}

.pv2-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv2-logo {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid #55705c;
  display: grid;
  place-items: center;
}

.pv2-logo::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #cd6a4e;
}

.pv2-titles { flex: 1; min-width: 0; }

.pv2-eyebrow {
  font-size: 0.38rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  color: #8d8d7f;
}

.pv2-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.15;
  letter-spacing: 0.12em;
}

.pv2-sub { font-size: 0.44rem; color: #8d8d7f; }

.pv2-avatar {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #cfdccc;
  color: #3b5243;
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 800;
}

.pv2-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0;
  font-size: 0.6rem;
}

.pv2-mnav {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #e9e6da;
  color: #6d6d60;
  display: grid;
  place-items: center;
  font-size: 0.5rem;
  line-height: 1;
}

/* 今月の支出カード */
.pv2-budget-card {
  position: relative;
  overflow: hidden;
  padding: 10px 12px 11px;
  border-radius: 15px;
  background: #4c6a56;
  color: #fdfcf7;
}

.pv2-budget-card::before,
.pv2-budget-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.pv2-budget-card::before {
  width: 84px; height: 84px;
  top: -36px; right: -16px;
  background: rgba(255, 255, 255, 0.09);
}

.pv2-budget-card::after {
  width: 56px; height: 56px;
  bottom: -30px; right: 24px;
  border: 8px solid rgba(255, 255, 255, 0.08);
}

.pv2-blabel { font-size: 0.46rem; font-weight: 700; opacity: 0.9; }

.pv2-bamount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 1px 0 5px;
}

.pv2-brow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.46rem;
  opacity: 0.9;
}

.pv2-bbar {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
  margin: 4px 0 6px;
}

.pv2-bbar i {
  display: block;
  height: 100%;
  width: 5%;
  border-radius: 99px;
  background: #d9d072;
  transition: width 0.7s ease;
}

.pv2-budget-card.grown .pv2-bbar i { width: 8.4%; }

.pv2-bleft { position: relative; font-size: 0.5rem; font-weight: 700; }

/* セクション見出し */
.pv2-sec {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 10px 2px 6px;
}

.pv2-sec-title { font-weight: 800; font-size: 0.62rem; }
.pv2-sec-sub { font-size: 0.44rem; color: #8d8d7f; margin-top: 1px; }
.pv2-count { font-size: 0.44rem; color: #8d8d7f; }

/* カテゴリ別内訳 */
.pv2-list {
  background: #fff;
  border-radius: 12px;
  padding: 3px 10px;
  box-shadow: 0 3px 10px rgba(60, 60, 40, 0.05);
}

.pv2-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.pv2-row + .pv2-row { border-top: 1px solid #f0eee5; }

.pv2-ric {
  flex: none;
  width: 17px; height: 17px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 0.5rem;
  line-height: 1;
}

.pv2-c1 { background: #f7e3da; color: #cd6a4e; }
.pv2-c2 { background: #f3e7d7; color: #b07b4a; }
.pv2-c3 { background: #e2ece2; color: #5c8a68; }
.pv2-c4 { background: #dfe9f3; color: #5b84b1; }
.pv2-c5 { background: #ece2f3; color: #8a63a8; }

.pv2-rname { flex: 1; font-weight: 600; font-size: 0.54rem; }

.pv2-ramt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pv2-ramt b { font-size: 0.54rem; font-weight: 800; }

.pv2-rbar {
  width: 44px;
  height: 3px;
  border-radius: 99px;
  background: #edebe0;
  overflow: hidden;
}

.pv2-rbar i { display: block; height: 100%; border-radius: 99px; }

/* 最近の支出 */
.pv2-recent {
  background: #fff;
  border-radius: 12px;
  padding: 3px 10px;
  box-shadow: 0 3px 10px rgba(60, 60, 40, 0.05);
}

.pv2-rrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
}

.pv2-rrow + .pv2-rrow { border-top: 1px solid #f0eee5; }

.pv2-rinfo { flex: 1; min-width: 0; }
.pv2-rinfo b { display: block; font-size: 0.54rem; font-weight: 700; }
.pv2-rinfo i { font-style: normal; font-size: 0.42rem; color: #8d8d7f; }

.pv2-rneg { font-size: 0.54rem; font-weight: 800; }

.pv2-coffee { opacity: 0; }
.pv2-coffee.in { opacity: 1; }

/* プレビュー画面その3 (生成されたブロックゲーム "WRONG BLOCKS") */
.preview-screen.pv3 {
  background: #e9e5db;
  color: #232336;
  padding: 12px 13px;
}

.preview-screen.pv3::before,
.preview-screen.pv3::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.preview-screen.pv3::before {
  width: 110px; height: 110px;
  top: -34px; right: -30px;
  background: #cfc4ec;
}

.preview-screen.pv3::after {
  width: 80px; height: 80px;
  bottom: 30px; left: -40px;
  background: #bfe3cf;
}

.pv3-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pv3-eyebrow {
  font-size: 0.4rem;
  letter-spacing: 0.26em;
  font-weight: 800;
  color: #55555f;
}

.pv3-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  margin-top: 3px;
}

.pv3-archive {
  background: #1d1d30;
  border-radius: 6px;
  padding: 4px 8px;
  text-align: center;
}

.pv3-archive i {
  display: block;
  font-style: normal;
  font-size: 0.32rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: #58e0c8;
}

.pv3-archive b {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: #f2e34c;
}

/* 規約カード */
.pv3-rule {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  margin-top: 7px;
  border: 1.5px solid #232336;
  background: #f0ece1;
}

.pv3-rule-icon {
  flex: none;
  width: 36px;
  background: #f2e34c;
  border-right: 1.5px solid #232336;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  line-height: 1;
  font-weight: 800;
}

.pv3-rule-icon i {
  font-style: normal;
  font-size: 0.26rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin-top: 2px;
}

.pv3-rule-text { flex: 1; padding: 5px 7px; }
.pv3-rule-text b { display: block; font-size: 0.5rem; }
.pv3-rule-text i {
  font-style: normal;
  font-size: 0.42rem;
  line-height: 1.4;
  color: #4a4a55;
}

.pv3-voidok {
  align-self: center;
  flex: none;
  padding-right: 6px;
  color: #f0569a;
  font-size: 0.38rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  transform: rotate(-8deg);
}

/* スコア行 */
.pv3-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 7px;
}

.pv3-vlabel {
  font-size: 0.38rem;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: #6a6a72;
}

.pv3-vnum {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
}

.pv3-permits { text-align: right; }

.pv3-dashes {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  margin-top: 4px;
}

.pv3-dashes i {
  width: 14px; height: 5px;
  border-radius: 2px;
  background: #f0569a;
}

.pv3-dashes i.off { background: #c9c5bb; }

.pv3-status {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.44rem;
  font-weight: 600;
  color: #55555f;
  margin: 5px 0 4px;
}

/* ゲーム盤面 */
.pv3-board {
  position: relative;
  z-index: 1;
  background: #242440;
  border-radius: 3px;
  overflow: hidden;
}

.pv3-bhead {
  display: flex;
  justify-content: space-between;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.32rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #e8e9f4;
}

.pv3-cols {
  display: flex;
  justify-content: space-around;
  padding: 3px 0 1px;
  font-size: 0.32rem;
  font-weight: 700;
  color: #666a8c;
}

.pv3-field {
  position: relative;
  height: 212px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.13)),
    linear-gradient(rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.13)),
    linear-gradient(rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.13)),
    linear-gradient(rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.13));
  background-repeat: no-repeat;
  background-size: 1px 100%;
  background-position: 12.5% 0, 37.5% 0, 62.5% 0, 87.5% 0;
}

/* 落下ブロック: プレビュー表示中だけ動く */
.pv3-block {
  position: absolute;
  top: -34px;
  width: 27px; height: 27px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #232336;
  font-size: 0.26rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  animation-name: pv3Fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-play-state: paused;
}

.preview-screen.shown .pv3-block { animation-play-state: running; }

.pv3-block b { font-size: 0.52rem; font-weight: 400; margin-bottom: 1px; }

.pv3-mint { background: #5ee6b0; }
.pv3-purple { background: #8b7bf0; }
.pv3-blue { background: #6cc7f0; }
.pv3-pink { background: #f06ba8; }
.pv3-yellow { background: #f2e34c; }

@keyframes pv3Fall {
  from { transform: translateY(0) rotate(var(--r)); }
  to { transform: translateY(256px) rotate(var(--r)); }
}

.pv3-line {
  position: absolute;
  left: 0; right: 0;
  top: 54%;
  background: #f2e34c;
  color: #232336;
  font-size: 0.34rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 2px 0;
}

.pv3-line i { font-style: normal; color: #f0569a; }

.pv3-taps {
  display: flex;
  justify-content: space-around;
  padding: 3px 0 5px;
  font-size: 0.32rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #8a8da8;
}

.pv3-legend {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.4rem;
  font-weight: 600;
  line-height: 1.6;
  color: #55555f;
  margin-top: 6px;
}

/* 支出を記録ボタン */
.pv2-fab {
  position: absolute;
  left: 26px; right: 26px; bottom: 10px;
  padding: 8px 0;
  border-radius: 999px;
  background: #c96f52;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 6px 16px rgba(160, 80, 50, 0.35);
}

/* ---------- Sections ---------- */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) clamp(20px, 5vw, 56px);
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(40px, 7vh, 70px); }

/* ペインの見出し「ひらめきは、机の上には来ない。」(全角15字) が
   720pxだと僅かに折り返すため、このセクションだけ広げる */
#pain .section-head { max-width: 820px; }

/* 日本語見出しの文節: 中では折らず、文節の切れ目 (読点の後) でだけ改行する */
.nb { display: inline-block; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 22px 0 16px;
}

/* 本文は左揃え (ブロック自体は中央配置のまま)。
   描画結果が1行に収まる場合のみJSが .single-line を付けて中央揃えにする */
.section-sub { color: var(--text-dim); font-size: 1.02rem; text-align: left; }
.section-sub.single-line { text-align: center; }

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.glass:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

/* Steps */

/* カード | → | カード | → | カード (狭い画面では縦積み+↓) */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
}

.step-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.step-link span {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(240, 194, 75, 0.55);
  animation: stepNudge 1.6s ease-in-out infinite;
}

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

.step { padding: 34px 28px; position: relative; overflow: hidden; }

.step-num {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  color: rgba(165, 180, 252, 0.12);
}

.step-rune {
  font-size: 2rem;
  width: 62px; height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(79, 70, 229, 0.3), rgba(34, 211, 238, 0.12));
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* 実機スクリーンショット (仕組み3ステップに1枚ずつ。ステップの主張の証拠)
   画面もページも暗色なので、ヒーローのモックアップと同じ
   「背後の光のハロー + 輪郭のリムライト」で背景から切り離す */
.step-shot {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 24px 0 4px;
}

.step-shot::before {
  content: "";
  position: absolute;
  inset: -2% -14%;
  background:
    radial-gradient(ellipse 64% 56% at 50% 40%, rgba(139, 92, 246, 0.6), transparent 70%),
    radial-gradient(ellipse 54% 48% at 64% 70%, rgba(34, 211, 238, 0.3), transparent 65%),
    radial-gradient(ellipse 48% 42% at 36% 72%, rgba(240, 194, 75, 0.16), transparent 60%);
  filter: blur(26px);
  pointer-events: none;
}

.step-shot img {
  position: relative;
  width: min(100%, 236px);
  filter:
    drop-shadow(0 0 1.5px rgba(185, 198, 255, 0.6))
    drop-shadow(0 18px 34px rgba(0, 0, 0, 0.6));
}

.step h3, .feature h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.1vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.step p, .feature p { color: var(--text-dim); font-size: 0.92rem; }

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature { padding: 30px 26px; }

.feature-icon {
  font-size: 1.6rem;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

/* ペイン共感カード (悩み → PALMAGINEでの解消) */

.pains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.pain {
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}

.pain h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.1vw, 1.55rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.pain p { color: var(--text-dim); font-size: 0.92rem; }

/* 解消の一文: 金の✦で「願いが叶う」トーンに (カードのパンチライン) */
.pain-fix {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(165, 180, 252, 0.2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.45;
}

.pains .pain-fix { color: var(--text); }

.pain-fix::before {
  content: "✦ ";
  color: var(--gold);
}

/* 作例ギャラリー: 「送るメッセージ」をそのまま見せるカード */

.ideas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.idea {
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.idea-head { display: flex; align-items: center; gap: 12px; }

.idea-emoji {
  font-size: 1.45rem;
  width: 46px; height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid var(--border);
}

.idea h3 {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* アプリのユーザー吹き出しを再現 (右寄せ・右下だけ角を残す) */
.idea-msg {
  align-self: flex-end;
  max-width: 95%;
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  color: #fff;
  padding: 12px 17px;
  border-radius: 18px;
  border-bottom-right-radius: 5px;
  font-size: 0.9rem;
  line-height: 1.55;
  box-shadow: 0 6px 22px rgba(99, 82, 246, 0.3);
}

.ideas-note {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-top: 30px;
}

/* 料金: ¥0 の一枚看板 */

.zero { text-align: center; }

.zero-figure { position: relative; display: inline-block; }

.zero-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6rem, 17vw, 11rem);
  line-height: 1.05;
  filter: drop-shadow(0 0 44px rgba(139, 92, 246, 0.45));
}

.zero-spark {
  position: absolute;
  color: var(--gold);
  animation: twinkle 2.4s ease-in-out infinite;
}

.zs1 { top: 2%; left: -14%; font-size: 1.4rem; }
.zs2 { top: 62%; right: -18%; font-size: 1rem; animation-delay: 0.8s; }
.zs3 { top: -8%; right: -6%; font-size: 0.75rem; animation-delay: 1.5s; }

.zero-eq {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 36px 0 24px;
}

.eq-chip {
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.eq-op {
  color: var(--text-faint);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.eq-result {
  background: linear-gradient(96deg, var(--indigo), var(--violet));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 8px 30px rgba(99, 82, 246, 0.4);
}

.zero-note {
  color: var(--text-faint);
  font-size: 0.86rem;
  max-width: 46em;
  margin: 0 auto;
  text-align: left;
}

/* 比較テーブル: PALMAGINE列をハイライト */

.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.compare {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.compare th,
.compare td {
  padding: 16px 20px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(165, 180, 252, 0.1);
  vertical-align: top;
}

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

.compare thead th {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

/* 行ラベル */
.compare tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  white-space: nowrap;
}

.compare td { color: var(--text-dim); }

/* 評価記号 (✓△✕): ぱっと見で優劣が読めるように */
.cmp-mark {
  display: inline-block;
  width: 1.5em;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  vertical-align: -0.08em;
}

.cmp-mark.ok { color: #34d399; }
.cmp-mark.mid { color: var(--gold); }
.cmp-mark.ng { color: #f87171; opacity: 0.85; }

/* PALMAGINE列 */
.compare .hl {
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
}

.compare thead .hl {
  background: rgba(139, 92, 246, 0.2);
  letter-spacing: 0.1em;
}

/* セクション末尾の補足ノート (比較セクション等で使用) */

.flow-note {
  text-align: left;
  color: var(--text-faint);
  font-size: 0.86rem;
  margin-top: 28px;
}

/* FAQ (details/summary のアコーディオン) */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.faq-item[open],
.faq-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-strong);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "＋";
  flex: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  padding: 0 22px 20px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* CTA */

.cta-card {
  text-align: center;
  padding: clamp(48px, 8vh, 80px) clamp(24px, 5vw, 72px);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.28), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(34, 211, 238, 0.14), transparent 50%);
  pointer-events: none;
}

.cta-card > * { position: relative; }

.cta-icon {
  width: 86px; height: 86px;
  border-radius: 22px;
  margin-bottom: 26px;
  box-shadow: 0 0 44px rgba(139, 92, 246, 0.65);
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

/* 1行だけの文なので中央揃えのまま */
.cta-sub { color: var(--text-dim); margin-bottom: 32px; }
.cta-center { justify-content: center; }

/* ---------- 法務ページ (プライバシーポリシー・利用規約) ---------- */

.legal {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.legal-date {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 36px;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 38px 0 12px;
}

.legal p, .legal li {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.legal p { margin: 10px 0; }
.legal ul { padding-left: 1.5em; margin: 10px 0; }
.legal li { margin: 7px 0; }
.legal a { color: #a5b4fc; }
.legal strong, .legal em { color: var(--text); font-style: normal; }

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 56px 20px 44px;
  border-top: 1px solid rgba(165, 180, 252, 0.08);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-tag { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 22px; }

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 22px;
}

.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.86rem;
}

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

.footer-tm {
  color: var(--text-faint);
  font-size: 0.7rem;
  max-width: 46em;
  margin: 0 auto 10px;
}

.footer-copy { color: var(--text-faint); font-size: 0.78rem; }

/* ---------- Scroll scrub (連番WebPをCanvasに描画) ---------- */

.scrub {
  position: relative;
  height: 260vh; /* この高さぶんのスクロールで全フレームを再生する */
  z-index: 1;
}

.scrub.static { height: 100vh; }

.scrub-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

#scrubCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 映像の端をページ背景に溶け込ませる */
.scrub-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 16%, transparent 84%, var(--ink) 100%),
    radial-gradient(ellipse 85% 75% at 50% 50%, transparent 52%, var(--ink) 100%);
}

/* 他セクションと同じ帯ラベルをキャプションの上に表示 */
.scrub-eyebrow {
  position: absolute;
  top: 13vh;
  left: 20px; right: 20px;
  text-align: center;
  z-index: 1;
}

/* セクション見出し (.section-title) と同じ書体・サイズで常時表示 */
.scrub-caption {
  position: absolute;
  left: 20px; right: 20px;
  top: 23vh;
  z-index: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 30px rgba(7, 9, 18, 0.9);
}

/* グラデーション文字は text-shadow と干渉するため無効化 */
.scrub-caption .grad-text { text-shadow: none; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.shown { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    padding-top: 48px;
  }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { margin-left: auto; margin-right: auto; text-align: left; }
  .hero-cta { justify-content: center; }
  .cta-title { font-size: clamp(1.7rem, 8vw, 2.4rem); }

  /* タブレット幅では1列にせず2列を維持 (ペインの3枚目だけ全幅) */
  .features, .ideas, .pains { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .pains .pain:last-child { grid-column: 1 / -1; }
  .step, .feature, .pain { padding: 26px 22px; }

  /* 仕組み: 縦積みにして矢印を下向きに
     (transformはアニメ停止時=reduced-motion用の静的な向き) */
  .steps { grid-template-columns: 1fr; }
  .step-link { padding: 4px 0; }
  .step-link span { transform: rotate(90deg); animation-name: stepNudgeV; }
}

@keyframes stepNudgeV {
  0%, 100% { transform: rotate(90deg) translateX(0); opacity: 0.7; }
  50% { transform: rotate(90deg) translateX(6px); opacity: 1; }
}

/* スマホ: セクション余白を詰め、カードは「アイコン横並び」の
   コンパクト表示にして縦の間延びを防ぐ */
@media (max-width: 640px) {
  .section { padding: 56px 20px; }
  .section-head { margin-bottom: 30px; }

  .steps, .features, .ideas, .pains { grid-template-columns: 1fr; gap: 12px; }
  .steps .step:last-child, .pains .pain:last-child { grid-column: auto; }

  .pain { padding: 18px 16px; }
  .pain .feature-icon { margin-bottom: 12px; }
  .pain h3 { font-size: 1.22rem; }
  .pain p { font-size: 0.88rem; }
  .pain-fix { margin-top: 14px; padding-top: 12px; font-size: 0.98rem; }

  .idea { padding: 18px 16px; gap: 12px; }
  .idea-emoji { width: 40px; height: 40px; font-size: 1.2rem; border-radius: 12px; }
  .idea h3 { font-size: 1.12rem; }
  .idea-msg { font-size: 0.85rem; padding: 10px 14px; }
  .ideas-note { margin-top: 20px; }

  .store-badge-apple img,
  .store-badge-play img { height: 46px; }
  .faq-item summary { padding: 15px 18px; font-size: 0.92rem; }
  .faq-item p { padding: 0 18px 16px; font-size: 0.88rem; }

  .step, .feature {
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 16px;
  }

  /* スマホ: スクショはカード全幅の行として文字の下に置く */
  .step-shot { grid-column: 1 / -1; margin: 14px 0 4px; }
  .step-shot img { width: min(64%, 200px); }

  .step-rune, .feature-icon {
    width: 46px; height: 46px;
    font-size: 1.35rem;
    border-radius: 13px;
    margin-bottom: 0;
  }

  .step h3, .feature h3 { margin-bottom: 0; font-size: 1.22rem; }
  .step p, .feature p { grid-column: 1 / -1; margin-top: 10px; font-size: 0.88rem; }
  .step-num { font-size: 1.8rem; top: 10px; right: 14px; }

  .zero-eq { margin: 26px 0 18px; gap: 8px; }
  .eq-chip { padding: 10px 16px; font-size: 0.85rem; }
  .cta-card { padding: 44px 22px; }
}

@media (max-width: 480px) {
  .nav { gap: 12px; }
  .btn-small { padding: 8px 13px; font-size: 0.76rem; }
  .wordmark { font-size: 0.88rem; letter-spacing: 0.16em; }
  select.lang-toggle {
    font-size: 0.72rem;
    padding: 6px 22px 6px 10px;
    background-position: right 8px center;
    max-width: 96px;
  }
}

/* 最小幅スマホ: 13言語の長いラベル (例: "Descarga la app") でも
   ナビが1行に収まるよう全要素を一段コンパクトに */
@media (max-width: 400px) {
  .nav { gap: 10px; }
  .nav-logo { width: 28px; height: 28px; }
  .wordmark { font-size: 0.78rem; letter-spacing: 0.12em; }
  .btn-small { padding: 7px 10px; font-size: 0.72rem; }
  select.lang-toggle { max-width: 84px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
