/* ==========================================
   AIで、こんなことができます（ai.html）
   style.css の共通部品に追加して読み込む
   ========================================== */
main { word-break: auto-phrase; }

/* ---------- 1. ファーストビュー ---------- */
.ai-hero {
  padding: calc(var(--header-h) + 32px) 20px 56px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 210, 63, .45) 0 110px, transparent 111px),
    radial-gradient(circle at 4% 70%, rgba(74, 63, 201, .08) 0 140px, transparent 141px),
    linear-gradient(180deg, #fff3cf, var(--bg));
  text-align: center;
}
.ai-hero__inner { max-width: 760px; margin: 0 auto; }
.ai-hero__title { font-size: 1.9rem; letter-spacing: .02em; line-height: 1.45; }
.ai-hero__chara { display: block; width: 150px; margin: 20px auto 8px; }
.ai-hero__lead {
  font-family: "M PLUS Rounded 1c", sans-serif; font-weight: 800;
  font-size: 1.1rem; color: var(--tomato-dark);
}
.ai-hero__sub { margin-top: 8px; font-size: .98rem; }
.ai-hero__btn { display: block; width: 100%; max-width: 380px; margin: 28px auto 0; }

/* ---------- 2. お悩み ---------- */
.ai-worries { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-worries li {
  position: relative;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 14px 50px;
  font-weight: 700; font-size: .97rem;
}
.ai-worries li::before {
  content: "";
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--tomato-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 4v5M8 11.5v.5' fill='none' stroke='%23e8432e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* ---------- 3. できること ---------- */
.ai-cats { display: grid; gap: 16px; }
.ai-cat {
  background: #fff;
  border: 3px solid var(--berry-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
}
.ai-cat__icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; padding: 13px; border-radius: 50%;
  background: var(--berry-light); color: var(--berry);
  margin-bottom: 8px;
}
.ai-cat__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-cat__name { font-size: 1.15rem; color: var(--berry); margin-bottom: 6px; }
.ai-cat__list { list-style: none; margin: 0; padding: 0; }
.ai-cat__list li {
  position: relative;
  padding: 5px 0 5px 26px;
  font-size: .95rem;
}
.ai-cat__list li::before {
  content: "";
  position: absolute; left: 2px; top: 12px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--berry-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%234a3fc9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* ---------- 4. 人がやった方がいいこと ---------- */
.ai-human { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-human li {
  position: relative;
  background: #fff;
  border: 2px solid var(--tomato);
  border-radius: var(--radius);
  padding: 14px 16px 14px 50px;
  font-weight: 700; font-size: .97rem;
}
.ai-human li::before {
  content: "";
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--tomato) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5.5' r='2.3' fill='%23fff'/%3E%3Cpath d='M3.8 13a4.2 4.2 0 0 1 8.4 0z' fill='%23fff'/%3E%3C/svg%3E") center/100% no-repeat;
}
.ai-talk { margin-top: 32px; }
.ai-talk img { width: 84px; }
.talk__bubble--tomato { --c: var(--tomato); }
.ai-talk .talk__bubble strong { color: var(--tomato-dark); }

/* ---------- 5. 流れ ---------- */
.ai-flow h3 { margin-bottom: 0; }

/* ---------- 6. 安心のために ---------- */
.ai-promise {
  list-style: none; margin: 0; padding: 22px 20px;
  background: #fff;
  border: 3px solid var(--lemon);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ai-promise li {
  position: relative;
  padding: 8px 0 8px 30px;
  font-size: .95rem;
}
.ai-promise li + li { border-top: 1px dashed var(--line); }
.ai-promise li::before {
  content: "";
  position: absolute; left: 2px; top: 15px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--tomato-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23e8432e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}
.ai-promise a { font-weight: 700; }

/* ---------- 7. 最後のご案内 ---------- */
.ai-final {
  background: var(--tomato);
  color: #fff;
  text-align: center;
  padding: 64px 0 24px;
}
.ai-final__title { font-size: 1.6rem; }
.ai-final__text { margin-top: 14px; font-size: 1rem; }
.ai-final__cta { margin-top: 32px; }
.ai-final__cta img { display: block; width: 110px; margin: 0 auto -6px; position: relative; }
.ai-final__btn {
  display: block; width: 100%; max-width: 380px; margin: 0 auto;
  background: #fff; color: var(--tomato-dark);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .2);
}
.ai-final__btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.ai-final__links { margin-top: 20px; font-size: .88rem; font-weight: 700; }
.ai-final__links a { color: #fff; }
.ai-final + .footer { margin-top: 0; padding-top: 70px; }

/* ---------- 追従ボタン（第二部と同じ） ---------- */
.fixed-cta {
  left: 50%; right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 360px;
  transform: translateX(-50%);
}
.fixed-cta.is-hidden { opacity: 0; transform: translate(-50%, 24px); pointer-events: none; }
@media (max-width: 767px) {
  .footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 表示アニメーション ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================
   タブレット・PC
   ========================================== */
@media (min-width: 768px) {
  .ai-hero { padding: calc(var(--header-h) + 56px) 20px 80px; }
  .ai-hero__title { font-size: 2.5rem; }
  .ai-hero__chara { width: 190px; }
  .ai-hero__lead { font-size: 1.3rem; }
  .ai-hero__sub { font-size: 1.05rem; }
  .ai-worries li, .ai-human li { font-size: 1.02rem; }
  .ai-talk img { width: 140px; }
  .ai-cats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .ai-cat { padding: 24px 26px 22px; }
  .ai-promise { padding: 26px 32px; }
  .ai-promise li { font-size: 1rem; }
  .ai-final { padding: 88px 0 32px; }
  .ai-final__title { font-size: 2rem; }
  .ai-final__text { font-size: 1.05rem; }
}
@media (min-width: 960px) {
  .ai-flow { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1000px) {
  .ai-cats { grid-template-columns: repeat(6, 1fr); }
  .ai-cat { grid-column: span 2; }
  .ai-cat:nth-child(4) { grid-column: 2 / span 2; }
}
