/* 採点カメラの LP。色は会社のブランド（先生の青・生徒の赤）とアプリの画面の色 */
:root {
  --ink: #1f2430;
  --sub: #5b6472;
  --line: #e3e1da;
  --bg: #ffffff;
  --tint: #f6f5f1;       /* アプリの画面の地の色 */
  --blue: #4059a7;       /* 先生の青・保留の青 */
  --red: #e95239;        /* 生徒の赤・丸つけの赤 */
  --draft-ink: #6b4e00;
  --draft-bg: #fff8e6;
  --draft-line: #e8c879;
  --font: "Noto Sans JP", sans-serif;
  --num: "Outfit", "Noto Sans JP", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.85; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
p { text-wrap: pretty; }
ul { list-style: none; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 80px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 下書きの表示（ほかのページの .draft と同じ色） */
.draft-bar { font-size: 13px; line-height: 1.6; color: var(--draft-ink); background: var(--draft-bg); border-bottom: 1px solid var(--draft-line); padding: 8px 24px; text-align: center; }
.draft { font-size: 14px; color: var(--draft-ink); background: var(--draft-bg); border: 1px solid var(--draft-line); border-radius: 12px; padding: 12px 16px; margin: 0 0 24px; }

/* ナビ */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 64px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; }
.nav-brand img { width: 136px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.15s ease; }
.nav-links a:hover { background: var(--tint); }
.chip { flex: none; font-size: 12px; font-weight: 700; color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; padding: 3px 12px; line-height: 1.6; white-space: nowrap; }

/* ヒーロー */
.hero { background: var(--tint); padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 64px; }
.hero-icon { width: 72px; height: 72px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 20px; }
h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); font-weight: 900; line-height: 1.2; letter-spacing: 0.02em; }
.hero-lead { margin-top: 20px; font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-weight: 500; line-height: 1.8; max-width: 24em; text-wrap: balance; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--sub); max-width: 30em; text-wrap: balance; }
.hero-demo { display: flex; flex-direction: column; align-items: center; gap: 20px; }

/* 端末の枠（中身はアプリの画面の写しと写真） */
.phone { position: relative; width: min(320px, 76vw); border: 9px solid #1c1e24; border-radius: 42px; background: var(--tint); overflow: hidden; box-shadow: 0 28px 56px -24px rgba(31, 36, 48, 0.35); }
.phone img { width: 100%; }
.phone-top { height: 22px; background: var(--tint); }
.phone-bottom { height: 28px; }
.phone-tall { aspect-ratio: 1 / 1.95; display: flex; flex-direction: column; }
.phone-s { width: min(240px, 42vw); border-width: 7px; border-radius: 32px; }
.head { position: relative; }
.head img + img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; }
.head.counted img + img { opacity: 1; }
.stage { position: relative; aspect-ratio: 402 / 536; margin-bottom: 44px; }
.stage .sheet { position: absolute; inset: 0 0 auto 0; opacity: 0; transition: opacity 0.25s ease; }
.stage .sheet.on { opacity: 1; }
.stage svg, .sheet-card svg { position: absolute; left: 0; top: 0; width: 100%; height: auto; overflow: visible; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.go { animation: flash 0.32s ease-out; }
@keyframes flash { from { opacity: 0.85; } to { opacity: 0; } }

/* 丸つけの印: 線を伸ばして描く（アプリと同じ 240ms） */
.mk { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mk-line { transition: stroke-dashoffset 0.24s cubic-bezier(0.5, 1, 0.89, 1); }
.mk-fade { opacity: 0; transition: opacity 0.24s linear; }
.mk-fade.on { opacity: 1; }
.no-anim .mk-line, .no-anim .mk-fade { transition: none; }

/* 切りかえ（アプリのタブと同じ形） */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; background: #eae8e1; border-radius: 14px; }
.tabs button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--sub); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); }

