/*
 * トップページ（src/pages/index.astro）の CSS。
 * もとは index.astro の <style is:global is:inline> にあった。public/_headers の CSP で
 * インラインの style を許さない（'unsafe-inline' もハッシュも使わない）ため、外のファイルにした。
 * HTML の style 属性も CSP で止まるので、見た目の値は下の「もと style 属性」のクラスに書く。
 */
:root {
  --bg: #12101f;
  --bg2: #181530;
  --card: #1e1a36;
  --line: #322c52;
  --text: #ece9f6;
  --sub: #aaa5c4;
  --gold: #e9b94e;
  --gold2: #f6d488;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
.serif {
  font-family: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}
section {
  padding: 72px 0;
}

/* ヒーロー（モバイルはCTAがファーストビューに入るよう圧縮 — Quabit実測: iOS CVR 3.3倍の主因） */
.hero {
  position: relative;
  padding: 28px 0 56px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, #2a2350 0%, var(--bg) 65%);
}
.hero .wrap {
  position: relative;
}
.brand {
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
/* アプリのタイトルロゴ（apps/mobile assets/images/brand/title-gold.png と同一アセット。2026-07-15 オーナー指示） */
.brand-logo {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
}
.badge {
  display: inline-block;
  font-size: 12.5px;
  color: var(--gold2);
  border: 1px solid rgba(233, 185, 78, 0.45);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: 27px;
  line-height: 1.5;
  font-weight: 800;
  margin-bottom: 12px;
}
.hero .lead {
  color: var(--sub);
  font-size: 14.5px;
  margin-bottom: 18px;
}
.hero-img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  margin: 30px 0 8px;
}
.imgnote {
  font-size: 12px;
  color: var(--sub);
  text-align: right;
}

/* CTA */
.cta {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: #241c05;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(233, 185, 78, 0.35);
}
.cta:active {
  transform: translateY(1px);
}
.cta-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 10px;
}

h2 {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.6;
  margin-bottom: 14px;
}
.sec-lead {
  color: var(--sub);
  font-size: 15px;
  margin-bottom: 28px;
}
.alt {
  background: var(--bg2);
}

/* Before/After */
.diary-note {
  background: #f4efe2;
  color: #3a3428;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.diary-note .label {
  font-size: 12px;
  color: #8d8471;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.arrow {
  text-align: center;
  font-size: 26px;
  color: var(--gold);
  margin: 18px 0;
}
.after-img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

/* 仕組み */
.step {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
  align-items: flex-start;
}
.step-num {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  font-family: "Shippori Mincho B1", serif;
}
.step h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.step p {
  color: var(--sub);
  font-size: 14.5px;
}

/* ギャラリー */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.g-item .g-img {
  border-radius: 12px;
  border: 1px solid var(--line);
}
.g-item .g-cap {
  font-size: 13.5px;
  color: var(--sub);
  margin-top: 10px;
}
.g-item .g-cap b {
  color: var(--text);
  font-weight: 600;
}

/* スキル（アプリUI風モック） */
.skill-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.skill-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #262146;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.skill-row.max {
  border: 1px solid var(--gold);
}
.skill-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
}
.skill-name {
  font-size: 14.5px;
  flex: 0 0 4.5em;
}
.skill-bar {
  flex: 1;
  height: 8px;
  background: #171331;
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
}
.skill-lv {
  font-size: 13px;
  color: var(--sub);
  flex: 0 0 3.2em;
  text-align: right;
}
.skill-row.max .skill-lv {
  color: var(--gold);
  font-weight: 700;
}

