/* ナレッジバンドル ホームページ専用スタイル（他ページは site.css） */
:root {
  --brand: #0ba8e0;
  --brand-2: #0b6fc2;
  --brand-3: #0784b3;
  --ink: #0b1220;
  --ink-2: #1c2b3a;
  --muted: #5c6b7a;
  --muted-2: #8a97a6;
  --line: rgba(15, 42, 68, 0.1);
  --bg: #f6f9fc;
  --card: #ffffff;
  --radius: 20px;
  --max: 1120px;
  --shadow: 0 20px 60px rgba(11, 18, 32, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(34px, 5.6vw, 60px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--brand); border-radius: 2px; }
.grad { background: linear-gradient(92deg, #0ba8e0 0%, #0b6fc2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; white-space: nowrap; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(92deg, #0ba8e0, #0784b3); color: #fff; box-shadow: 0 10px 30px rgba(11, 168, 224, .3); }
.btn-primary:hover { box-shadow: 0 16px 40px rgba(11, 168, 224, .4); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); border-color: var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--brand); color: #0784b3; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── ストアバッジ（公式ロゴ。改変しない） */
.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badge { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; text-decoration: none; }
.badge img { height: 52px; width: auto; display: block; }
.badge.is-disabled { cursor: default; }
.badge .soon { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #7c6f00; background: #fff7cc; border: 1px solid #f5e27a; padding: 3px 10px; border-radius: 999px; }
.badge .soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #e0b400; }

/* ── ヘッダー */
.header { position: sticky; top: 0; z-index: 30; background: rgba(246, 249, 252, .72); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .2s ease; }
.header.is-scrolled { box-shadow: 0 6px 30px rgba(11, 18, 32, .06); }
.header .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: none; gap: 26px; margin-left: 10px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); opacity: .85; }
.nav a:hover { opacity: 1; color: #0784b3; }
.header .cta { margin-left: auto; display: flex; gap: 10px; }
.header .cta .btn { padding: 10px 16px; font-size: 14px; }
@media (min-width: 900px) { .nav { display: flex; } }

/* ── ヒーロー */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 20% 10%, rgba(11,168,224,.20), transparent 60%), radial-gradient(50% 45% at 85% 20%, rgba(11,111,194,.16), transparent 60%); pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; animation: drift 18s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; left: -120px; top: -80px; background: #7dd8f7; }
.blob.b2 { width: 380px; height: 380px; right: -100px; top: 60px; background: #a9d8ff; animation-duration: 22s; animation-delay: -6s; }
.blob.b3 { width: 320px; height: 320px; left: 40%; bottom: -160px; background: #d4ecf9; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.08); } 66% { transform: translate(-30px,25px) scale(.95); } }
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 96px 0 60px; } .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.mbanner[hidden] { display: none; }
.mbanner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 18px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, #0ba8e0 0%, #0784b3 100%); color: #fff; box-shadow: 0 10px 28px rgba(11,168,224,.28); }
.mbanner .mb-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; }
.mbanner .mb-icon svg { width: 20px; height: 20px; }
.mbanner .mb-text { font-size: clamp(18px, 2.6vw, 24px); font-weight: 800; line-height: 1.3; }
.mbanner .mb-text b { font-size: 1.15em; color: #fde68a; }
.mbanner .mb-sub { flex-basis: 100%; font-size: 13px; opacity: .92; padding-left: 46px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); box-shadow: 0 4px 16px rgba(11,18,32,.06); margin-bottom: 20px; }
.hero .pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.hero .pill .dot svg { width: 13px; height: 13px; }
.hero .lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); margin: 22px 0 28px; max-width: 560px; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip svg { width: 16px; height: 16px; color: var(--brand); }

