/* ============================================================
   Manabase 紹介ページ
   構成：共通 → スマホ版（〜767px）→ PC版（768px〜）→ PC版・広い画面（1024px〜）
   スマホ版とPC版は、それぞれ専用の見た目として組む（同じ情報を、両方に出す）
   ============================================================ */

/* ---------- 共通：色・文字・部品 ---------- */
:root {
  --bg: #ffffff;
  --soft: #f1f4fc;
  --line: #e3e8f5;
  --ink: #111827;
  --muted: #5b6475;
  --blue: #558acb;
  --deep: #3973b9;
  --link: #3973b9;
  --pale: #cfe0f5;
  --tint: #ecf3fa;
  --lemon: #ffe066;
  --shadow: rgba(27, 55, 99, .2);
  /* ダークモードには対応しない。端末の設定や、ブラウザの「強制ダーク」に関係なく、常に明るい表示にする */
  color-scheme: only light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: 8px; top: -64px; padding: 12px 16px; border-radius: 8px; background: var(--ink); color: var(--bg); z-index: 30; }
.skip:focus { top: 8px; }

/* アイコン（共通のスプライトを使う） */
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; display: block; }

.hl { background: linear-gradient(transparent 62%, var(--lemon) 62%); padding: 0 .1em; }
.store { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 24px; border-radius: 14px; border: 2px dashed var(--pale); background: var(--bg); color: var(--link); font-weight: 700; }
.note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.note .i { width: 18px; height: 18px; }

/* ---------- スマホ版（〜767px） ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }

/* 背景：スマホ版は縦長（assets/bg-mobile.webp）、PC版は横長（assets/bg-pc.webp）の画像 */
.hero { --hero-img: url("assets/bg-mobile.webp"); position: relative; background: var(--soft) var(--hero-img) no-repeat center bottom / cover; padding: 32px 0 48px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero .copy { text-align: center; }
/* 文字の飾り：画像の上でも読めるよう、薄い白の縁取り。見出しの「つながる」は黄色のマーカーで強調 */
.hero h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.45; font-weight: 800; text-shadow: 0 0 18px rgba(255, 255, 255, .9), 0 1px 0 rgba(255, 255, 255, .8); }
.hero .lead { margin: 0 auto; max-width: 26em; color: var(--muted); text-shadow: 0 0 14px rgba(255, 255, 255, .9); }
.hero .cta { margin-top: 24px; }
.appid { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.appid img { width: 64px; height: 64px; border-radius: 15px; display: block; box-shadow: 0 4px 0 var(--shadow), 0 0 0 3px rgba(255, 255, 255, .75); }
.appid strong { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: .01em; color: var(--link); text-shadow: 0 0 14px rgba(255, 255, 255, .9); }
.hero .store { width: 100%; max-width: 360px; }

.phone { position: relative; width: 232px; }
.phone .body {
  position: relative; height: 412px; overflow: hidden;
  border: 8px solid var(--pale); border-radius: 36px;
  background: var(--bg); box-shadow: 0 6px 0 var(--shadow);
}
.phone .body img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* スマホから飛び出す画面（実際のアプリの画面を切り抜いたもの）。スマホ版は2枚、PC版は3枚 */
.stage { position: relative; display: flex; justify-content: center; isolation: isolate; }
.phone::before { content: ""; position: absolute; inset: -48px -44px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .78), rgba(255, 255, 255, 0)); }
.pop {
  --r: 0deg;
  position: absolute; display: block; height: auto; z-index: 2;
  background: #fff; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--pale), 0 6px 0 var(--shadow);
  transform: rotate(var(--r)); animation: float 6.5s ease-in-out infinite alternate;
}
@keyframes float { from { transform: translateY(0) rotate(var(--r)); } to { transform: translateY(-4px) rotate(var(--r)); } }
.pop.p1 { --r: -5deg; width: 128px; left: 4px; top: 96px; }
.pop.p2 { --r: 4deg; width: 136px; right: 0; top: 196px; animation-delay: -2.4s; }

