/* =========================================================
   areko ランディングページ — 本番用スタイルシート
   完全モノクロ（差し色なし）。ライト／ダーク自動対応。
   ========================================================= */

:root {
  /* 色（インク階調・面・罫線） */
  --ink: #1a1a19;
  --ink-2: #55534e;
  --ink-3: #8a877f;
  --paper: #faf9f6;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --line: #e6e3dc;
  --line-2: #d8d4cb;
  --on-ink: #faf9f6;

  /* 文字 */
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* タイプスケール */
  --fs-hero: clamp(32px, 6vw, 58px);
  --fs-h2: clamp(24px, 4vw, 36px);
  --fs-h3: 20px;
  --fs-body: 17px;
  --fs-small: 14px;
  --lh-body: 1.8;
  --lh-tight: 1.22;

  /* レイアウト */
  --max: 1080px;
  --gap: 20px;
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 14px;
  --radius-lg: 22px;
  --border: 1px solid var(--line);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 30px 70px rgba(0, 0, 0, .12);
}

/* ダーク配色。手動トグル対応：システム設定(prefers)は data-theme 未指定時のみ適用し、
   ユーザーが明示選択した data-theme を常に優先させる。 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #f2f2f0;
    --ink-2: #b8b6b0;
    --ink-3: #85837d;
    --paper: #121316;
    --surface: #1b1c1f;
    --surface-2: #232428;
    --line: #2c2e33;
    --line-2: #3a3d43;
    --on-ink: #121316;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 80px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --ink: #f2f2f0;
  --ink-2: #b8b6b0;
  --ink-3: #85837d;
  --paper: #121316;
  --surface: #1b1c1f;
  --surface-2: #232428;
  --line: #2c2e33;
  --line-2: #3a3d43;
  --on-ink: #121316;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .5), 0 30px 80px rgba(0, 0, 0, .7);
}

/* ---------- ベース ---------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

.page {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

.wrap { max-width: var(--max); margin: 0 auto; }

.eyebrow {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin: 0 0 14px;
}

.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: .005em;
  margin: 0;
}

.lead {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
}

.section-head { max-width: 720px; margin: 0 auto; text-align: center; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .2s ease, border-color .2s ease, background .2s ease;
}
.btn svg { flex: none; }
.btn-primary { background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink); }
.btn-primary:hover { opacity: .9; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); padding: 14px 22px; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-invert { background: var(--on-ink); color: var(--ink); border: 1px solid var(--on-ink); padding: 14px 26px; }
.btn-invert:hover { opacity: .9; }

/* ---------- ヘッダー / ナビ ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: var(--border);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.brand-name { font-weight: 800; font-size: 21px; letter-spacing: .02em; }
.spacer { flex: 1; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; transition: color .2s ease; }
.nav a:hover { color: var(--ink); }

/* ---------- ヒーロー ---------- */
.hero { padding: clamp(56px, 8vw, 104px) 24px var(--section-y); }
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 460px; min-width: 300px; }
.hero-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: inline-block;
  margin: 0 0 22px;
}
.hero-h1 {
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: .005em;
  font-weight: 800;
  margin: 0 0 20px;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 32px;
  max-width: 44ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin: 22px 0 0; font-size: 13px; color: var(--ink-3); }
.hero-device { flex: 0 0 auto; display: flex; justify-content: center; align-self: center; }

/* ---------- iPhone フレーム ---------- */
.phone {
  position: relative;
  border-radius: 52px;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}
.phone-hero { width: 296px; height: 606px; padding: 12px; }
.phone-study { width: 264px; height: 540px; padding: 11px; border-radius: 46px; }
.phone-wb { width: 236px; height: 496px; padding: 10px; border-radius: 44px; flex: 0 0 auto; }
.notch {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 104px; height: 30px;
  border-radius: 16px;
  background: #000;
  z-index: 3;
}
.notch-study { top: 24px; width: 92px; height: 26px; border-radius: 14px; }
.notch-wb { top: 22px; width: 84px; height: 24px; border-radius: 13px; }
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 41px;
  overflow: hidden;
  background: var(--surface-2);
}
.phone-study .phone-screen { border-radius: 36px; }
.phone-wb .phone-screen { border-radius: 35px; background: var(--surface); display: flex; flex-direction: column; }

/* 空のスクリーン（スクリーンショット差し込み用プレースホルダ） */
.screen-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-3);
  text-align: center;
  padding: 24px;
}
.screen-placeholder img { width: 46px; height: 46px; border-radius: 11px; opacity: .5; }
.screen-placeholder span { font-size: 12px; font-weight: 600; letter-spacing: .02em; }

/* ---------- 汎用セクション ---------- */
.section { padding: var(--section-y) 24px; }
.section-surface { background: var(--surface); border-block: var(--border); }

