/* コンテンツページ（LP・ハブ・項目・記事）共通スタイル。アプリ本体は styles.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #1e293b;
  --ink-strong: #0f172a;
  --dim: #64748b;
  --accent: #0284c7;
  --accent-dark: #075985;
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --amber-bg: #fffbeb;
  --amber-ink: #92600a;
  --sky-bg: #f0f9ff;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.9; -webkit-font-smoothing: antialiased;
  /* sticky footer: コンテンツが短くてもフッターを画面下端に固定 */
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== header / footer ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px;
}
.logo {
  font-weight: 800; font-size: 18px; letter-spacing: 0.22em; color: var(--ink-strong);
  text-decoration: none !important;
}
.logo span { color: var(--accent); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 13.5px; }
.site-nav a { color: var(--dim); font-weight: 600; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.btn-app {
  background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff !important;
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}
.btn-app:hover { text-decoration: none; filter: brightness(1.06); }

.site-footer {
  border-top: 1px solid var(--line); background: #fff;
  margin-top: auto; padding: 48px 20px 40px; font-size: 12.5px; color: var(--dim);
}
.site-footer .inner { max-width: 1080px; margin: 0 auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.site-footer nav a { color: var(--dim); }
.site-footer .credit { font-size: 11px; line-height: 1.8; color: #94a3b8; }

/* ===== layout ===== */
.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container.wide { max-width: 1080px; }
.breadcrumb {
  font-size: 12px; color: var(--dim); margin: 18px 0 6px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--dim); }
.breadcrumb .sep { color: #cbd5e1; }

/* ===== typography ===== */
.page-title { font-size: 30px; font-weight: 800; line-height: 1.45; color: var(--ink-strong); margin: 10px 0 6px; }
.page-lead { color: var(--dim); font-size: 14.5px; margin-bottom: 24px; }
.reading { font-size: 13px; color: var(--dim); margin-bottom: 4px; }
article h2 {
  font-size: 21px; font-weight: 800; color: var(--ink-strong);
  margin: 44px 0 14px; padding: 10px 14px;
  border-left: 4px solid var(--accent); background: var(--sky-bg); border-radius: 0 8px 8px 0;
}
article h3 { font-size: 17px; font-weight: 700; color: var(--ink-strong); margin: 30px 0 10px; }
article p { margin: 14px 0; }
article ul, article ol { margin: 14px 0 14px 24px; }
article li { margin: 6px 0; }
article figure { margin: 22px 0; }
article figure img { border-radius: 12px; border: 1px solid var(--line); }
article figcaption { font-size: 12px; color: var(--dim); margin-top: 8px; text-align: center; }

/* ===== components ===== */
.pref-tag { font-size: 13px; color: var(--accent-dark); font-weight: 600; }
.box {
  border-radius: 12px; padding: 18px 20px; margin: 20px 0; border: 1px solid var(--line);
  background: var(--card);
}
.box-mnemonic { background: var(--amber-bg); border-color: #fde68a; }
.box-mnemonic .box-title { color: var(--amber-ink); }
.box-exam { background: var(--sky-bg); border-color: #bae6fd; }
.box-exam .box-title { color: var(--accent-dark); }
.box-title { font-weight: 800; font-size: 14px; margin-bottom: 8px; display: block; }
.box ul { margin: 0 0 0 22px; }

.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.data-table th { background: var(--bg); font-weight: 700; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chips a {
  font-size: 13px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.cta-box {
  text-align: center; background: linear-gradient(135deg, #0c4a6e, #0284c7);
  color: #e0f2fe; border-radius: 16px; padding: 32px 24px; margin: 40px 0;
}
.cta-box h2, .cta-box .cta-title {
  all: unset; display: block; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px;
}
.cta-box p { margin: 8px 0 18px; font-size: 14px; }
.cta-btn {
  display: inline-block; background: #fff; color: var(--accent-dark) !important;
  font-weight: 800; font-size: 15.5px; padding: 14px 36px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.cta-btn:hover { text-decoration: none; transform: translateY(-1px); }
.cta-note { font-size: 12px; opacity: 0.85; }

/* ===== 問い合わせフォーム ===== */
#contact-form { margin: 28px 0 8px; }
#contact-form .field { margin-bottom: 22px; }
#contact-form label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-strong); margin-bottom: 8px; }
#contact-form .req { font-size: 11px; font-weight: 600; color: var(--accent-dark); background: var(--sky-bg); border-radius: 4px; padding: 1px 7px; margin-left: 6px; }
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%; font: inherit; line-height: 1.7; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
#contact-form textarea { resize: vertical; min-height: 150px; }
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}
#contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { font-size: 12.5px; color: var(--dim); margin: 4px 0 20px; }
.form-submit {
  display: inline-block; border: none; cursor: pointer; font: inherit; font-weight: 700;
  font-size: 15.5px; color: #fff; background: linear-gradient(135deg, #0c4a6e, #0284c7);
  padding: 13px 40px; border-radius: 999px; box-shadow: 0 4px 16px rgba(2, 132, 199, 0.25);
  transition: transform .15s, filter .15s;
}
.form-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.form-submit:disabled { opacity: .55; cursor: default; }
.form-status { margin-top: 16px; font-size: 14px; }
.form-status:empty { display: none; }
.form-status.ok { color: #15803d; }
.form-status.err { color: #b91c1c; }

.toc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin: 24px 0; }
.toc .toc-title { font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.toc ol { margin: 0 0 0 22px; font-size: 14px; }
.toc a { color: var(--ink); }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; }
.item-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  color: var(--ink) !important; font-size: 14px;
}
.item-card:hover { border-color: var(--accent); text-decoration: none; }
.item-card .name { font-weight: 700; }
.item-card .yomi { font-size: 11px; color: var(--dim); display: block; }

.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-q { font-weight: 700; color: var(--ink-strong); }
.faq-q::before { content: "Q. "; color: var(--accent); font-weight: 800; }
.faq-a { margin-top: 6px; font-size: 14.5px; }
.faq-a::before { content: "A. "; color: #f59e0b; font-weight: 800; }

.article-list { display: flex; flex-direction: column; }
.article-card {
  display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line);
  color: var(--ink) !important; align-items: flex-start;
}
.article-card:hover { text-decoration: none; background: rgba(2, 132, 199, 0.03); }
.article-card img { width: 200px; border-radius: 10px; border: 1px solid var(--line); flex-shrink: 0; }
.article-card time { font-size: 12px; color: var(--dim); }
.article-card h2 { font-size: 17px; margin: 4px 0 6px; border: none; background: none; padding: 0; }
.article-card p { font-size: 13px; color: var(--dim); margin: 0; }

/* ===== summary box（要約ボックス・AI引用向け） ===== */
.summary-box {
  background: var(--sky-bg); border: 1px solid #bae6fd; border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 18px 0 24px;
  font-size: 14.5px; line-height: 1.85;
}
.summary-box .summary-label {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  color: var(--accent-dark); margin-bottom: 4px;
}

/* ===== LP ===== */
.hero { background: linear-gradient(180deg, #0a0e1a 0%, #12203a 100%); color: #e2e8f0; padding: 56px 20px 0; overflow: hidden; }
.hero .inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.5vw, 42px); font-weight: 800; color: #fff; line-height: 1.5; }
.hero h1 .accent { color: #4dc3ff; }
.hero .sub { margin: 16px auto 26px; max-width: 620px; font-size: 15px; color: #b6c5dd; }
.hero .hero-cta { margin-bottom: 12px; }
.hero .hero-note { font-size: 12px; color: #8aa3cc; margin-bottom: 34px; }
.hero img { display: block; margin: 0 auto; max-width: 900px; width: 100%; border-radius: 16px 16px 0 0; border: 1px solid #2a3a5c; border-bottom: none; }
.section { padding: 56px 0 8px; }
.section-title { text-align: center; font-size: 24px; font-weight: 800; color: var(--ink-strong); margin-bottom: 10px; }
.section-lead { text-align: center; color: var(--dim); font-size: 14px; margin-bottom: 32px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.feature .icon { font-size: 26px; }
.feature h3 { font-size: 16px; margin: 10px 0 6px; color: var(--ink-strong); }
.feature p { font-size: 13.5px; color: var(--dim); margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.cat-tile {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  color: var(--ink) !important; font-weight: 700; font-size: 14px;
}
.cat-tile:hover { border-color: var(--accent); text-decoration: none; }
.cat-tile .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cat-tile .count { margin-left: auto; font-size: 11px; color: var(--dim); font-weight: 500; }

@media (max-width: 640px) {
  .page-title { font-size: 23px; }
  article h2 { font-size: 18px; }
  .article-card { flex-direction: column; }
  .article-card img { width: 100%; }
  /* ヘッダーは畳まずコンパクト化（記事一覧・アプリ導線をSPでも常に残す） */
  .site-header .inner { padding: 10px 14px; gap: 12px; }
  .logo { font-size: 15px; letter-spacing: 0.1em; white-space: nowrap; }
  .site-nav { gap: 11px; font-size: 12.5px; }
  .site-nav a { white-space: nowrap; }
  .btn-app { padding: 7px 12px; font-size: 12px; white-space: nowrap; }
}
/* 狭幅ではカテゴリ一覧のみ畳む（記事リンクとアプリボタンは常に表示） */
@media (max-width: 430px) {
  .site-nav a.nav-link[href="/#categories"] { display: none; }
}

/* ============ 教材紹介カード（Amazonアソシエイト） ============ */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 18px 0; }
@media (max-width: 640px) { .goods-grid { grid-template-columns: 1fr; } }
.goods-card {
  background: #fff8ef; border: 1px solid #f3dcb9; border-radius: 14px;
  padding: 16px 18px; transition: box-shadow 0.2s, transform 0.2s;
}
.goods-card:hover { box-shadow: 0 8px 20px -10px rgba(180, 100, 20, 0.35); transform: translateY(-2px); }
.goods-icon { font-size: 26px; line-height: 1; }
.goods-pr {
  display: inline-block; font-size: 10px; font-weight: 700; color: #b45309;
  background: #fdeed3; padding: 2px 9px; border-radius: 999px; margin: 8px 0 2px;
}
.goods-name { display: block; font-weight: 700; font-size: 15px; margin: 4px 0 6px; line-height: 1.5; }
.goods-note { font-size: 13px; color: #5b6472; line-height: 1.75; margin: 0; }
.affiliate-note { font-size: 11px; color: #8a93a3; line-height: 1.8; margin: 22px 0 6px; }

/* ============ ビジュアルCTA（アプリ動画の背景つき） ============ */
.cta-box.cta-video { position: relative; overflow: hidden; padding: 64px 28px; }
.cta-video .cta-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 68% center; /* パネルUIではなく地図が映る位置 */
  z-index: 0;
}
/* 動画がはっきり見える程度の薄い青幕＋中央は文字用に少し濃く */
.cta-video::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 90% 80% at 50% 50%, rgba(8, 47, 73, 0.55), rgba(8, 47, 73, 0.25) 75%),
    linear-gradient(135deg, rgba(12, 74, 110, 0.55), rgba(2, 132, 199, 0.35));
}
.cta-video > *:not(.cta-bg) { position: relative; z-index: 2; }
.cta-video .cta-title, .cta-video p { text-shadow: 0 1px 10px rgba(3, 35, 56, 0.65); }
.cta-video .cta-note { text-shadow: 0 1px 8px rgba(3, 35, 56, 0.8); }
@media (max-width: 560px) { .cta-box.cta-video { padding: 48px 20px; } }
@media (prefers-reduced-motion: reduce) { .cta-video .cta-bg { display: none; } }

/* 比較記事のアプリサムネ */
.app-shot { margin: 14px 0 16px; }
.app-shot img { max-width: 440px; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line, #e2e8f0); }
.store-links { font-size: 13px; margin: 10px 0 0; }
.store-links a { font-weight: 700; }
.store-links .sep2 { color: #cbd5e1; margin: 0 8px; }

/* 教材記事の商品サムネ（正方形イラスト） */
.goods-shot { margin: 14px 0 16px; }
.goods-shot img { max-width: 300px; width: 60%; height: auto; border-radius: 14px; }

/* ---- フラッシュカードビュー ---- */
.fc-launch {
  background: var(--sky-bg); border: 1.5px solid var(--accent); border-radius: 14px;
  padding: 22px 20px; margin: 28px 0; text-align: center;
}
.fc-launch p { font-size: 13px; color: var(--dim); margin-top: 10px; line-height: 1.7; }
.fc-launch .fc-progress-note { color: var(--accent); margin-top: 6px; }
.fc-launch-mini {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sky-bg); border: 1.5px solid var(--accent); border-radius: 999px;
  color: var(--accent); font-size: 13.5px; font-weight: 700;
  padding: 10px 20px; cursor: pointer; margin: 6px 0 14px;
}
.fc-launch-mini:hover { background: var(--accent); color: #fff; }
.fc-launch-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  font-size: 16px; font-weight: 700; padding: 14px 34px; cursor: pointer;
}
.fc-launch-btn:hover { background: var(--accent-dark); }
#fc-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 16px;
}
#fc-overlay.open { display: flex; }
#fc-box {
  background: var(--card); border-radius: 18px; width: 100%; max-width: 520px;
  max-height: 92vh; overflow-y: auto; padding: 18px 20px 20px; position: relative;
}
#fc-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); font-weight: 700; }
#fc-head .fc-good-count { color: var(--accent); }
#fc-close {
  margin-left: auto; background: none; border: none; font-size: 22px; color: var(--dim);
  cursor: pointer; line-height: 1; padding: 4px 8px;
}
.fc-stage { position: relative; margin: 16px 4px 18px; perspective: 900px; }
.fc-stage::before, .fc-stage::after {
  content: ""; position: absolute; inset: 0; border-radius: 16px;
  background: var(--card); border: 1.5px solid var(--line); z-index: 0;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}
.fc-stage::before { transform: rotate(-2deg) translateY(5px); }
.fc-stage::after { transform: rotate(1.4deg) translateY(8px); }
.fc-card {
  position: relative; z-index: 1; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1.5px solid var(--line); border-radius: 16px; padding: 30px 20px 24px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  text-align: center; min-height: 200px;
  display: flex; flex-direction: column; justify-content: center; gap: 9px;
  animation: fcFlipIn 0.2s ease; cursor: default;
}
.fc-card.tappable { cursor: pointer; }
.fc-card.fc-flip-out { transform: rotateY(90deg); transition: transform 0.16s ease-in; }
@keyframes fcFlipIn { from { transform: rotateY(-90deg); } to { transform: rotateY(0); } }
.fc-badge {
  position: absolute; top: 10px; left: 12px;
  font-size: 15px; font-weight: 800; color: #fff; background: var(--accent);
  width: 28px; height: 28px; border-radius: 8px; line-height: 28px;
}
.fc-card .fc-mark {
  position: absolute; right: 6px; bottom: -18px; font-size: 88px; font-weight: 800;
  color: rgba(2, 132, 199, 0.07); pointer-events: none; line-height: 1;
}
.fc-img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
.fc-qimg { height: 200px; object-fit: contain; background: #f0f9ff; }
.fc-img--sticker {
  object-fit: contain; height: 118px; width: auto; align-self: center;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.16));
}
.fc-cat { font-size: 11.5px; color: var(--dim); letter-spacing: 0.03em; }
.fc-q { font-size: 18px; font-weight: 700; line-height: 1.6; color: var(--ink-strong); }
.fc-a { font-size: 14.5px; line-height: 1.85; text-align: left; }
.fc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fc-actions .full { grid-column: 1 / -1; }
.fc-btn {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 10px;
  font-size: 15px; font-weight: 700; padding: 13px 10px; cursor: pointer; color: var(--ink);
}
.fc-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.fc-btn.primary:hover { background: var(--accent-dark); }
.fc-btn.ok:hover { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }
.fc-btn.ng:hover { border-color: #d97706; color: #d97706; background: var(--amber-bg); }
.fc-menu { display: grid; gap: 10px; margin-top: 14px; }
.fc-note { font-size: 12px; color: var(--dim); text-align: center; margin-top: 10px; line-height: 1.7; }
.fc-reset {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 12px; color: var(--dim); text-decoration: underline;
}
.fc-reset:hover { color: var(--accent); }
.fc-result { text-align: center; padding: 10px 0 4px; }
.fc-result .big { font-size: 30px; font-weight: 800; color: var(--ink-strong); }
.fc-result .msg { font-size: 13.5px; color: var(--dim); margin: 8px 0 14px; line-height: 1.7; }
#fc-foot {
  border-top: 1px solid var(--line); margin-top: 20px; padding-top: 15px;
  text-align: center; font-size: 13px;
}
#fc-foot a { display: inline-block; color: var(--accent); font-weight: 700; white-space: nowrap; }
