/* =========================================================
   WHY3K PLUGINS — 共通スタイル
   世界観カラー：白  / ミニマル・余白基調
   ========================================================= */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f6f6f7;
  --bg-dark:   #0d0d0f;
  --ink:       #111114;
  --ink-soft:  #6b6b73;
  --line:      #e6e6ea;
  --accent:    #111114;   /* ボタン等の主色（モノクロ） */
  --accent-ink:#ffffff;
  --radius:    14px;
  --maxw:      1080px;
  --mono: "SFMono-Regular", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN",
          "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

/* タップ/クリック時の青い矩形ハイライトを廃止し、
   キーボード操作時のみ上品なフォーカスリングを出す */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid rgba(17,17,20,.4);
  outline-offset: 3px;
  border-radius: 8px;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 800;
  letter-spacing: .28em;
  text-decoration: none;
  font-size: 15px;
}
.logo span { color: var(--ink-soft); font-weight: 500; letter-spacing: .1em; }
.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  margin-left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a:active { color: var(--ink); background: #eaeaef; }
.nav .home-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ink);
}
.nav .home-link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.nav .lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: .08em;
}
.nav .lang-switch:hover { border-color: #d5d5db; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s, box-shadow .15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn small { font-weight: 400; opacity: .7; }

/* ---------- ヒーロー ---------- */
.hero { padding: 84px 0 64px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 18px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 30px;
  max-width: 30em;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--ink-soft); }

/* ---------- タイマー・ビジュアル（実機の別ウィンドウ "disp" を再現） ---------- */
.device {
  background: #0b0b0d;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.6);
  border: 1px solid #26262c;
}
.device .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  background: #1b1b20;
  border-bottom: 1px solid #000;
}
.device .titlebar .dots { display: flex; gap: 6px; }
.device .titlebar .dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: #3a3a42; display: block;
}
.device .titlebar .win-title {
  flex: 1;
  text-align: center;
  color: #8a8a95;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  margin-right: 39px; /* 左のドット幅ぶんを相殺して中央寄せ */
}
.device .readout {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;   /* 桁を揃えつつ、スラッシュ無しの普通のゼロに */
  font-weight: 700;
  color: #33d15e;
  font-size: clamp(32px, 6.4vw, 52px);
  letter-spacing: .04em;
  text-align: center;
  padding: 36px 20px;
  text-shadow: 0 0 18px rgba(51,209,94,.45);
}
.device .readout .ms { color: #1f8f42; }

/* ---------- セクション共通 ---------- */
section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- 機能グリッド ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.2); border-color: #d5d5db; }
.card .ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 20px; margin-bottom: 16px;
}
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* ---------- プラグイン一覧カード（トップ） ---------- */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.plugin-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.plugin-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(0,0,0,.28); border-color: #d5d5db; }
.plugin-card .thumb {
  background: var(--bg-dark);
  padding: 34px 22px;
}
.plugin-card .thumb .readout {
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-weight: 700; color: #33d15e;
  font-size: 30px; text-align: center; letter-spacing: .04em;
  text-shadow: 0 0 14px rgba(51,209,94,.40);
}
.plugin-card .thumb .readout .ms { color: #1f8f42; }
.plugin-card .body { padding: 20px 22px 24px; }
.plugin-card .tag {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.plugin-card h3 { margin: 6px 0 6px; font-size: 20px; }
.plugin-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14.5px; }
.plugin-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--ink-soft);
}
.plugin-card .price { font-weight: 700; color: var(--ink); letter-spacing: .04em; }
.plugin-card .arrow { font-weight: 700; }

/* ---------- 詳細ページ本文 ---------- */
.doc { max-width: 760px; margin: 0 auto; }
.doc h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -.01em; }
.doc h3 { font-size: 18px; margin: 30px 0 8px; }
.doc p  { color: #333; }
.doc ul, .doc ol { color: #333; padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc .note {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14.5px;
}
.doc .note strong { display:block; margin-bottom: 4px; }

/* 動作環境テーブル */
.spec {
  width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px;
}
.spec th, .spec td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 34%; color: var(--ink-soft); font-weight: 600; }