/* ---------- 使い方 ---------- */
.notice {
  max-width: 660px;
  margin: 28px auto 0;
  display: flex;
  gap: 13px;
  align-items: flex-start;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.notice > svg { flex: none; color: var(--ink); margin-top: 1px; }
.notice p { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.notice strong { color: var(--ink); font-weight: 800; }
.notice strong.mid { font-weight: 700; }
.notice-reasons { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.notice-reasons-title { font-size: 12px; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; margin-bottom: 8px; }
.notice-reasons ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.notice-reasons li:first-child { margin-bottom: 5px; }
.notice-ref { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }

/* ステップレール */
.rail { margin: 52px auto 0; max-width: 720px; display: flex; gap: 8px; align-items: flex-start; }
.rail-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 1 1 0;
  min-width: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink-3);
  transition: color .4s ease;
}
.rail-badge {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  transition: background .4s, color .4s, border-color .4s;
}
.rail-label { font-size: 12.5px; font-weight: 700; line-height: 1.35; text-align: center; }
.rail-bar {
  width: 70%; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .5s ease;
}
.rail-step.is-active { color: var(--ink); }
.rail-step.is-active .rail-badge { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.rail-step.is-active .rail-bar { transform: scaleX(1); }

/* ステージ */
.stage {
  position: relative;
  margin: 24px auto 0;
  max-width: 720px;
  min-height: 420px;
  border: var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transform: translateY(10px) scale(.99);
  pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
}
.scene.is-active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.scene-col { flex-direction: column; gap: 16px; }
.stage-hint { text-align: center; color: var(--ink-3); font-size: 13px; margin: 18px 0 0; }

/* シーン1: プリント */
.paper-shot {
  position: relative;
  width: min(560px, 94%);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e6e3dc;
  box-shadow: var(--shadow);
  background: #ffffff;
}
.paper-shot img { display: block; width: 100%; height: auto; }
.scan {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 40px;
  background: linear-gradient(#1a1a19, transparent);
  opacity: .12;
  animation: arekoScan 2.8s ease-in-out infinite;
  pointer-events: none;
}

/* シーン2: チャット */
.chat { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: left; }
.bubble-me {
  align-self: flex-end;
  max-width: 90%;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 16px 16px 4px 16px;
  padding: 14px 16px;
}
.bubble-me .who { font-size: 11.5px; opacity: .65; margin-bottom: 11px; font-weight: 600; }
.chip-prompt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: color-mix(in srgb, var(--on-ink) 18%, transparent);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}
.chip-file {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--on-ink) 13%, transparent);
  border-radius: 8px;
  padding: 9px 11px;
}
.chip-file svg { flex: none; opacity: .85; }
.chip-file span { font-size: 13px; }
.bubble-ai {
  align-self: flex-start;
  max-width: 82%;
  background: var(--surface-2);
  border: var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.bubble-ai span.txt { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.dots { display: inline-flex; gap: 5px; }
.dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: arekoDot 1.2s infinite;
}
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }

/* シーン3: JSON */
.json-card {
  width: min(470px, 100%);
  background: var(--surface-2);
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  text-align: left;
}
.json-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-bottom: 13px; }
.json-body { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.json-body .jline { opacity: 0; white-space: pre; }
.json-body .k { color: var(--ink); font-weight: 600; }
.json-body .p { color: var(--ink-3); }
.caret {
  display: inline-block;
  width: 7px; height: 14px;
  margin-left: 2px;
  background: var(--ink-2);
  vertical-align: -2px;
  animation: arekoCaret 1s step-end infinite;
}

/* シーン4: 取り込み結果カード */
.result-stack { position: relative; width: min(320px, 100%); }
.result-stack .sheet {
  position: absolute;
  inset: 0;
  border: var(--border);
  border-radius: var(--radius);
}
.result-stack .sheet.s1 { transform: translate(9px, 9px); background: var(--surface-2); }
.result-stack .sheet.s2 { transform: translate(4.5px, 4.5px); background: var(--paper); }
.result-card {
  position: relative;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  text-align: left;
}
.result-meta { font-size: 11.5px; color: var(--ink-3); font-weight: 700; margin-bottom: 14px; }
.result-card ruby { font-size: 29px; font-weight: 800; ruby-position: over; }
.result-card rt { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.choice {
  border: var(--border);
  color: var(--ink-3);
  border-radius: var(--radius);
  padding: 9px 10px;
  font-size: 13px;
  text-align: center;
}
.choice.correct { border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; }
.result-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
  border: var(--border);
  border-radius: 999px;
  padding: 8px 16px;
}

/* ---------- 単語帳の取り込み ---------- */
.wb-row {
  margin: 52px auto 0;
  max-width: 860px;
  display: flex;
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.wb-paper {
  position: relative;
  width: min(280px, 80%);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e6e3dc;
  box-shadow: var(--shadow);
  background: #ffffff;
  transform: rotate(-1.4deg);
}
.wb-paper img { display: block; width: 100%; height: auto; }
.wb-paper .scan { animation-name: wbScan; opacity: .1; }
.wb-transfer { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-3); }
.wb-arrows { display: flex; align-items: center; gap: 3px; }
.wb-arrows svg { animation: wbFlow 1.4s infinite; }
.wb-arrows svg:nth-child(2) { animation-delay: .18s; }
.wb-arrows svg:nth-child(3) { animation-delay: .36s; }
.wb-transfer span { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
.wb-head { padding: 46px 18px 12px; border-bottom: var(--border); }
.wb-head .kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.wb-head .title { font-size: 19px; font-weight: 800; margin-top: 5px; }
.wb-head .meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.wb-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.wb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  animation: wbIn 6s ease-in-out infinite;
}
.wb-item:nth-child(1) { animation-delay: 0s; }
.wb-item:nth-child(2) { animation-delay: .4s; }
.wb-item:nth-child(3) { animation-delay: .8s; }
.wb-item:nth-child(4) { animation-delay: 1.2s; }
.wb-item:nth-child(5) { animation-delay: 1.6s; }
.wb-item .en { font-weight: 800; font-size: 16px; }
.wb-item .ipa { font-size: 11px; color: var(--ink-3); }
.wb-item .ja { font-size: 13px; color: var(--ink-2); font-weight: 600; }

/* ---------- 学習モード ---------- */
.study-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
  flex-wrap: wrap;
}
.study-text { flex: 1 1 380px; min-width: 300px; }
.study-text .h2 { margin-bottom: 28px; }
.mode-list { display: grid; gap: 14px; }
.mode {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: var(--border);
}
.mode:last-child { border-bottom: var(--border); }
.mode .num { flex: 0 0 auto; font-weight: 800; font-size: 15px; color: var(--ink-3); width: 24px; }
.mode h3 { margin: 0 0 4px; font-size: var(--fs-h3); font-weight: 700; }
.mode p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.7; }
.study-device { flex: 0 0 auto; margin: 0 auto; }