/* スクリーンショットの場所（図＋説明）。スマホの全体を見せ、説明は下に */
.shot { margin: 32px 0 0; display: flex; flex-direction: column; }
.shot figcaption { order: 1; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 20px; padding: 10px 18px; border-radius: 14px; background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-align: center; font-size: 14px; }
.shot figcaption strong { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
.shot figcaption strong .i { color: var(--link); }
.shot figcaption span { color: var(--muted); }
.shot .phone { margin: 0 auto; }

/* ---------- PC版（768px〜） ---------- */
@media (min-width: 768px) {
  .wrap { padding: 0 24px; }
  header.top .wrap { height: 64px; }

  .hero { --hero-img: url("assets/bg-pc.webp"); background-position: right bottom; padding: 72px 0; }
  .hero .grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
  .hero .copy { text-align: left; }
  .hero h1 { font-size: 32px; }
  .hero .lead { margin: 0; }
  .hero .store { width: auto; max-width: none; }
  .hero .note { justify-content: flex-start; }
  .appid { justify-content: flex-start; }

  .pop.p1 { width: 128px; left: -52px; top: 96px; }
  .pop.p2 { width: 136px; right: -44px; top: 236px; }
  .phone { width: 248px; margin: 0; justify-self: center; }
  .phone .body { height: 480px; border-bottom: 8px solid var(--pale); border-radius: 40px; box-shadow: 0 8px 0 var(--shadow); }
  .shot { margin: 0; align-items: center; }
  .shot figcaption { margin-top: 24px; }
}

/* ---------- PC版・広い画面（1024px〜） ---------- */
@media (min-width: 1024px) {
  .hero h1 { font-size: 40px; }
  .phone { width: 280px; }
  .phone .body { height: 520px; border-radius: 42px; }
  .pop.p1 { width: 176px; left: -96px; top: 116px; }
  .pop.p2 { width: 184px; right: -108px; top: 272px; }
}

@media (prefers-reduced-motion: reduce) {
  .pop { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Manabaseとは（アイコン中心。文字は最小限） ---------- */
.about { padding: 56px 0 24px; background: var(--bg); }
.about h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.45; font-weight: 800; text-align: center; }
.about-lead { margin: 0 0 28px; text-align: center; color: var(--muted); }
.ab-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--tint); color: var(--link); flex: none; }
.ab-ic .i { width: 28px; height: 28px; }
.ab-ic.big { width: 64px; height: 64px; border-radius: 20px; }
.ab-ic.big .i { width: 34px; height: 34px; }
.ab-ic.ai { background: var(--blue); color: #fff; }
.ab-t { font-size: 13px; line-height: 1.45; font-weight: 700; text-align: center; }
/* 図から「1つにつながる」の文まで、ひとつの背景（画像）で包む */
.about-visual { padding: 28px 16px 32px; border-radius: 28px; background: var(--soft) url("assets/bg-about.webp") center / cover no-repeat; }
/* PDF・ノート・単語帳・問題集・AIチャットが、教材同士で双方向につながる図 */
.ab-net { position: relative; width: 100%; max-width: 420px; aspect-ratio: 400 / 360; margin: 0 auto; }
.net-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-node { position: absolute; transform: translate(-50%, -50%); }
.net-node .ab-t { position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%); white-space: nowrap; }
.net-center { position: absolute; left: 50%; top: 48.6%; display: grid; justify-items: center; gap: 6px; transform: translate(-50%, -50%); }
.ab-ic.app { width: 72px; height: 72px; border-radius: 22px; background: #fff; border: 2px solid var(--blue); }
.ab-ic.app img { width: 40px; height: 40px; border-radius: 10px; }
.ab-t.strong { font-size: 15px; font-weight: 800; color: var(--deep); }
.about-claim { margin: 4px 0 0; font-size: 19px; line-height: 1.6; font-weight: 800; text-align: center; }
@media (min-width: 768px) {
  .about { padding: 80px 0 40px; } .about h2 { font-size: 30px; } .ab-t { font-size: 14px; } .about-visual { padding: 40px 32px 44px; }
  .about-claim { font-size: 24px; }
  .about-claim br { display: none; }
}

/* ---------- つながりの例（5枚のカード）。左右にスワイプで切り替え。768px〜は矢印ボタンも出る ---------- */
.ex { padding: 0; background: var(--bg); }
.ex > .wrap { padding-top: 32px; padding-bottom: 28px; }
.ex-car { padding: 36px 0 64px; background: var(--soft) url("assets/bg-ex-mobile.webp") center top / cover no-repeat; }
.ex h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.45; font-weight: 800; text-align: center; }
.ex .lead { margin: 0; text-align: center; color: var(--muted); }
.nb { white-space: nowrap; }
.ex-track { --cw: min(86vw, 420px); --pad: calc((100% - var(--cw)) / 2); position: relative; display: flex; gap: 14px; padding: 4px var(--pad) 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ex-track::-webkit-scrollbar { display: none; }
.ex-card { flex: 0 0 var(--cw); scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; word-break: auto-phrase; }
.ex-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ex-ics { display: flex; align-items: center; gap: 6px; flex: none; }
.ex-x { color: #8fb0dc; font-size: 16px; font-weight: 800; }
.ex-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--link); flex: none; }
.ex-ic .i { width: 22px; height: 22px; }
.ex-pair { font-size: 13px; font-weight: 700; color: var(--muted); }
.ex-row + .ex-row { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ex-card h3 { margin: 14px 0 0; font-size: 17px; line-height: 1.4; font-weight: 800; }
.ex-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--muted); }
.flow2 { display: flex; align-items: center; gap: 6px; }
.fs { position: relative; flex: 1 1 0; min-width: 0; }
.scene { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--soft); }
.scene.real { border: 1px solid var(--line); background: #fff; object-fit: cover; }
.ex-arrow { flex: none; display: grid; place-items: center; width: 18px; }
.ex-arrow .i { width: 18px; height: 18px; color: #8fb0dc; transform: rotate(-90deg); }
.ex-ctl { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.ex-dots { display: flex; align-items: center; gap: 8px; }
.dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: #cfe0f5; cursor: pointer; transition: width .2s, background .2s; }
.dot::after { content: ""; position: absolute; inset: -10px -4px; }
.dot[aria-current="true"] { width: 22px; background: var(--blue); }
.ex-nav { display: none; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--link); cursor: pointer; }
.ex-nav .i { width: 20px; height: 20px; }
.ex-nav.prev .i { transform: rotate(180deg); }
.ex-nav:disabled { opacity: .35; cursor: default; }
@media (min-width: 1024px) { .ex-car { background-image: url("assets/bg-ex-pc.webp"); background-position: center; } }

/* ---------- さらに、こんな使い方も（見出し〜「そのまま教材に」までを、ひとつの枠にまとめる） ---------- */
.more { padding: 40px 0 72px; background: var(--bg); }
.more-box { padding: 0; }
.more h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.45; font-weight: 800; text-align: center; }
.more-pair { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 22px; }
.more-track .ex-arrow { align-self: center; }
.more-track { display: flex; align-items: stretch; gap: 6px; --cw: min(66vw, 250px); margin: 0 -16px; padding: 4px calc((100% - var(--cw)) / 2) 14px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.mf { flex: 0 0 var(--cw, min(66vw, 250px)); margin: 0; display: grid; gap: 12px; align-content: start; padding: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.mf figcaption { position: relative; padding-left: 28px; font-size: 14px; line-height: 1.55; font-weight: 700; }
.mf figcaption b { position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }
.mf.more-end { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 16px; width: auto; margin: 24px 0 0; text-align: left; scroll-snap-align: none; }
.mf.more-end .scene { flex: none; width: min(40vw, 170px); }
.more-end-cap { margin: 0 0 10px; font-size: 14px; line-height: 1.55; font-weight: 700; }
.more-end-text { flex: 1; min-width: 0; text-align: center; }
.more-claim { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 800; }
.more-track:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
/* 「さらに、こんな使い方も」の下に、組み合わせごとに1枚ずつ、同じ形（more-end）で足していく */
.more-end-next { padding-top: 24px; border-top: 1px dashed var(--line); }
/* 「つながった言葉が、単語帳にそろう」は、カード化して、角度をつけて立体感を出す */
.more-end-card {
  position: relative;
  isolation: isolate;
  background: linear-gradient(135deg, #fff 55%, #f3f7fd);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 20px;
  box-shadow: 0 3px 0 #dce6f3, 0 16px 28px -12px rgba(27, 55, 99, .28);
  transform: rotate(-1deg);
}
.more-end-card::before, .more-end-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid #cbdcf0;
  border-radius: inherit;
  pointer-events: none;
}
.more-end-card::before {
  background: #e7effa;
  transform: translate(0, 9px) rotate(2deg) scale(.97);
  box-shadow: 0 12px 24px -12px rgba(27, 55, 99, .2);
}
.more-end-card::after {
  background: #f4f8fe;
  transform: translate(0, 4px) rotate(-.6deg) scale(.99);
}
.more-end-card > * { position: relative; }
.more-end-card .more-end-text { z-index: 1; }
.mf.more-end-card .scene {
  width: min(35vw, 170px);
  border: 4px solid #fff;
  border-radius: 15px;
  box-shadow: 0 0 0 1px var(--pale), 0 4px 0 #dce6f3, 0 15px 24px -10px rgba(27, 55, 99, .35);
  transform: rotate(4deg) scale(1.04);
}
.more-end-next .more-claim .hl { display: inline-block; white-space: nowrap; }
.mf.more-end-card.more-end-next { margin-top: 48px; border-top: 1px solid var(--line); transform: rotate(1.2deg); }
.more-end-card.more-end-next::before { transform: translate(0, 10px) rotate(-2.4deg) scale(.965); }
.more-end-card.more-end-next::after { transform: translate(0, 5px) rotate(.8deg) scale(.985); }
.mf.more-end-card.more-end-next .scene { transform: rotate(-4deg) scale(1.02); }
@media (max-width: 374px) {
  .mf.more-end-card { flex-direction: column; gap: 22px; }
  .mf.more-end-card .scene { width: 160px; }
  .more-end-card .more-end-text { flex: none; width: 100%; }
}
@media (min-width: 768px) { .more { padding: 56px 0 96px; } .more h2 { font-size: 26px; } .more-claim { font-size: 20px; } }
@media (min-width: 1024px) {
  .more-track { margin: 0; padding: 4px 0 0; gap: 8px; overflow-x: visible; align-items: stretch; }
  .more-track .ex-arrow { align-self: center; }
  .more-track .mf { flex: 1 1 0; min-width: 0; }
  .mf.more-end { gap: 40px; margin-top: 36px; }
  .mf.more-end .scene { flex: 0 0 260px; width: 260px; }
  .more-end-cap { font-size: 16px; }
  .more-end-text { flex: 0 1 auto; text-align: left; }
  .more-claim { font-size: 28px; }
  .more-end-card { padding: 40px 48px; transform: rotate(-1.4deg); }
  .more-end-card::before { transform: translate(0, 16px) rotate(2.8deg) scale(.96); }
  .more-end-card::after { transform: translate(0, 7px) rotate(-.8deg) scale(.985); }
  .mf.more-end-card .scene { flex: 0 0 260px; width: 260px; transform: rotate(5deg) scale(1.08); }
  .mf.more-end-card.more-end-next { margin-top: 64px; transform: rotate(1.6deg); }
  .more-end-card.more-end-next::before { transform: translate(0, 16px) rotate(-3deg) scale(.96); }
  .more-end-card.more-end-next::after { transform: translate(0, 7px) rotate(1deg) scale(.985); }
  .mf.more-end-card.more-end-next .scene { transform: rotate(-6deg) scale(1.05); }
}
.ex-track:focus-visible, .dot:focus-visible, .ex-nav:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
@media (min-width: 768px) {
  .ex > .wrap { padding-top: 48px; padding-bottom: 36px; } .ex h2 { font-size: 30px; }
  .ex-car { padding: 44px 0 88px; }
  .ex-nav { display: grid; }
  .ex-ctl { margin-top: 16px; }
}
@media (min-width: 1024px) {
  .ex-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1360px; margin: 0 auto; padding: 4px 24px 12px; overflow: visible; scroll-snap-type: none; }
  .ex-card { min-width: 0; scroll-snap-align: none; }
  .ex-ctl { display: none; }
}
@media (prefers-reduced-motion: reduce) { .dot { transition: none; } }

.closing {
  padding: 80px 0 64px;
  text-align: center;
  background: #eef4ff url("assets/bg-closing.png") center top / cover no-repeat;
}
.closing h2 { margin: 0; font-size: clamp(24px, 6.2vw, 32px); font-weight: 800; line-height: 1.9; letter-spacing: .04em; }
.closing-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 40px 0 0; font-size: 28px; font-weight: 800; letter-spacing: .01em; }
.closing-brand img { display: block; border-radius: 16px; box-shadow: 0 4px 0 #dce6f3, 0 12px 24px -12px rgba(27, 55, 99, .28); }
@media (min-width: 768px) {
  .closing { padding: 112px 0 88px; }
  .closing h2 { font-size: 40px; }
  .closing-brand { margin-top: 48px; font-size: 32px; }
}

.release-status { display: inline-block; margin: 20px 0 0; padding: 6px 16px; border: 1px solid var(--pale); border-radius: 20px; background: rgba(255, 255, 255, .8); color: var(--link); font-size: 13px; font-weight: 700; }
.site-footer { padding: 24px 0; background: #f5f8fe; border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 28px; row-gap: 4px; }
.footer-links a, .policy-trigger { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.footer-links a:hover, .policy-trigger:hover { color: var(--link); text-decoration: underline; }
.policy-dialog { width: min(720px, calc(100% - 32px)); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(27, 55, 99, .25); }
.policy-dialog::backdrop { background: rgba(17, 24, 39, .4); }
.policy-close { position: sticky; top: 0; display: flex; justify-content: flex-end; margin: 0; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.policy-close button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); font: inherit; cursor: pointer; }
.policy-content { padding: 20px 24px 32px; overflow-wrap: anywhere; }
.policy-content h2 { margin: 0; font-size: 22px; }
.policy-date { color: var(--muted); font-size: 13px; }
.policy-content h3 { margin: 28px 0 10px; font-size: 17px; }
.policy-content p { margin: 10px 0; font-size: 14px; }
.policy-content a { color: var(--link); text-decoration: underline; }