/* なかま */
.party {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.p-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.p-card img {
  width: 72%;
  margin: 0 auto 8px;
}
.p-card .p-name {
  font-size: 15px;
  font-weight: 700;
}
.p-card .p-cls {
  font-size: 12.5px;
  color: var(--sub);
}
.p-card .p-bond {
  font-size: 12.5px;
  color: #e786a8;
  margin-top: 2px;
}

/* キャラクリ */
.cc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.cc-card {
  text-align: center;
}
.cc-card img {
  width: 88%;
  margin: 0 auto 6px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}
.cc-card p {
  font-size: 13.5px;
  color: var(--sub);
}
.cc-note {
  font-size: 13px;
  color: var(--sub);
  margin-top: 18px;
  text-align: center;
}

/* 1年後（冒険日誌） */
.book {
  background: linear-gradient(160deg, #241d3e, #1a1530);
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  padding: 28px 24px;
  margin-top: 28px;
  text-align: center;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(233, 185, 78, 0.06);
}
.book .book-title {
  font-family: "Shippori Mincho B1", serif;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}
.book .book-stats {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}
.book .bs {
  min-width: 80px;
}
.book .bs b {
  display: block;
  font-family: "Shippori Mincho B1", serif;
  font-size: 26px;
  color: var(--text);
}
.book .bs span {
  font-size: 12.5px;
  color: var(--sub);
}
.ur-line {
  margin-top: 24px;
  font-size: 15px;
  line-height: 2;
}
.ur-line b {
  color: var(--gold2);
}

/* 哲学 */
.creed {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 18px;
  margin-bottom: 20px;
}
.creed h3 {
  font-size: 16.5px;
  margin-bottom: 3px;
}
.creed p {
  font-size: 14px;
  color: var(--sub);
}

/* App Store へのリンク（#959 段 2 で事前登録のフォームから替えた） */
.register {
  text-align: center;
}
.register h2 {
  margin-bottom: 8px;
}
.store-cta {
  margin-top: 24px;
}
.store-cta .cta-note a {
  color: var(--gold);
}

/* スティッキーCTA（App Store へのリンクが画面外のときだけ表示 — Quabit実測で下部フォーム利用増に寄与） */
#sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(18, 16, 31, 0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
#sticky-cta .cta {
  font-size: 15px;
  padding: 12px 20px;
  box-shadow: none;
  max-width: 480px;
  margin: 0 auto;
}

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  text-align: center;
}
footer,
footer a {
  color: var(--sub);
  font-size: 13px;
}
footer a {
  text-decoration: underline;
}
footer .fbrand {
  font-family: "Shippori Mincho B1", serif;
  color: var(--gold);
  letter-spacing: 0.2em;
  font-size: 15px;
  margin-bottom: 10px;
}

@media (min-width: 720px) {
  .wrap {
    max-width: 720px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .brand-logo {
    height: 52px;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
  }
  .hero-img {
    margin-top: 0;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
  .party {
    grid-template-columns: repeat(4, 1fr);
  }
  /* #959 段 2: 下の節の App Store へのリンクが横長の帯にならないように幅を抑える */
  .register .cta {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* もと style 属性（CSP で止まるのでクラスにした。値は前と同じ） */
.ba-lead {
  text-align: center;
  color: var(--sub);
  font-size: 14px;
  margin-bottom: 18px;
}
/* ヒーローが p3 のときに lp.js が外して見せる（g-party） */
.is-hidden {
  display: none;
}
.sd-fishing {
  background: #7ec8e3;
}
.sb-fishing {
  width: 100%;
  background: #e9b94e;
}
.sd-cooking {
  background: #e8956d;
}
.sb-cooking {
  width: 70%;
  background: #e8956d;
}
.sd-talk {
  background: #a98fe0;
}
.sb-talk {
  width: 60%;
  background: #a98fe0;
}
.sd-walk {
  background: #7fce8f;
}
.sb-walk {
  width: 50%;
  background: #7fce8f;
}
.sd-reading {
  background: #e3c86d;
}
.sb-reading {
  width: 40%;
  background: #e3c86d;
}
.mt-8 {
  margin-top: 8px;
}
.mt-10 {
  margin-top: 10px;
}
.mt-22 {
  margin-top: 22px;
}
.mt-28 {
  margin-top: 28px;
}
.mt-56 {
  margin-top: 56px;
}
.fs-11 {
  font-size: 11px;
}
.fs-15 {
  font-size: 15px;
}
