/* iPhoneまもるくん ガイド記事 共通スタイル
   デザイントークン・ナビ・ボタン・フッターは index.html のものをそのまま再利用している。 */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --accent: #0d9488;
  --accent-2: #0f766e;
  --accent-soft: #e6f5f3;
  --radius-l: 28px;
  --radius-m: 18px;
  --nav-h: 52px;
  --ease: cubic-bezier(.22,.61,.36,1);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro JP", "Hiragino Sans", "Yu Gothic UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--accent); }
.svg-sprite { position: absolute; width: 0; height: 0; }

/* ───────── Nav (index.html と同じ) ───────── */
body > nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 100%; max-width: 1024px; margin: 0 auto; padding: 0 22px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 22px; height: 22px; color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: .82rem; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-cta {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-size: .78rem; font-weight: 600; padding: 7px 16px; border-radius: 999px;
  text-decoration: none; transition: background .2s;
}
.nav-cta:hover { background: var(--accent-2); }
.lang-toggle {
  background: none; border: 1px solid rgba(0,0,0,.15); color: var(--ink-2); text-decoration: none;
  font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.lang-toggle:hover { border-color: var(--ink-2); color: var(--ink); }
.nav-links + .lang-toggle { margin-left: 0; }
.brand, .nav-cta, .lang-toggle { white-space: nowrap; flex: none; }
@media (max-width: 680px) { .nav-links { display: none; } .brand { margin-right: auto; } }
@media (max-width: 480px) {
  .nav-inner { gap: 10px; padding: 0 14px; }
  .brand { font-size: .88rem; }
  .nav-cta { padding: 7px 13px; }
  .lang-toggle { padding: 6px 10px; }
}

/* ───────── パンくず ───────── */
.bc { max-width: 760px; margin: 0 auto; padding: 18px 20px 0; }
.bc ol { list-style: none; display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; font-size: .8rem; color: var(--ink-3); }
.bc li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bc li + li::before { content: ""; width: 5px; height: 5px; border-top: 1.5px solid var(--ink-3); border-right: 1.5px solid var(--ink-3); transform: rotate(45deg); flex: none; margin-right: 2px; }
.bc a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.bc a:hover { color: var(--accent); }
.bc [aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ───────── 記事 ───────── */
.post { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.post-head { padding: clamp(28px, 5vw, 48px) 0 8px; }
.post-tag {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--accent); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px; letter-spacing: .02em; text-decoration: none;
}
.post-head h1 {
  margin-top: 16px; font-size: clamp(1.7rem, 5.4vw, 2.6rem); font-weight: 800;
  letter-spacing: -.015em; line-height: 1.3; text-wrap: balance;
}
.post-meta { margin-top: 14px; font-size: .84rem; color: var(--ink-3); }
.post-body { padding-top: 8px; }
.post-body > p {
  margin-top: 20px; font-size: 1.0625rem; line-height: 1.95; color: #2b2b2e; text-wrap: pretty;
}
html[lang="en"] .post-body > p { line-height: 1.75; }
.post-body > p strong { color: var(--ink); }
.post-body h2 {
  position: relative; margin-top: clamp(44px, 7vw, 64px); padding-left: 16px;
  font-size: clamp(1.3rem, 3.8vw, 1.65rem); font-weight: 800; letter-spacing: -.01em; line-height: 1.4; text-wrap: balance;
}
.post-body h2::before {
  content: ""; position: absolute; left: 0; top: .22em; bottom: .22em; width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, #2dd4bf, var(--accent));
}
.post-body h3 { margin-top: 28px; font-size: 1.12rem; font-weight: 700; line-height: 1.5; }
.post-body h3 + p { margin-top: 8px; font-size: 1.0625rem; line-height: 1.9; color: #2b2b2e; }
html[lang="en"] .post-body h3 + p { line-height: 1.75; }
.post-body ul:not(.app-list) { margin: 20px 0 0 1.3em; display: grid; gap: 10px; font-size: 1.0625rem; line-height: 1.8; color: #2b2b2e; }
.src { margin-top: 14px; font-size: .84rem; color: var(--ink-3); }
.src a { color: var(--ink-2); text-underline-offset: 3px; }
.src a:hover { color: var(--accent); }

/* 図 */
.post-fig { margin: 28px 0 0; }
.post-fig img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  box-shadow: 0 10px 34px rgba(0,0,0,.10); background: var(--bg-2);
}
.post-head + .post-body > .post-fig:first-child { margin-top: 24px; }

/* アプリ紹介カード */
.app-card {
  margin-top: 28px; padding: 24px 24px 22px; background: #fff;
  border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-m); box-shadow: 0 6px 26px rgba(0,0,0,.05);
}
.app-card h3 { margin: 0 0 14px; font-size: 1.05rem; font-weight: 800; }
.app-list { list-style: none; display: grid; gap: 11px; }
.app-list li {
  position: relative; padding-left: 28px; font-size: .98rem; line-height: 1.7; color: #2b2b2e;
}
.app-list li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat;
}
.app-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.07); font-size: .84rem; color: var(--ink-3); }