/* ---------- 機能 ---------- */
.feature-grid {
  margin: 52px 0 0;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.feature {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: var(--fs-h3); font-weight: 700; }
.feature p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.7; }

/* ---------- 料金 ---------- */
.price-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.price-inner .h2 { margin: 0 0 16px; }
.price-lead { color: var(--ink-2); margin: 0 auto 32px; font-size: 17px; line-height: 1.75; max-width: 48ch; }
.price-card {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  min-width: min(420px, 100%);
  box-shadow: var(--shadow);
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: var(--border);
}
.price-row:last-child { border-bottom: none; }
.price-row > span:first-child { font-weight: 600; }
.price-row .muted { color: var(--ink-2); font-size: var(--fs-small); }
.price-amount { color: var(--ink); font-weight: 800; }
.price-amount .yen { font-size: 22px; }
.price-amount .per { color: var(--ink-3); font-weight: 600; font-size: var(--fs-small); }
.price-fine { margin: 16px auto 0; max-width: 46ch; font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.price-cta { margin: 34px 0 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-head { text-align: center; margin: 0 0 44px; }
.faq-list { border-top: var(--border); }
.faq-item { border-bottom: var(--border); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  font-weight: 600;
  font-size: 17px;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .mark { color: var(--ink-3); font-size: 22px; font-weight: 400; transition: transform .25s ease; }
.faq-item[open] .mark { transform: rotate(45deg); }
.faq-item p { margin: 0; padding: 0 4px 24px; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.8; }

/* ---------- フッター CTA ---------- */
.cta {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 72px) 32px;
  text-align: center;
}
.cta-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: var(--shadow); display: inline-block; margin: 0 0 22px; }
.cta .h2 { margin: 0 0 16px; }
.cta p { margin: 0 auto 30px; max-width: 40ch; font-size: 17px; line-height: 1.7; opacity: .75; }

/* ---------- フッター ---------- */
.footer { border-top: var(--border); padding: 36px 24px; }
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--ink-3);
  font-size: var(--fs-small);
}
.footer-brand { display: inline-flex; align-items: center; gap: 9px; }
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); display: block; }
.footer-brand strong { color: var(--ink); font-weight: 800; font-size: 17px; }
.footer a { color: var(--ink-2); text-decoration: none; transition: color .2s ease; }
.footer a:hover { color: var(--ink); }

/* ---------- スクロール入場アニメ ---------- */
.reveal { opacity: 0; transform: translateY(16px); will-change: opacity, transform; }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
}

/* ---------- キーフレーム ---------- */
@keyframes arekoScan {
  0% { transform: translateY(-40px); opacity: 0; }
  12% { opacity: .5; }
  88% { opacity: .5; }
  100% { transform: translateY(210px); opacity: 0; }
}
@keyframes arekoDot {
  0%, 100% { opacity: .22; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
@keyframes arekoCaret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes wbScan {
  0% { transform: translateY(-40px); opacity: 0; }
  12% { opacity: .5; }
  88% { opacity: .5; }
  100% { transform: translateY(370px); opacity: 0; }
}
@keyframes wbIn {
  0% { opacity: 0; transform: translateX(16px); }
  8% { opacity: 1; transform: none; }
  90% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(16px); }
}
@keyframes wbFlow {
  0%, 100% { opacity: .2; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .scan, .dots i, .caret, .wb-item, .wb-arrows svg { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- テーマ切替トグル ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; margin-left: 4px;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
/* 既定（ライト）は月＝「ダークにする」、ダーク時は太陽＝「ライトにする」を表示 */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}
