/* ============================================================
   SAM 販売ページ群 共通スタイル（lp.html / purchase.html / api-guide.html）
   世界観: あたたかい魔法の文房具屋 × ルナ（水色）
   ============================================================ */
:root {
  --bg: #faf7f2;            /* 温かいクリーム（真っ白にしない） */
  --surface: #fffdf9;
  --ink: #23283f;           /* インク紺（真っ黒にしない） */
  --muted: #6b7086;
  --accent: #5558d9;        /* SAM藍 = 行動（ボタン/リンク）だけに使う */
  --accent-deep: #4245c4;
  --luna: #cfeefb;          /* ルナ水色 = マーカーと飾りだけ */
  --luna-deep: #7cc9ee;
  --line: #e8e2d8;
  --pink: #f5d8e6;          /* 特典カードの差し色（面積小） */

  --font-display: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --font-body: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;

  --text-sm:  clamp(0.80rem, 0.75rem + 0.24vw, 0.94rem);
  --text-base: clamp(0.98rem, 0.91rem + 0.35vw, 1.15rem);
  --text-lg:  clamp(1.25rem, 1.11rem + 0.68vw, 1.6rem);
  --text-xl:  clamp(1.56rem, 1.36rem + 1.0vw, 2.2rem);
  --text-2xl: clamp(1.95rem, 1.64rem + 1.56vw, 2.9rem);
  --text-3xl: clamp(2.44rem, 1.97rem + 2.35vw, 3.9rem);

  --space-s: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
  --space-m: clamp(1.5rem, 1.4rem + 0.7vw, 1.9rem);
  --space-l: clamp(2rem, 1.8rem + 0.9vw, 2.5rem);
  --space-xl: clamp(3rem, 2.7rem + 1.3vw, 3.75rem);
  --space-2xl: clamp(4.5rem, 4rem + 2.2vw, 6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--luna); color: var(--ink); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.25; letter-spacing: 0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--luna-deep); outline-offset: 3px; border-radius: 4px; }

/* ---- 魔法の水彩背景（ヒーロー/ページ冒頭に色気を出す） ---- */
.hero, .page-head {
  background:
    radial-gradient(56rem 34rem at 88% -22%, rgba(124, 201, 238, 0.60), transparent 62%),
    radial-gradient(30rem 22rem at 6% -12%, rgba(196, 181, 253, 0.45), transparent 60%),
    radial-gradient(42rem 28rem at -14% 76%, rgba(243, 196, 220, 0.70), transparent 60%),
    radial-gradient(34rem 24rem at 74% 106%, rgba(255, 227, 150, 0.65), transparent 65%);
}

/* セクション用の淡色ティント（真っ白/クリーム一辺倒を避ける） */
.tint-sky { background: linear-gradient(180deg, #e9f5fd 0%, #f3eefb 100%); border-top: 1.5px solid #d8ecf8; border-bottom: 1.5px solid #e6dff3; }
.tint-warm { background: linear-gradient(180deg, #fdf3ec 0%, #fbeef5 100%); border-top: 1.5px solid #f5e3d5; border-bottom: 1.5px solid #f2ddea; }

/* ---- 蛍光マーカー（シグネチャー） ---- */
.mk {
  background: linear-gradient(transparent 58%, var(--luna) 58%, var(--luna) 92%, transparent 92%);
  padding: 0 0.08em;
  white-space: nowrap;
}

/* ---- レイアウト ---- */
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 36px); }
.sec { padding: var(--space-2xl) 0; }
.sec-tight { padding: var(--space-xl) 0; }

/* ---- ヘッダー ---- */
.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.brand img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--luna-deep); }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(12px, 2.5vw, 26px); }
.top-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--text-sm); position: relative; }
.top-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 3px;
  background: var(--luna-deep); border-radius: 3px; transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
