/* 作品 LP 共通スタイル (明るいトーン / 作品が主役)
   scripts/build_lp.py が生成する htdocs/works/<slug>/index.html から読み込む。
   作品ごとの色は work.json の theme → <html style="--accent:..."> で上書きする。 */
:root {
  --bg: #f6f3ef;
  --surface: #ffffff;
  --surface-alt: #fdf8f3;
  --text: #2a2a2e;
  --text-sub: #6b6b74;
  --text-faint: #a3a3ab;
  --line: #ebe6df;
  --accent: #ff5f6d;
  --accent-text: #ffffff;
  --accent-soft: #fff0f1;
  --sub: #3a86ff;
  --sub-text: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 30, 20, 0.08);
  --column: 760px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  line-height: 1.85;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3, .lp-btn { font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif; }

/* HEADER: 作品名を主役に、レーベル名は右端に小さく */
.lp-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 48px; padding: 0 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lp-header-title {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-weight: 800; font-size: 0.9rem;
  color: var(--text); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-header-label {
  flex-shrink: 0;
  font-size: 0.62rem; letter-spacing: 0.12em;
  color: var(--text-faint); text-decoration: none;
}
.lp-header-label:hover { color: var(--text-sub); }

/* 1 カラム本体。LP 画像は幅 750px 前後の縦長画像を想定 */
.lp-main { max-width: var(--column); margin: 0 auto; background: var(--surface); }

/* HERO */
.lp-hero-kv { width: 100%; }
.lp-hero-body { padding: 28px 20px 4px; text-align: center; }
.lp-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.lp-badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 12px; border-radius: 999px;
  background: var(--surface-alt); color: var(--text-sub);
  border: 1px solid var(--line);
}
.lp-badge.is-new { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.lp-title { font-size: clamp(1.2rem, 4.8vw, 1.7rem); font-weight: 800; line-height: 1.5; margin-bottom: 12px; }
.lp-catch { font-size: clamp(1rem, 3.8vw, 1.2rem); font-weight: 700; color: var(--accent); line-height: 1.7; }
.lp-lead { font-size: 0.9rem; color: var(--text-sub); margin-top: 12px; }

/* CTA: 「プレイ」「体験版」の 2 択。購入ではなく作品に触れてもらう導線 */
.lp-cta { padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-cta-buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 440px; }
.lp-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 58px; padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(0,0,0,0.12), var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.lp-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.lp-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,0.12); }
.lp-btn-play { background: var(--accent); color: var(--accent-text); }
.lp-btn-trial { background: var(--sub); color: var(--sub-text); }
.lp-btn-trial .lp-free {
  font-size: 0.68rem; font-weight: 800;
  background: #fff; color: var(--sub);
  padding: 1px 8px; border-radius: 999px;
}
.lp-btn-icon { font-size: 0.9em; }
.lp-cta-note { font-size: 0.72rem; color: var(--text-faint); }
.lp-cta-langs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lp-btn-lang {
  font-size: 0.74rem; color: var(--text-sub); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; background: var(--surface);
}
.lp-btn-lang:hover { border-color: var(--accent); color: var(--accent); }

/* 縦積みページ (画像・動画) */
.lp-pages img, .lp-pages video { width: 100%; height: auto; }
.lp-pages .lp-cta { background: var(--surface-alt); }

/* 動画: 音声なしで自動再生。lp.js が「タップで音声ON」と操作バー (再生/一時停止・ミュート・音量) を付ける */
.lp-video { position: relative; background: #000; line-height: 0; }
.lp-video video { width: 100%; height: auto; cursor: pointer; }
.lp-video-unmute {
  position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 0; border-radius: 999px;
  background: rgba(20, 20, 24, 0.72); color: #fff;
  font: 700 0.8rem/1 inherit; font-family: inherit; white-space: nowrap; cursor: pointer;
  animation: lp-pulse 2s ease-in-out infinite;
}
.lp-video-unmute svg { width: 16px; height: 16px; }
.lp-video.is-unmuted .lp-video-unmute { display: none; }
@keyframes lp-pulse { 50% { background: rgba(20, 20, 24, 0.9); } }
.lp-video-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 4px;
  padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  line-height: 1;
}
.lp-video-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer;
}
.lp-video-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lp-video-btn svg { width: 20px; height: 20px; fill: currentColor; }
.lp-video-vol { width: 96px; accent-color: var(--accent); cursor: pointer; }
.lp-video.no-volume .lp-video-vol { display: none; }   /* iPhone などは音量を変えられない (本体のボタンで調整) */