/* セクション */
.section { padding: 104px 0; }
.tint { background: var(--tint); }
.title { font-size: clamp(1.6rem, 3.6vw, 2.25rem); font-weight: 900; line-height: 1.4; margin-bottom: 20px; }
.lead { max-width: 40em; margin-bottom: 40px; }
.small { font-size: 13px; color: var(--sub); }
.more { margin-top: 24px; }
.more a, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.split-text p + p { margin-top: 12px; }
.split-media { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.split.reverse .split-text { order: 2; }
.pair { flex-direction: row; align-items: flex-start; justify-content: center; gap: 20px; }
.pair .phone:last-child { margin-top: 48px; }

/* 印の一覧 */
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.legend li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.legend svg { width: 120px; margin-bottom: 8px; overflow: visible; }
.legend h3 { font-size: 18px; font-weight: 700; }
.legend p { font-size: 14px; line-height: 1.7; color: var(--sub); margin-top: 6px; }
.js .m-draw { stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; transition: stroke-dashoffset 0.5s cubic-bezier(0.5, 1, 0.89, 1) 0.25s, opacity 0s linear 0.25s; }
.js .visible .m-draw { stroke-dashoffset: 0; opacity: 1; }
.js .m-fade { opacity: 0; transition: opacity 0.5s ease 0.25s; }
.js .visible .m-fade { opacity: 1; }
.visible .m-float { animation: float 3.2s ease-in-out 0.8s infinite; transform-origin: 60px 40px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; max-width: 920px; }

/* 解き方のパネル */
.stage-q11 { aspect-ratio: auto; margin-bottom: 0; flex: none; }
.panel { flex: 1; min-height: 0; overflow: hidden; background: #fff; border-radius: 18px 18px 0 0; margin-top: 12px; border-top: 1px solid var(--line); }
.panel-inner { transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.js .panel .step { opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease; }
.js .panel .step.on { opacity: 1; transform: none; }
.replay { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--blue); cursor: pointer; transition: transform 0.15s ease; }
.replay:active { transform: scale(0.94); }
.replay svg { width: 22px; height: 22px; }

/* 解き直しの前とあと */

/* ふりかえりのカード */
.cards { flex: 1; min-height: 0; overflow: hidden; }
.cards img { margin-bottom: 3%; }
.js .card-in { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.js .card-in.on { opacity: 1; transform: none; }

/* 撮れるプリント */
.sheets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 28px 16px; align-items: start; }
.sheets h3 { font-size: 13px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; white-space: nowrap; }
.sheets h3 span { color: var(--sub); font-weight: 500; margin-right: 4px; }
.sheet-card { position: relative; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }

/* iPad */
.tablet { max-width: 880px; margin: 0 auto; border: 12px solid #1c1e24; border-radius: 30px; overflow: hidden; box-shadow: 0 28px 56px -24px rgba(31, 36, 48, 0.35); }

/* 撮るときの機能・データ・プラン */
.tiles, .plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tiles li, .plans li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.tiles svg { width: 40px; height: 40px; color: var(--blue); margin-bottom: 12px; }
.tiles h3 { font-size: 18px; font-weight: 700; }
.tiles p { font-size: 14px; line-height: 1.8; color: var(--sub); margin-top: 6px; }
.rows { border-top: 1px solid var(--line); max-width: 920px; }
.rows li { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.rows h3 { font-size: 16px; font-weight: 700; }
.rows p { font-size: 15px; }
.plans h3 { font-size: 20px; font-weight: 700; line-height: 1.4; }
.plans b { font-family: var(--num); font-weight: 700; font-size: 1.6em; letter-spacing: 0.01em; }
.plans .count { font-size: 16px; font-weight: 500; margin-top: 4px; }
.plans .year { font-size: 14px; color: var(--sub); margin-top: 8px; }
.plans .extra { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; padding: 2px 12px; }
.plans .caution { font-size: 12px; line-height: 1.7; color: var(--sub); margin-top: 10px; }
.plans + .small { margin-top: 16px; }

/* 公開の予定 */
.release { text-align: center; }
.release img { width: 88px; height: 88px; border-radius: 20px; border: 1px solid var(--line); margin: 0 auto 20px; }
.release-links { margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 2px solid var(--blue); border-radius: 999px; color: var(--blue); background: #fff; font-weight: 700; text-decoration: none; transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.btn:hover { background: var(--blue); color: #fff; }
.btn:active { transform: scale(0.97); }

/* 動画の枠（16:9。動画を入れるときに使う） */
.movie-frame { aspect-ratio: 16 / 9; max-width: 960px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #1c1e24; border: 1px solid var(--line); }
.movie-frame video { width: 100%; height: 100%; display: block; }

/* フッター */
.footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 13px; color: var(--sub); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer img { width: 160px; margin-bottom: 12px; }
.footer-links { display: flex; gap: 8px 28px; flex-wrap: wrap; }
.copy { text-align: center; margin-top: 32px; font-size: 12px; }

/* スクロールで現れる */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .sheets { grid-template-columns: repeat(4, 1fr); }
  .legend { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 40px; }
  .split { gap: 40px; }
}

@media (max-width: 767px) {
  .wrap { padding: 0 20px; }
  .nav { padding: 0 16px; gap: 12px; height: 56px; }
  .nav-links { display: none; }
  .nav-brand img { width: 112px; }
  .chip { margin-left: auto; }
  .hero { padding: 40px 0 56px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-icon { width: 56px; height: 56px; border-radius: 13px; margin-bottom: 12px; }
  .section { padding: 64px 0; }
  .split.reverse .split-text { order: 0; }
  .facts { grid-template-columns: 1fr; }
  .sheets { grid-template-columns: repeat(3, 1fr); gap: 20px 10px; }
  .sheets h3 { font-size: 12px; }
  .tiles, .plans { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; gap: 4px; }
  .tablet { border-width: 7px; border-radius: 18px; }
  .pair { gap: 12px; }
  .pair .phone:last-child { margin-top: 32px; }
  .legend li { padding: 16px; }
  .legend svg { width: 96px; }
  .tabs { flex-wrap: nowrap; }
  .tabs button { padding: 0 10px; font-size: 13px; white-space: nowrap; }
}

/* 動きを減らす設定では動かさない */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .card-in, .js .panel .step { opacity: 1; transform: none; }
  .js .m-draw { stroke-dashoffset: 0; opacity: 1; }
  .js .m-fade { opacity: 1; }
  .panel { overflow-y: auto; }
}
