/* kakuraku.fujibit.com 共通スタイル（電楽・遺楽・波楽・流楽と同じ作り。確楽の色：アプリのシード色 #7C4DFF とマゼンタ #E040FB）
   scripts/build_site.py が生成する各ページから読み込む */
:root {
  --bg: #0b0716;
  --bg-2: #150c2c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(179, 136, 255, 0.18);
  --text: #f1ecfb;
  --muted: #b4a9cf;
  --faint: #7d7299;
  --accent: #7c4dff;
  --cyan: #c4a2ff;
  --violet: #e040fb;
  --radius: 20px;
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Noto Sans JP", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
main { overflow-x: clip; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ヘッダー（すりガラス） */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 7, 22, 0.62);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: 0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { white-space: nowrap; }
.brand small { color: var(--faint); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.18em; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .lang { border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; }
.nav .cta {
  white-space: nowrap; color: #fff; padding: 8px 16px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
}
@media (max-width: 820px) { .nav .hide-sm { display: none; } }
@media (max-width: 560px) { .brand small { display: none; } }

/* ヒーロー */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 15% 40%, rgba(11, 7, 22, 0.9), transparent 72%),
    linear-gradient(180deg, transparent 70%, var(--bg));
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; color: var(--cyan);
  border: 1px solid rgba(196, 162, 255, 0.32); background: rgba(196, 162, 255, 0.08);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1.08; font-weight: 900; letter-spacing: -0.01em;
  background: linear-gradient(120deg, #ffffff 8%, #c9b2ff 50%, #ef8bff 95%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { margin-top: 22px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 16px;
  border-radius: 14px; background: #fff; color: #140b26; font-weight: 700; min-width: 196px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.store:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(196, 162, 255, 0.28); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: 0.7rem; font-weight: 600; color: #5d527a; }
.store.alt { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--border); }
.store.alt small { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--surface); }

/* 端末の枠 */
.device {
  position: relative; width: min(320px, 78vw); margin: 0 auto; aspect-ratio: 540 / 1263;
  border-radius: 46px; padding: 11px; background: linear-gradient(160deg, #362a55, #120b24);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(200, 170, 255, 0.18), 0 0 80px rgba(124, 77, 255, 0.25);
}
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }

/* 数字の帯 */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { display: block; font-size: 1.9rem; font-weight: 900; background: linear-gradient(120deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 0.85rem; color: var(--muted); }

/* セクション */
section.block { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.kicker { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; color: var(--cyan); text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.25; margin-top: 10px; font-weight: 850; }
.section-head p { color: var(--muted); margin-top: 14px; }

/* モードのカード */
.cat { display: flex; align-items: center; gap: 10px; margin: 40px 0 16px; font-weight: 800; color: var(--muted); font-size: 0.95rem; }
.cat::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mode {
  position: relative; border-radius: var(--radius); padding: 22px 22px 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.mode::before {
  content: ""; position: absolute; inset: -40% 40% 60% -20%; border-radius: 50%;
  background: radial-gradient(circle, var(--c), transparent 70%); opacity: 0.22; transition: opacity 0.25s ease;
}
.mode:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.mode:hover::before { opacity: 0.38; }
.mode .num { position: relative; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; color: var(--c); }
.mode h3 { position: relative; font-size: 1.12rem; margin: 6px 0 6px; }
.mode p { position: relative; font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
.badge { display: inline-block; margin-left: 8px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); border-radius: 999px; padding: 2px 9px; vertical-align: 2px; }

/* スクリーンショット */
/* 左端はほかのセクション（.wrap の内側）にそろえ、右へはみ出してスクロールする */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(260px, 70vw); gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - var(--max)) / 2 + 24px)); padding: 8px max(24px, calc((100vw - var(--max)) / 2 + 24px)) 28px; scrollbar-width: thin; }
.gallery figure { scroll-snap-align: start; }
.gallery .device { width: 100%; border-radius: 38px; padding: 9px; }
.gallery .device img { border-radius: 30px; }
.gallery figcaption { margin-top: 16px; text-align: center; }
.gallery figcaption b { display: block; font-size: 1rem; }
.gallery figcaption span { font-size: 0.85rem; color: var(--muted); }

/* 特長 */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { border-radius: var(--radius); padding: 26px; background: var(--surface); border: 1px solid var(--border); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(124,77,255,0.28), rgba(224,64,251,0.22)); border: 1px solid var(--border); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; stroke: var(--cyan); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.05rem; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 0.92rem; }

/* 料金・広告と CTA */
.panel { border-radius: 28px; padding: 40px; background: linear-gradient(135deg, rgba(124,77,255,0.14), rgba(224,64,251,0.08)); border: 1px solid var(--border); }
.panel h2 { font-size: 1.6rem; margin-bottom: 12px; }
.panel p { color: var(--muted); max-width: 52em; }
.panel p + p { margin-top: 10px; }
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; }
.cta-band .stores { justify-content: center; }