/* YouTube: サムネイル + 再生ボタン。タップで lp.js が iframe に差し替える */
.lp-youtube {
  position: relative; display: block;
  aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.lp-youtube.is-vertical { aspect-ratio: 9 / 16; max-width: 420px; margin: 0 auto; }
.lp-youtube img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.2s; }
.lp-youtube:hover img { filter: brightness(0.85); }
.lp-youtube-play {
  position: absolute; left: 50%; top: 50%;
  width: 72px; height: 50px; transform: translate(-50%, -50%);
  border-radius: 14px; background: rgba(20, 20, 24, 0.75);
  transition: background 0.2s;
}
.lp-youtube:hover .lp-youtube-play { background: var(--accent); }
.lp-youtube-play::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid; border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}
.lp-youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 画像が未配置のときの目印 (ビルド時に警告も出る) */
.lp-missing {
  display: grid; place-items: center;
  min-height: 220px; padding: 24px;
  border: 2px dashed #d9d2c8;
  background: repeating-linear-gradient(45deg, #faf7f3, #faf7f3 12px, #f2ede6 12px, #f2ede6 24px);
  font-family: monospace; font-size: 0.8rem;
  color: var(--text-sub); text-align: center;
}
.lp-missing.is-tall { min-height: 480px; }

/* 見出し付きセクション */
.lp-section { padding: 52px 20px; }
.lp-section:nth-of-type(even) { background: var(--surface-alt); }
.lp-section-title { text-align: center; margin-bottom: 28px; font-size: 1.4rem; font-weight: 800; line-height: 1.3; }
.lp-section-title small {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.25em;
  color: var(--accent); margin-bottom: 4px;
}

/* STORY */
.lp-story p { font-size: 0.95rem; line-height: 2.1; margin-bottom: 1.2em; }
.lp-story p:last-child { margin-bottom: 0; }

/* CHARACTERS */
.lp-chars { display: grid; gap: 18px; }
.lp-char {
  display: grid; grid-template-columns: 38% 1fr; gap: 16px;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.lp-char-img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-alt); }
.lp-char-img img { width: 100%; height: 100%; object-fit: cover; }
.lp-char-img .lp-missing { min-height: 0; height: 100%; font-size: 0.66rem; border: none; }
.lp-char-body { padding: 18px 18px 18px 0; display: flex; flex-direction: column; gap: 6px; }
.lp-char-name { font-size: 1.1rem; font-weight: 800; line-height: 1.4; }
.lp-char-name rt { font-size: 0.6rem; color: var(--text-faint); font-weight: 400; }
.lp-char-cv { font-size: 0.75rem; font-weight: 700; color: var(--accent); }
.lp-char-desc { font-size: 0.85rem; color: var(--text-sub); line-height: 1.85; }
.lp-char audio { width: 100%; height: 36px; margin-top: auto; }

/* FEATURES */
.lp-features { display: grid; gap: 16px; }
.lp-feature { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lp-feature-body { padding: 18px 20px; }
.lp-feature h3 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.lp-feature h3::before { content: '●'; color: var(--accent); font-size: 0.7em; margin-right: 6px; vertical-align: 0.15em; }
.lp-feature p { font-size: 0.86rem; color: var(--text-sub); line-height: 1.85; }

/* GALLERY (タップで拡大) */
.lp-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lp-gallery a { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; }
.lp-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.lp-gallery a:hover img { transform: scale(1.04); }
.lp-gallery .lp-missing { min-height: 0; height: 100%; font-size: 0.66rem; }
.lp-lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: none; place-items: center; padding: 16px;
  background: rgba(20,20,24,0.9); cursor: zoom-out;
}
.lp-lightbox.is-open { display: grid; }
.lp-lightbox img { max-height: 92vh; width: auto; border-radius: 6px; }

/* SPEC / STAFF */
.lp-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lp-table th, .lp-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lp-table tr:last-child th, .lp-table tr:last-child td { border-bottom: none; }
.lp-table th { width: 32%; font-weight: 700; color: var(--text-sub); white-space: nowrap; }

.lp-notes { margin-top: 16px; font-size: 0.74rem; color: var(--text-faint); line-height: 1.8; list-style: none; }
.lp-notes li::before { content: '※ '; }

/* 追従 CTA (スマホ向け。ほかの CTA が見えていない間だけ表示) */
.lp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; gap: 8px; justify-content: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.3s;
}
.lp-sticky.is-visible { transform: translateY(0); }
.lp-sticky .lp-btn { flex: 1 1 0; max-width: 260px; min-height: 46px; font-size: 0.88rem; padding: 8px 10px; box-shadow: 0 3px 0 rgba(0,0,0,0.12); }

/* FOOTER: レーベル表記はここに控えめに */
.lp-footer { padding: 36px 20px 110px; text-align: center; background: var(--bg); }
.lp-copyright { font-size: 0.72rem; color: var(--text-sub); margin-bottom: 14px; }
.lp-footer-links { display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; list-style: none; margin-bottom: 14px; }
.lp-footer-links a { color: var(--text-faint); text-decoration: none; font-size: 0.7rem; }
.lp-footer-links a:hover { color: var(--text-sub); }
.lp-footer-label { font-size: 0.64rem; letter-spacing: 0.12em; color: var(--text-faint); text-decoration: none; }

@media (min-width: 761px) {
  .lp-main { box-shadow: 0 0 40px rgba(40,30,20,0.06); }
  .lp-sticky { display: none; }
  .lp-footer { padding-bottom: 40px; }
  .lp-cta-buttons { flex-direction: row; max-width: 600px; }
  .lp-cta-buttons .lp-btn { flex: 1 1 0; }
}
@media (max-width: 480px) {
  .lp-char { grid-template-columns: 1fr; }
  .lp-char-img { aspect-ratio: 4 / 3; }
  .lp-char-body { padding: 0 18px 18px; }
  .lp-sticky .lp-btn { font-size: 0.8rem; white-space: nowrap; }
  .lp-sticky .lp-free, .lp-sticky .lp-btn-icon { display: none; }
}
