/* Piqsy トップページ(index.html)だけで使う。規約などのページは style.css */
:root {
  --cream: #F2E8D6;      /* アプリの背景と同じ色。画面の画像と境目が出ない */
  --paper: #FBF5EA;
  --ink: #4D3324;        /* アプリの文字の茶色 */
  --ink-soft: #7C6454;
  --honey: #E9B949;
  --mint: #CFE8D6;
  --pink: #F7CFC6;
  --lilac: #E3D8F3;
  --butter: #FBE7B2;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  font-feature-settings: "palt";
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--round); font-weight: 900; line-height: 1.35; margin: 0; letter-spacing: 0.02em; text-wrap: balance; word-break: auto-phrase; }
p { word-break: auto-phrase; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 上のバー ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--round); font-weight: 900; font-size: 22px; }
.brand img { border-radius: 10px; }
.bar-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.bar-links a { text-decoration: none; color: var(--ink-soft); }
.bar-links a:hover { color: var(--ink); }

/* ---------- App Store のボタン ---------- */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font-family: var(--round); font-weight: 700; font-size: 18px;
  text-decoration: none;
  box-shadow: 0 10px 0 -2px #2f1f15, 0 18px 30px -10px rgb(77 51 36 / 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store svg { width: 22px; height: 22px; }