@media (hover: hover) { .top-nav a:not(.btn):hover::after { transform: scaleX(1); } }
@media (max-width: 640px) { .top-nav .hide-sp { display: none; } }
@media (max-width: 640px) {
  .top-nav > a:not(.btn) { display: none; }
  h1, h2, h3, p, a, li, td, th, .pc-only-notice {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .mk { white-space: normal; }
}

/* ---- ボタン ---- */
.btn {
  display: inline-block; text-decoration: none; text-align: center; cursor: pointer;
  font-family: var(--font-display); font-weight: 900; font-size: var(--text-base);
  padding: 0.95em 2em; border-radius: 999px; border: 2.5px solid var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 0 var(--accent-deep); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: 0 6px 0 var(--ink); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-3px); }
  .btn-primary:hover { box-shadow: 0 9px 0 var(--accent-deep); }
  .btn-ghost:hover { box-shadow: 0 9px 0 var(--ink); background: var(--surface); }
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-deep); }
.btn-ghost:active { box-shadow: 0 2px 0 var(--ink); }
.btn-s { font-size: var(--text-sm); padding: 0.7em 1.5em; box-shadow: 0 4px 0 var(--accent-deep); }

/* 購入前に、対応環境を見落とさないための案内 */
.pc-only-notice {
  margin: 0 0 var(--space-m);
  padding: 14px 16px;
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  border-radius: 14px;
  color: #3730a3;
  line-height: 1.75;
}
.pc-only-notice strong { font-weight: 900; }

/* ---- 小見出しラベル ---- */
.kicker {
  display: inline-block; font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.16em;
  color: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; padding: 3px 16px; margin-bottom: var(--space-s);
}

/* ---- カード ---- */
.card {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px;
  padding: var(--space-m);
}

/* ---- ステップ（数字ドット） ---- */
.step { display: flex; gap: 18px; align-items: flex-start; }
.step + .step { margin-top: var(--space-m); }
.step-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 900; font-size: 1.15rem;
  display: grid; place-items: center;
}
.step h3 { font-size: var(--text-lg); margin-bottom: 4px; }
.step p { color: var(--muted); font-size: var(--text-sm); line-height: 1.9; }

/* ---- FAQ ---- */
details.faq { border-bottom: 1.5px solid var(--line); padding: var(--space-s) 4px; }
details.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 700; font-size: var(--text-base);
  display: flex; align-items: baseline; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "Q"; color: var(--accent); font-weight: 900; flex: none; }
details.faq[open] summary { margin-bottom: 8px; }
details.faq p { color: var(--muted); font-size: var(--text-sm); padding-left: 26px; }

/* ---- 料金カード ---- */
.price-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: var(--space-s); align-items: stretch; }
@media (max-width: 800px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; gap: 10px; position: relative; }
.price-card .plan { font-family: var(--font-display); font-weight: 900; font-size: var(--text-lg); }
.price-card .yen { font-family: var(--font-display); font-weight: 900; font-size: var(--text-2xl); line-height: 1.1; }
.price-card .yen small { font-size: 0.45em; font-weight: 700; color: var(--muted); }
.price-card ul { list-style: none; color: var(--muted); font-size: var(--text-sm); display: grid; gap: 6px; }
.price-card ul li::before { content: "◎ "; color: var(--luna-deep); font-weight: 900; }
.price-hero { border: 2.5px solid var(--accent); box-shadow: 0 10px 0 rgba(85, 88, 217, 0.18); }
.price-tag {
  position: absolute; top: -16px; left: 22px; background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 900; font-size: 0.8rem;
  padding: 4px 16px; border-radius: 999px;
}
.price-sp { background: linear-gradient(160deg, var(--surface) 55%, var(--pink)); }
.price-card .btn { margin-top: auto; }

/* ---- フッター ---- */
.foot { border-top: 1.5px solid var(--line); padding: var(--space-xl) 0; margin-top: var(--space-2xl); }
.foot-in { display: flex; flex-wrap: wrap; gap: var(--space-m); align-items: center; justify-content: space-between; }
.foot small { color: var(--muted); font-size: 0.78rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { font-size: var(--text-sm); color: var(--muted); text-decoration: none; font-weight: 700; }
@media (hover: hover) { .foot nav a:hover { color: var(--accent); } }

/* ---- 出現アニメ ---- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
  .rise.in { opacity: 1; transform: none; }
}
