/* howfar.club のトップ（LP）。アプリと同じ：地は生成り・墨・白、色が出るのは自分の印と CTA だけ。線は墨 3px、角丸 22 かカプセル、影はべた塗りのずれ影 6px */
:root {
  --cream: #FFFBF4; --ink: #2B1E4F; --white: #fff;
  --pink: #FFC9DB; --pink-s: #FF86B0; --lavender: #D9CBFF; --lavender-s: #9B7BFF;
  --lemon: #FFF1A8; --lemon-s: #FFD93D; --mint: #CFF5D8; --mint-s: #6FD89A;
  --sky: #BFE3FF; --sky-s: #5FB8FF;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: 'Zen Maru Gothic', system-ui, sans-serif; font-weight: 700; overflow-x: hidden; }
.num { font-family: Fredoka, 'Zen Maru Gothic', sans-serif; }
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ── ヒーロー ─────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 28px 0 72px; }
.blobs { position: absolute; inset: 0; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }   /* 下の端で丸が切れて見えないように */
.blob { position: absolute; border-radius: 50%; will-change: transform; }
.hero .wrap { position: relative; z-index: 1; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: 46px; height: 46px; border-radius: 12px; border: 2.5px solid var(--ink); }
.logo b { display: block; font-family: Fredoka, sans-serif; font-size: 28px; line-height: 1; }
.logo small { display: block; font-size: 11px; font-weight: 900; letter-spacing: 2px; opacity: .6; margin-top: 2px; }
.hero-grid { display: grid; gap: 36px; align-items: center; margin-top: 40px; }
.hero h1 { font-size: clamp(40px, 9vw, 68px); font-weight: 900; line-height: 1.15; margin: 0; letter-spacing: .02em; }
.hero h1 .q { display: inline-block; transform-origin: 50% 80%; }
.lead { font-size: clamp(15px, 3.6vw, 18px); line-height: 1.9; margin: 18px 0 0; opacity: .78; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; border: 3px solid var(--ink); background: var(--white); font-size: 15px; font-weight: 900; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); }
.pill.cta { background: var(--pink-s); }
.pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint-s); border: 2px solid var(--ink); }

/* ようこそのアニメ（アプリの WelcomeAnimation と同じ台本） */
.stage { position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding-top: 34px; }
.card { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 12px; margin-bottom: 12px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 18px; will-change: transform; }
.spine { flex: none; width: 34px; height: 50px; border: 2.5px solid var(--ink); border-radius: 6px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font-size: 9px; font-weight: 900; letter-spacing: 1px; overflow: hidden; position: relative; }
.spine .tag { position: absolute; writing-mode: horizontal-tb; top: -10px; right: -26px; font-size: 8px; padding: 1px 5px; border-radius: 999px; background: var(--ink); color: var(--cream); white-space: nowrap; }
.gauge { position: relative; flex: 1; height: 60px; }
.track { position: absolute; left: 0; right: 0; top: 23px; height: 14px; border-radius: 999px; background: var(--white); border: 2.5px solid var(--ink); overflow: hidden; }
.fill { height: 100%; background: var(--pink-s); border-radius: 999px; }
.face { position: absolute; left: 0; top: 0; width: 40px; height: 40px; will-change: transform; }
.face img { width: 40px; height: 40px; border-radius: 50%; border: 2.5px solid var(--ink); display: block; position: relative; background: var(--white); object-fit: cover; }
.face::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c); transform: translate(2px, 3px); }
.face .star { position: absolute; right: -9px; top: -9px; width: 22px; height: 22px; display: none; }
.bubble { position: absolute; top: -40px; left: 0; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 12px; font-weight: 900; display: none; z-index: 5; }
.stack-row { display: flex; align-items: flex-end; gap: 14px; padding: 6px 0 0 4px; position: relative; will-change: transform; }
.stack { display: flex; flex-direction: column; }
.stack .bk { height: 22px; margin-top: -4px; border: 2px solid var(--ink); border-radius: 4px; font-size: 10px; font-weight: 900; padding: 0 10px; display: flex; align-items: center; transform-origin: 50% 50%; will-change: transform; }
.stack .bk:first-child { margin-top: 0; }
.count small { display: block; font-size: 11px; font-weight: 900; opacity: .6; }
.count b { font-size: 24px; display: inline-block; }
.count span { font-size: 11px; font-weight: 900; }

/* ── 3つだけ ─────────────────────────── */
section.block { padding: 72px 0; }
.eyebrow { font-family: Fredoka, sans-serif; font-size: 14px; letter-spacing: 2px; opacity: .55; }
h2 { font-size: clamp(28px, 6vw, 40px); font-weight: 900; line-height: 1.3; margin: 8px 0 0; }
.sub { font-size: 15px; line-height: 1.9; opacity: .75; margin: 14px 0 0; max-width: 34em; }
.features { display: grid; gap: 22px; margin-top: 40px; }
.feature { background: var(--white); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 6px 6px 0 var(--shadow, var(--lemon)); padding: 24px 22px; display: flex; flex-direction: column; }
.feature h3 { font-size: 22px; font-weight: 900; margin: 6px 0 0; line-height: 1.4; }
.feature p { font-size: 14px; line-height: 1.85; opacity: .75; margin: 10px 0 0; }
.feature .no { font-family: Fredoka, sans-serif; font-size: 13px; opacity: .5; }
.demo { margin-top: auto; padding-top: 22px; }