/* CTA */
.cta-box {
  margin-top: 36px; padding: clamp(26px, 5vw, 36px) 22px; text-align: center;
  background: linear-gradient(135deg, #e6f5f3 0%, #f2fbf9 100%);
  border: 1px solid rgba(13,148,136,.18); border-radius: var(--radius-l);
}
.cta-title { font-size: clamp(1.15rem, 3.8vw, 1.45rem); font-weight: 800; line-height: 1.45; letter-spacing: -.01em; text-wrap: balance; }
.cta-sub { margin-top: 6px; font-size: .98rem; color: var(--ink-2); }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 16px; transition: transform .25s var(--ease), background .2s;
  max-width: 100%;
}
.cta-btn:hover { transform: scale(1.03); background: #000; }
.cta-btn svg { width: 24px; height: 24px; flex: none; }
.cta-price { margin-top: 12px; font-size: .82rem; color: var(--ink-3); }

/* よくある質問(本文として掲載) */
.faq { margin-top: clamp(44px, 7vw, 64px); }
.faq h2 { margin-top: 0; }
.faq h3 { margin-top: 24px; }

/* 免責 */
.disclaimer {
  margin-top: 48px; padding: 16px 18px; background: var(--bg-2); border-radius: 14px;
  font-size: .8rem; line-height: 1.7; color: var(--ink-3);
}

/* ───────── カード(関連記事・一覧) ───────── */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-m); overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.06); text-decoration: none; color: inherit;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.guide-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,.09); }
.guide-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-2); }
.guide-card .gc-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.guide-card .gc-title { font-size: 1rem; font-weight: 700; line-height: 1.5; letter-spacing: -.005em; }
.guide-card .gc-desc { margin-top: 8px; font-size: .86rem; line-height: 1.65; color: var(--ink-2); }
.guide-card .gc-more { margin-top: auto; padding-top: 14px; font-size: .84rem; font-weight: 700; color: var(--accent); }

/* 関連記事 */
.related { max-width: 1024px; margin: clamp(56px, 8vw, 88px) auto 0; padding: 0 20px; }
.related h2 { font-size: clamp(1.3rem, 3.6vw, 1.65rem); font-weight: 800; text-align: center; margin-bottom: 22px; }
.related .guide-grid { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
.related-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.related-links a {
  display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 999px; font-size: .9rem; font-weight: 600;
  text-decoration: none; background: var(--bg-2); color: var(--ink); transition: background .2s;
}
.related-links a:hover { background: #e8e8ed; }
.related-links a.primary { background: var(--accent); color: #fff; }
.related-links a.primary:hover { background: var(--accent-2); }

/* ガイド一覧ページ */
.index-hero { max-width: 760px; margin: 0 auto; padding: clamp(36px, 6vw, 64px) 20px 8px; text-align: center; }
.index-hero h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.index-hero p { margin: 16px auto 0; max-width: 620px; font-size: 1.0625rem; line-height: 1.85; color: var(--ink-2); text-wrap: pretty; }
.index-list { max-width: 1024px; margin: clamp(32px, 5vw, 52px) auto 0; padding: 0 20px; }

/* ───────── Footer (index.html と同じ) ───────── */
footer { margin-top: clamp(64px, 9vw, 104px); padding: 36px 22px calc(36px + env(safe-area-inset-bottom)); text-align: center; font-size: .78rem; color: var(--ink-3); background: var(--bg-2); }
footer .f-links { margin-bottom: 8px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .guide-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .related .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .post, .bc, .related, .index-hero, .index-list { padding-left: 16px; padding-right: 16px; }
  .post-fig img { border-radius: 18px; }
  .app-card { padding: 20px 18px 18px; }
  .cta-btn { width: 100%; padding: 14px 18px; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* 日本語を文節単位で改行(対応ブラウザのみ。非対応でも通常表示) */
:lang(ja) .post-head h1, :lang(ja) .post-body h2, :lang(ja) .post-body h3, :lang(ja) .cta-title,
:lang(ja) .gc-title, :lang(ja) .index-hero h1, :lang(ja) .index-hero p, :lang(ja) .post-body p { word-break: auto-phrase; }