/* 強調アラート（セッションビュー専用など） */
.alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff5f4;
  border: 1px solid #f2c9c6;
  border-left: 4px solid #d8433a;
  border-radius: 12px;
  padding: 16px 18px;
}
.alert .mark { font-size: 22px; line-height: 1.25; }
.alert .body strong {
  display: block;
  color: #c1322a;
  font-size: 15.5px;
  margin-bottom: 2px;
}
.alert .body p { margin: 0; color: #7a3b37; font-size: 14px; }

/* ヒーロー直下に置く警告帯 */
.alert-band { margin: -28px 0 8px; }

/* インライン注意バッジ */
.badge-warn {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #c1322a;
  background: #fdeceb;
  border: 1px solid #f2c9c6;
  border-radius: 999px;
  padding: 3px 10px;
}

/* パンくず */
.crumb { font-size: 13px; color: var(--ink-soft); padding: 22px 24px 0; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ダウンロード帯 */
.download-band {
  background: var(--bg-dark);
  color: #fff;
  border-radius: 20px;
  padding: 42px 36px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin: 28px auto;
}
.download-band h3 { margin: 0 0 6px; font-size: 22px; }
.download-band p { margin: 0; color: #a9a9b3; font-size: 14px; }
.download-band .btn-primary { background:#fff; color:#111; }
.download-band .btn-primary:hover { box-shadow: 0 8px 22px rgba(255,255,255,.18); }

/* ---------- フッター ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.site-footer .wrap { display:flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* =========================================================
   スクロール演出（reveal / stagger / header）
   ・transform と opacity のみをアニメ＝軽くヌルヌル
   ・動きが苦手な人向けに prefers-reduced-motion で自動オフ
   ========================================================= */

/* ヘッダー：スクロールで締まる */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header .wrap { transition: height .25s ease; }
.site-header.scrolled { background: rgba(255,255,255,.9); box-shadow: 0 8px 30px -22px rgba(0,0,0,.35); }
.site-header.scrolled .wrap { height: 56px; }

@media (prefers-reduced-motion: no-preference) {
  /* 単体リビール：下からフワッ */
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.2,.65,.3,1),
                transform .8s cubic-bezier(.2,.65,.3,1);
    will-change: opacity, transform;
  }
  .reveal.in { opacity: 1; transform: none; }

  /* 横から出す（ヒーローのパネル用） */
  .reveal[data-reveal="right"] { transform: translateX(48px) translateY(10px); }
  .reveal[data-reveal="right"].in { transform: none; }

  /* まとめて子要素を順番に立ち上げる（stagger） */
  .stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s ease, transform .65s cubic-bezier(.2,.65,.3,1);
    will-change: opacity, transform;
  }
  .stagger.in > * { opacity: 1; transform: none; }
  .stagger.in > *:nth-child(1) { transition-delay: .00s; }
  .stagger.in > *:nth-child(2) { transition-delay: .08s; }
  .stagger.in > *:nth-child(3) { transition-delay: .16s; }
  .stagger.in > *:nth-child(4) { transition-delay: .24s; }
  .stagger.in > *:nth-child(5) { transition-delay: .32s; }
  .stagger.in > *:nth-child(6) { transition-delay: .40s; }
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  section { padding: 56px 0; }
  .download-band { flex-direction: column; align-items: flex-start; }
}

/* スマホ幅：ヘッダーが窮屈にならないように */
@media (max-width: 560px) {
  .site-header .wrap { height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 2px; }
  .site-header.scrolled .wrap { height: auto; }
  .logo { letter-spacing: .2em; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .nav a { margin-left: 0; font-size: 13px; }
  .hero-cta .btn { padding: 12px 18px; font-size: 14px; }
}


/* ---------- 戻る/進むボタン（メインサイトと同じ位置・見た目） ---------- */
.hist { position: fixed; top: 15px; right: 42px; z-index: 60; display: flex; gap: 8px; }
.hist .hb {
  display: flex; align-items: center; justify-content: center;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px; line-height: 1;
  color: var(--ink); background: none; border: none;
  cursor: pointer; padding: 6px 7px;
  touch-action: manipulation;
  transition: transform .15s, color .15s, opacity .15s;
}
@media (hover: hover) and (pointer: fine) {
  .hist .hb:hover:not(:disabled) { transform: translateX(-2px); }
  .hist .hb#histFwd:hover:not(:disabled) { transform: translateX(2px); }
}
.hist .hb:active { opacity: .4; }
.hist .hb:disabled { color: #d8d8de; cursor: default; pointer-events: none; }
/* ヘッダーのナビが←→の下に潜らないように（wrapの端が画面端に近い幅だけ） */
@media (max-width: 1260px) {
  .site-header .nav { padding-right: 84px; }
}


/* ---------- スマホヘッダーの圧縮（2段・詰め） ---------- */
@media (max-width: 640px) {
  .site-header .wrap { padding-top: 7px; padding-bottom: 7px; row-gap: 0; min-height: 0; }
  .site-header .logo { font-size: 13px; letter-spacing: .22em; }
  .site-header .nav { padding-right: 0; gap: 0 2px; }
  .site-header .nav a { font-size: 12px; padding: 3px 8px; margin-left: 0; }
  .site-header .nav .lang-switch { padding: 2px 8px; font-size: 11px; }
}


/* ---------- スマホ：矢印とナビの衝突回避＋タップ領域拡大 ---------- */
@media (max-width: 640px) {
  /* 矢印はヘッダー1段目の右端に「部品として」並べる（重なり原理的にゼロ） */
  .site-header .hist { position: static; order: 2; margin-left: auto; }
  .site-header .logo { order: 1; }
  .site-header .nav { order: 3; width: 100%; padding-right: 0; }
  .hist .hb { padding: 9px 11px; } /* 指で押しやすく */
  .site-header .wrap { row-gap: 0; }
  .site-header .nav a { font-size: 11px; padding: 3px 7px; }
  .site-header .nav .lang-switch { font-size: 10px; padding: 2px 7px; } /* ENを1行に収める */
}


/* ---------- 日本語の改行最適化 ---------- */
p, li { text-wrap: pretty; word-break: auto-phrase; }
h1, h2, h3 { text-wrap: balance; word-break: auto-phrase; }
.nb { display: inline-block; } /* この単位でしか改行しない */


/* ---------- 横スライド禁止 ---------- */
html, body { overflow-x: hidden; overflow-x: clip; overscroll-behavior-x: none; }
.device { max-width: 100%; min-width: 0; }
.hero-grid > * { min-width: 0; }
.device .readout { font-size: clamp(26px, 6.4vw, 52px); } /* 小画面でも枠内に収まる下限 */


/* ---------- ページ遷移：ホワイトアウト ---------- */
.warp {
  position: fixed; inset: 0; z-index: 999;
  background: #fbfbfa;
  opacity: 0; visibility: hidden;
  pointer-events: none;
}
.warp.in { visibility: visible; opacity: 1; transition: opacity .28s ease; }
.warp.cover { visibility: visible; opacity: 1; }
.warp.out { visibility: visible; opacity: 0 !important; transition: opacity .24s ease; }