/* 見本①：ゲージの上の友達 */
.mini { position: relative; height: 64px; }
.mini .track { top: 30px; }
.mini .face { top: 8px; }
.me { position: absolute; top: 4px; width: 46px; height: 46px; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-3px); } }
.mini-label { font-size: 11px; font-weight: 900; opacity: .55; margin: 0 0 4px; }

/* 見本④：人生を変えた5冊（背表紙が棚に立つ） */
.life5 { display: flex; align-items: flex-end; gap: 8px; padding-bottom: 6px; border-bottom: 3px solid var(--ink); }
.life5 .sp { width: 40px; border: 2.5px solid var(--ink); border-radius: 6px; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: flex-start; padding: 10px 0; font-size: 12px; font-weight: 900; letter-spacing: 1px; transform-origin: 50% 100%; }

/* 見本②：+10 */
.widget { border: 3px solid var(--ink); border-radius: 22px; padding: 14px; background: var(--cream); }
.widget .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.widget .title { font-size: 12px; font-weight: 900; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget .page { font-size: 30px; }
.widget .page small { font-size: 14px; opacity: .5; }
.widget .mini { height: 52px; }
.widget .mini .track { top: 22px; }
.widget .me { top: 2px; width: 40px; height: 40px; transition: left .6s cubic-bezier(.34, 1.56, .64, 1); }
.widget .fill { transition: width .6s cubic-bezier(.34, 1.56, .64, 1); }
.widget .me.pop { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }
/* 顔をつかんで動かす。つかんでいる間はばねを止めて指に付いてくる */
.widget .drag { touch-action: pan-y; }
.widget .drag .me { cursor: grab; z-index: 2; }
.widget .drag .me:active { cursor: grabbing; }
.widget .drag.dragging .me { transition: none; transform: scale(1.1); }
.widget .drag.dragging .fill { transition: none; }
.widget .drag .friend { top: 4px; transform: scale(.85); }
.widget .drag .friend.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: scale(.85) rotate(-10deg); } 40%, 80% { transform: scale(.85) rotate(10deg); } }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.btns { display: flex; gap: 8px; margin-top: 8px; }
.btn { flex: 1; font: inherit; font-size: 15px; font-weight: 900; color: var(--ink); background: var(--white); border: 2.5px solid var(--ink); border-radius: 999px; padding: 10px 0; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.main { background: var(--pink-s); flex: 1.6; }
.toast { font-size: 12px; font-weight: 900; text-align: center; height: 18px; margin-top: 8px; opacity: 0; transition: opacity .3s; }
.toast.on { opacity: .8; }

/* 見本③：積読 */
.shelf { display: flex; align-items: flex-end; gap: 16px; }
.shelf .stack .bk { height: 26px; font-size: 11px; transition: transform .7s cubic-bezier(.65, 0, .35, 1), opacity .7s; }
.shelf .stack .bk.gone { transform: translate(-30px, -120px) rotate(-90deg) scale(.5); opacity: 0; }
.shelf .count b { font-size: 34px; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.shelf .count b.bump { transform: scale(1.3); }

/* ── 通知は2つだけ ─────────────────────── */
.notes { display: grid; gap: 14px; margin-top: 36px; max-width: 520px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 22px; background: rgba(255, 255, 255, .85); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--lavender); }
.note img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.note .meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .55; }
.note .body { font-size: 14px; line-height: 1.6; margin-top: 2px; }
.quiet { font-size: 13px; opacity: .6; margin-top: 18px; }

/* ── おしまい ─────────────────────────── */
.final { position: relative; overflow: hidden; text-align: center; padding: 96px 0 72px; }
.final .blobs { -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.final h2 { font-size: clamp(36px, 8vw, 60px); }
.final .badges { justify-content: center; }
footer { border-top: 3px solid var(--ink); padding: 28px 0 40px; font-size: 13px; }
/* つくっている会社のキャラ「メカブ」。フッターの線の上に座っている */
footer .maker { position: relative; display: inline-flex; align-items: center; opacity: 1; }
footer .mechab { position: absolute; left: -6px; bottom: calc(100% + 13px); width: 72px; height: 72px; transform-origin: 50% 100%; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
footer .maker:hover .mechab { transform: translateY(-4px) rotate(-6deg); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 18px; }
footer a { text-decoration: none; opacity: .7; }

/* 出てくるとき */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.34, 1.3, .64, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 880px) {
  .hero { padding-bottom: 96px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .stage { zoom: 1.15; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .me { animation: none; }
  .widget .me, .widget .fill, .shelf .stack .bk { transition: none; }
}