/* 下層ページ（プライバシー等） */
main.page { padding: 64px 0 96px; }
main.page .container { max-width: 760px; margin: 0 auto; padding: 0 24px; }
h1.page { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 900; background: linear-gradient(120deg, #fff, #d5bfff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 8px; }
.subtitle { color: var(--muted); margin-bottom: 32px; font-size: 0.92rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; }
.card h2 { font-size: 1.08rem; margin-bottom: 10px; }
.card p, .card li { color: var(--muted); font-size: 0.95rem; line-height: 1.8; }
.card p { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 8px 0 8px 20px; }
.card strong { color: var(--text); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 列が細くなりすぎないよう最小幅を持たせ、狭い画面では表だけ横にスクロール */
.table-wrap table { min-width: 620px; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; color: var(--muted); }
th, td { border: 1px solid var(--border); padding: 10px; text-align: left; vertical-align: top; line-height: 1.6; }
th { color: var(--text); background: rgba(124, 77, 255, 0.1); }

/* フッター（KINRAKU 方式：© 2026 Fuji Bit Inc. | サポート | …。アプリ名は付けない） */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 52px; color: var(--faint); font-size: 0.86rem; text-align: center; }
.site-footer .legal { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; }
.site-footer .legal a { color: var(--muted); }
.site-footer .legal a:hover { color: var(--text); }
.site-footer .sep { color: rgba(179, 136, 255, 0.35); }
.site-footer .contact { margin-top: 12px; }

/* スクロールで浮かび上がる（JS が有効なときだけ） */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  section.block { padding: 72px 0; }
  .panel { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 12px; }
  .nav { gap: 10px; }
  .brand small { display: none; }
  .nav .cta { padding: 7px 14px; font-size: 0.85rem; }
  .nav .lang { padding: 4px 10px; }
  .store { min-width: 0; flex: 1 1 100%; justify-content: center; }
  .gallery { padding: 8px 16px 24px; scroll-padding-inline: 16px; }
}

/* ヒーロー右側：モンティ・ホールを試し続けるカード（odds.js） */
.sim-card {
  position: relative; width: min(400px, 100%); margin: 0 auto; padding: 22px 22px 18px;
  border-radius: 28px; border: 1px solid rgba(200, 170, 255, 0.22);
  background: linear-gradient(160deg, rgba(44, 28, 84, 0.78), rgba(16, 10, 34, 0.82));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 90px rgba(124, 77, 255, 0.28);
}
.sim-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; color: #ff8a8a; }
.sim-top .live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.sim-top .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff5c8a; box-shadow: 0 0 10px #ff5c8a; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 10px; }
.door { position: relative; display: grid; place-items: center; padding: 12px 0 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); transition: border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease; }
.door svg { width: 46px; height: 64px; fill: rgba(255, 107, 107, 0.16); stroke: #ff6b6b; stroke-width: 2.4; transition: transform 0.35s ease; }
.door svg circle { fill: #ff6b6b; stroke: none; }
.door b { font-size: 0.78rem; color: var(--faint); margin-top: 4px; }
.door .mark { position: absolute; top: 32%; left: 50%; transform: translate(-50%, -50%) scale(0.4); font-size: 1.6rem; font-weight: 900; line-height: 1; opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; }
.door.pick { border-color: #c4a2ff; background: rgba(124, 77, 255, 0.2); box-shadow: 0 0 0 1px #c4a2ff inset; }
.door.open { opacity: 0.55; }
.door.open svg { transform: perspective(200px) rotateY(-55deg); }
.door.open .mark::after { content: "\00d7"; color: var(--muted); }
.door.open .mark, .door.prize .mark { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.door.prize { border-color: #ffd93d; background: rgba(255, 217, 61, 0.12); }
.door.prize .mark::after { content: "\2605"; color: #ffd93d; text-shadow: 0 0 14px rgba(255, 217, 61, 0.8); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--faint); margin-bottom: 16px; }
.legend .lg { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .pick { background: #c4a2ff; } .legend .open { background: #5a5170; } .legend .prize { background: #ffd93d; }
.legend span { margin-left: 4px; }
.rate + .rate { margin-top: 12px; }
.rate-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; font-weight: 700; }
.rate-h b { font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.rate.sw b { color: #ef8bff; } .rate.st b { color: #c4a2ff; }
.bar { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); margin-top: 6px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transition: width 0.35s ease; }
.rate.sw .bar i { background: linear-gradient(90deg, #7c4dff, #e040fb); box-shadow: 0 0 14px rgba(224, 64, 251, 0.5); }
.rate.st .bar i { background: linear-gradient(90deg, #5b3bd1, #b388ff); }
.bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.75); border-radius: 2px; }
.sim-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--faint); }
.sim-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .sim-top .live::before { animation: none; } .door, .door svg, .door .mark, .bar i { transition: none; } }

/* 4 フェーズ（スクリーンショットと、フェーズ 2 は HTML の模型） */
.gallery figcaption .badge { margin-left: 6px; font-size: 0.66rem; color: #fff; vertical-align: 2px; }
.gallery figcaption .phase { display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; color: #fff; background: linear-gradient(135deg, var(--accent), var(--violet)); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
@media (max-width: 900px) { .sim-card { width: min(400px, 100%); } }
@media (max-width: 480px) { .sim-card { padding: 18px 16px 14px; border-radius: 22px; } .doors { gap: 10px; } .door svg { width: 38px; height: 54px; } }
.gallery.screens { margin-top: 40px; }