/* 端末モック */
.device-wrap { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.device { position: relative; width: min(320px, 78vw); border-radius: 44px; overflow: hidden; box-shadow: 0 40px 90px rgba(11,18,32,.28), 0 0 0 1px rgba(255,255,255,.5) inset; transform-style: preserve-3d; animation: float 7s ease-in-out infinite; will-change: transform; -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
.device img { width: 100%; }
@keyframes float { 0%,100% { transform: translateY(0) rotateX(0) rotateY(0); } 50% { transform: translateY(-14px); } }
.float-card { position: absolute; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; color: var(--ink); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 10px; animation: float 9s ease-in-out infinite; }
.float-card .ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #e6f5fc; color: #0784b3; }
.float-card .ic svg { width: 18px; height: 18px; }
.float-card.c1 { left: 0; top: 22%; animation-delay: -3s; }
.float-card.c2 { right: 0; top: 58%; animation-delay: -5s; }
.float-card .sub { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
@media (max-width: 640px) { .float-card.c1 { left: -6px; } .float-card.c2 { right: -6px; } }

/* ── 数字 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; max-width: 560px; }
.stat { background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted-2); font-weight: 500; margin-top: 2px; }

/* ── マーキー */
.marquee { padding: 28px 0 8px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 10px; width: max-content; animation: scroll 60s linear infinite; }
.track.rev { animation-direction: reverse; animation-duration: 70s; margin-top: 10px; }
.track:hover { animation-play-state: paused; }
.tag { white-space: nowrap; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 700; color: var(--ink-2); box-shadow: 0 2px 10px rgba(11,18,32,.04); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ── セクション */
.section { padding: 84px 0; }
.section.tight { padding-top: 40px; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 16px; }

/* ── ベント（特長） */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; grid-column: span 6; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(11,168,224,.45); }
.card .ic { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; background: #e6f5fc; color: #0784b3; }
.card .ic svg { width: 24px; height: 24px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.card.big { display: grid; gap: 20px; align-items: center; }
.card.big img { border-radius: 18px; border: 1px solid var(--line); }
@media (min-width: 720px) { .card { grid-column: span 3; } .card.big { grid-column: span 6; grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .card { grid-column: span 2; } .card.big { grid-column: span 4; grid-template-columns: 1.1fr .9fr; } .card.tall { grid-column: span 2; } }

/* ── 使い方 */
.steps { display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); font-size: 44px; font-weight: 900; letter-spacing: -0.04em; background: linear-gradient(92deg, #0ba8e0, #0b6fc2); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; display: block; margin-bottom: 12px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* ── スクショ */
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 22px 24px; margin: 0 -22px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: min(260px, 70vw); scroll-snap-align: center; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px rgba(11,18,32,.08); transition: transform .25s ease; }
.shot:hover { transform: translateY(-6px); }

/* ── 料金 */
.plans { display: grid; gap: 16px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(2, 1fr); align-items: stretch; } }
@media (min-width: 1100px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.featured { background: linear-gradient(160deg, #0f172a, #0f2a44); color: #e2e8f0; border-color: transparent; box-shadow: 0 30px 70px rgba(15, 42, 68, .35); }
.plan.featured h3, .plan.featured .price { color: #fff; }
.plan.featured .muted { color: #b6c0cf; }
.plan .ribbon { position: absolute; top: -13px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(11,168,224,.35); }
.plan .ribbon.green { background: #0784b3; }
.plan .price { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); margin: 10px 0 2px; line-height: 1.1; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .per { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 3px; color: var(--brand); }
.plan.featured li svg { color: #7dd8f7; }
.plan .cta { margin-top: auto; padding-top: 24px; }
.plan.featured .btn-primary { background: #fff; color: var(--ink); box-shadow: 0 10px 30px rgba(255,255,255,.15); }
.note { font-size: 12.5px; color: var(--muted-2); margin-top: 16px; line-height: 1.7; }

/* ── FAQ */
.faq { max-width: 760px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: 0 10px 30px rgba(11,18,32,.06); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 28px; height: 28px; border-radius: 50%; background: rgba(11,168,224,.12); color: #0784b3; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; transition: transform .2s ease; flex: 0 0 28px; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; }

/* ── 最終 CTA */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; background: linear-gradient(135deg, #0b1220, #0f2a44); color: #fff; padding: 56px 28px; text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(40% 40% at 30% 40%, rgba(11,168,224,.45), transparent 70%), radial-gradient(35% 35% at 75% 65%, rgba(125,216,247,.3), transparent 70%); filter: blur(60px); animation: spin 30s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c7d2e0; margin-top: 12px; }
.cta-band .badges { justify-content: center; margin-top: 26px; }
.cta-band .badge .soon { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fde68a; }
.qr-box { display: inline-flex; align-items: center; gap: 14px; margin-top: 24px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 16px; padding: 12px 16px; text-align: left; }
.qr-box img { width: 72px; height: 72px; background: #fff; border-radius: 10px; padding: 6px; }
.qr-box b { display: block; font-size: 14px; }
.qr-box span { font-size: 12px; color: #c7d2e0; }

/* ── フッター */
.footer { padding: 40px 0 48px; font-size: 13px; color: var(--muted); }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: #0784b3; }

/* ── スクロール出現 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; } .reveal[data-delay="2"] { transition-delay: .16s; } .reveal[data-delay="3"] { transition-delay: .24s; } .reveal[data-delay="4"] { transition-delay: .32s; } .reveal[data-delay="5"] { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .blob, .device, .float-card, .track, .cta-band::before { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── 追加: 大きめボタン / PC 向け QR / 準備中バッジ */
.btn-lg { padding: 16px 26px; font-size: 16px; }
.qr-inline { display: none; align-items: center; gap: 14px; margin-top: 22px; max-width: 560px; background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.qr-inline img { width: 84px; height: 84px; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid var(--line); }
.qr-inline b { display: block; font-size: 14px; color: var(--ink); }
.qr-inline span { font-size: 12.5px; color: var(--muted); }
@media (min-width: 900px) and (hover: hover) { .qr-inline { display: flex; } }

/* ── ストア選択ポップアップ */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(4px); }
.modal-panel { position: relative; width: min(480px, 100%); background: #fff; border-radius: 22px; padding: 28px 24px 22px; box-shadow: 0 30px 80px rgba(11,18,32,.3); animation: pop .25s cubic-bezier(.2,.7,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.modal-close svg { width: 18px; height: 18px; }
.modal-panel h3 { font-size: 20px; margin-bottom: 8px; padding-right: 40px; }
.store-list { display: grid; gap: 10px; margin-top: 18px; }
.store-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.store-item.is-primary { border-color: var(--brand); box-shadow: 0 8px 24px rgba(11,168,224,.18); }
.store-item.is-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(11,168,224,.26); }
.store-item.is-disabled { background: var(--bg); color: var(--muted); cursor: not-allowed; }
.store-item img { height: 40px; width: auto; flex: 0 0 auto; }
.store-ic { width: 44px; height: 44px; border-radius: 12px; background: #e6f5fc; color: #0784b3; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; }
.store-ic svg { width: 24px; height: 24px; }
.store-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.store-text b { font-size: 15px; }
.store-text span { font-size: 12.5px; color: var(--muted); }
.store-arrow { margin-left: auto; font-weight: 800; color: var(--brand); }
@media (prefers-reduced-motion: reduce) { .modal-panel { animation: none; } }

/* ── 強調（随時追加中） / マーキー注記 */
.stat.is-accent { background: linear-gradient(135deg, #0ba8e0, #0784b3); border-color: transparent; color: #fff; }
.stat.is-accent b { color: #fff; font-size: 22px; }
.stat.is-accent span, .stat.is-accent em { color: rgba(255,255,255,.85); }
.marquee-note { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.marquee-note strong { color: #0784b3; font-weight: 800; font-size: 16px; }

/* ── 料金: 無料体験の注記 */
.plan .trial { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: #0784b3; background: #e6f5fc; border-radius: 999px; padding: 4px 10px; }
.plan.featured .trial { background: rgba(255,255,255,.12); color: #7dd8f7; }

.plan .ribbon.dark { background: var(--ink); }

/* 教材別ページへの内部リンク（generate_kb_seo_pages.py が index.html に挿入） */
.mpages { padding-top: 24px; }
.mlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.mlinks a { text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 700; color: var(--ink-2); box-shadow: 0 2px 10px rgba(11,18,32,.04); }
.mlinks a:hover { border-color: var(--brand); color: var(--brand-3); }