.store:hover { transform: translateY(-2px); }
.store:active { transform: translateY(6px); box-shadow: 0 4px 0 -2px #2f1f15, 0 8px 16px -8px rgb(77 51 36 / 0.5); }
.store.small { padding: 9px 18px; font-size: 14px; box-shadow: none; }
.store.small:active { transform: none; }
.fine { font-size: 13px; color: var(--ink-soft); margin-top: 14px; }

/* ---------- いちばん上 ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 24px;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 40px) clamp(48px, 8vw, 110px);
}
.hero-bg {
  position: absolute; top: -80px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  background: url("/assets/hero-bg.webp") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, #000 70%, transparent);
  opacity: 0.9;
}
.hero-kicker {
  display: inline-block;
  padding: 6px 18px; border-radius: 999px;
  background: rgb(255 255 255 / 0.85);
  font-family: var(--round); font-weight: 700; font-size: 15px; color: var(--ink-soft);
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 4.6vw, 60px); line-height: 1.3; margin-bottom: 24px; }
.nw { white-space: nowrap; }
.lead { font-size: clamp(16px, 1.6vw, 19px); max-width: 30em; margin-bottom: 34px; }

.hero-scene { position: relative; aspect-ratio: 1 / 1; }
.hero-scene img { position: absolute; filter: drop-shadow(0 30px 30px rgb(77 51 36 / 0.22)); }
.scene-room { width: 64%; left: 0; top: 0; }
.scene-garden { width: 60%; right: 0; bottom: -4%; }
.path { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; pointer-events: none; }
.path path {
  fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 2 16; opacity: 0.55;
}
/* 足あとの点線が、部屋から庭へ歩いていく(ページを開いたときに 1 回だけ) */
@media (prefers-reduced-motion: no-preference) {
  .path path { stroke-dasharray: 2 16; animation: walk 2.4s ease-out 0.4s both; }
  @keyframes walk { from { stroke-dashoffset: 700; opacity: 0; } 15% { opacity: 0.55; } to { stroke-dashoffset: 0; } }
  .scene-room { animation: float 7s ease-in-out infinite; }
  .scene-garden { animation: float 7s ease-in-out -3.5s infinite; }
  @keyframes float { 50% { transform: translateY(-10px); } }
}

/* ---------- キャラ(アプリと同じ動き。押すと笑う) ---------- */
.hero-visual { position: relative; }
.hero-charas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-charas .chara { position: absolute; pointer-events: auto; }
.c-a { width: 26%; left: -2%; bottom: 2%; }
.c-b { width: 21%; left: 36%; bottom: -6%; }
.c-c { width: 19%; right: -2%; top: 0; }

.chara {
  position: relative; display: inline-block;
  padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  --d: 0s;
}
.chara::before { /* 足もとの影 */
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 3%; height: 7%;
  border-radius: 50%; background: rgb(77 51 36 / 0.16); filter: blur(3px);
}
.chara-body { position: relative; display: block; transform-origin: 50% 92%; }
.chara-body img { width: 100%; height: auto; }
.chara-body .blink, .chara-body .smile { position: absolute; inset: 0; opacity: 0; }
/* ひとこと(押したとき) */
.chara::after {
  content: attr(data-say);
  position: absolute; left: 50%; bottom: 96%;
  transform: translate(-50%, 6px) scale(0.9);
  padding: 6px 14px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-family: var(--round); font-weight: 700; font-size: 14px; white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgb(77 51 36 / 0.35);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chara.happy::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
.chara.happy .smile { opacity: 1; }
.chara.happy .blink { visibility: hidden; }

@media (prefers-reduced-motion: no-preference) {
  /* ゆらぎ: 左右にゆらゆら、ふわっと浮く */
  .yuragi .chara-body { animation: sway 4.5s ease-in-out var(--d) infinite; }
  @keyframes sway {
    0%, 100% { transform: translateY(-2%) rotate(-5deg); }
    25% { transform: translateY(-5%) rotate(0deg); }
    50% { transform: translateY(-2%) rotate(5deg); }
    75% { transform: translateY(-5%) rotate(0deg); }
  }
  /* はねもふ: 2.4 秒ごとに小さく跳ねる(跳ぶ前に縮み、着地でつぶれる) */
  .hanemofu .chara-body { animation: hop 2.4s linear var(--d) infinite; }
  @keyframes hop {
    0% { transform: none; }
    6% { transform: scale(1.05, 0.93); }
    12% { transform: none; }
    27% { transform: translateY(-9%) scale(0.97, 1.04); }
    42% { transform: none; }
    47% { transform: scale(1.05, 0.94); }
    52%, 100% { transform: none; }
  }
  /* りすけ: ゆっくり息をして、ときどき首をかしげる */
  .risuke .chara-body { animation: breathe 2.9s ease-in-out var(--d) infinite, tilt 7.8s ease-in-out var(--d) infinite; }
  @keyframes breathe { 50% { scale: 0.985 1.025; } }
  @keyframes tilt { 25% { rotate: 2.5deg; } 75% { rotate: -2.5deg; } }
  /* まばたき(キャラごとに少しずらした間隔で、一瞬だけ目を閉じる) */
  .chara-body .blink { animation: blink 3.7s steps(1) var(--d) infinite; }
  .yuragi .chara-body .blink { animation-duration: 3.2s; }
  .hanemofu .chara-body .blink { animation-duration: 4.3s; }
  @keyframes blink { 0% { opacity: 1; } 4% { opacity: 0; } 100% { opacity: 0; } }
  /* 押したとき: ぴょんと跳ねる */
  .chara.happy .chara-body { animation: joy 0.6s cubic-bezier(.3, .7, .4, 1); }
  @keyframes joy {
    0% { transform: scale(1.08, 0.9); }
    40% { transform: translateY(-16%) scale(0.95, 1.06); }
    75% { transform: scale(1.04, 0.95); }
    100% { transform: none; }
  }
}
.chara:focus-visible { outline-offset: -4px; border-radius: 24px; }

.lineup { gap: 0; align-items: flex-end; }
.lineup .chara { width: 33%; max-width: 190px; }
.lineup .chara:nth-child(2) { margin-bottom: 8%; }
.hint { font-size: 14px; color: var(--ink-soft); }

.parade { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 1vw, 12px); margin: 0 auto 20px; max-width: 720px; }
.parade .chara { width: clamp(64px, 14vw, 116px); }

/* ---------- 共通の区切り ---------- */
main > section { padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 40px); }
main > section > h2 { font-size: clamp(28px, 4vw, 44px); text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }

/* ---------- 遊び方 ---------- */
.how { background: var(--paper); border-radius: 56px 56px 0 0; }
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.steps li { text-align: center; }
.step-no {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin: 0 auto 18px;
  border-radius: 50%;
  font-family: var(--round); font-weight: 900; font-size: 38px;
}
.steps li:nth-child(1) .step-no { background: var(--pink); }
.steps li:nth-child(2) .step-no { background: var(--mint); }
.steps li:nth-child(3) .step-no { background: var(--lilac); }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--ink-soft); font-size: 16px; max-width: 20em; margin: 0 auto; }

/* ---------- 機能の紹介 ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 6vw, 96px);
  max-width: 1080px; margin: 0 auto;
}
.feature.flip .feature-media { order: 2; }
.feature-text h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 20px; }
.feature-text p + p { margin-top: 14px; }
.feature-text p { max-width: 26em; }
.feature-media { display: flex; justify-content: center; }
.feature-media > img { width: min(100%, 460px); filter: drop-shadow(0 26px 26px rgb(77 51 36 / 0.18)); }
/* 画面の画像は iPhone の形に */
.phone > img {
  width: min(78%, 300px);
  border-radius: 44px;
  border: 10px solid #2b1d14;
  background: #2b1d14;
  box-shadow: 0 30px 50px -18px rgb(77 51 36 / 0.45);
  filter: none;
}
.feature:nth-of-type(odd) .phone { background: radial-gradient(closest-side, var(--butter), transparent); }
.feature:nth-of-type(even) .phone { background: radial-gradient(closest-side, var(--mint), transparent); }

/* ---------- 画面の一覧(横に流す) ---------- */
.gallery { padding-left: 0 !important; padding-right: 0 !important; background: var(--paper); }
.strip {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px clamp(16px, 4vw, 40px) 24px;
  scrollbar-width: thin;
}
.strip img { flex: 0 0 auto; width: clamp(200px, 22vw, 260px); border-radius: 24px; scroll-snap-align: center; box-shadow: 0 16px 30px -16px rgb(77 51 36 / 0.4); }

/* ---------- 安心 ---------- */
.safety ul { list-style: none; padding: 0; margin: 0 auto; max-width: 1080px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.safety li { padding-top: 22px; border-top: 3px dotted rgb(77 51 36 / 0.35); }
.safety h3 { font-size: 20px; margin-bottom: 8px; }
.safety p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Plus+ ---------- */
.plus {
  max-width: 880px; margin: 0 auto;
  background: linear-gradient(135deg, var(--butter), var(--pink) 55%, var(--lilac));
  border-radius: 48px;
  text-align: center;
}
main > section.plus { margin-bottom: clamp(24px, 5vw, 60px); padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 64px); }
.plus-head h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 10px; }
.plus-head p { margin-bottom: 28px; }
.plus table { width: 100%; max-width: 560px; margin: 0 auto; border-collapse: separate; border-spacing: 0; background: rgb(255 255 255 / 0.75); border-radius: 24px; overflow: hidden; }
.plus th, .plus td { padding: 14px 16px; font-size: 16px; }
.plus thead th { font-family: var(--round); font-weight: 900; font-size: 17px; }
.plus thead th:last-child { color: #9A5A12; }
.plus tbody th { text-align: left; font-weight: 600; }
.plus tbody tr + tr > * { border-top: 1px solid rgb(77 51 36 / 0.1); }
.plus tbody td:last-child { font-weight: 700; }

/* ---------- よくある質問 ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 2px solid rgb(77 51 36 / 0.12); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px;
  font-family: var(--round); font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 24px; color: var(--ink-soft); }

/* ---------- 最後 ---------- */
.end { text-align: center; background: var(--paper); border-radius: 56px 56px 0 0; }
main > section.end > h2 { margin-bottom: 32px; }

.foot { background: var(--paper); padding: 0 16px 40px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 28px 0 16px; border-top: 1px solid rgb(77 51 36 / 0.12); max-width: 820px; margin: 0 auto; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- スマホ ---------- */
@media (max-width: 820px) {
  .bar-links { display: none; }
  .store.small { margin-left: auto; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-visual { max-width: 480px; width: 100%; margin: 8px auto 0; }
  .steps, .safety ul { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; text-align: center; }
  .feature.flip .feature-media { order: 0; }
  .feature-text p { margin-left: auto; margin-right: auto; }
  .safety li { text-align: center; }
}
@media (max-width: 420px) {
  .store { padding: 15px 22px; font-size: 16px; }
  .brand span { display: none; }
}
