/* TIMOG 販売サイト 共通スタイル
   ・外部フレームワークなし。色はすべて :root のトークンで管理する
   ・ダークモードは prefers-color-scheme で切り替える */

:root {
  --bg: #faf8f4;
  --bg-soft: #f3f0e9;
  --card: #ffffff;
  --text: #1b2440;
  --muted: #5b6478;
  --line: #e4dfd5;
  --line-strong: #cfc8bb;

  /* アプリのプロジェクト色 */
  --blue: #4f7cf7;
  --orange: #f2994a;
  --green: #27ae60;
  --red: #eb5757;
  --gray: #c9ccd3;

  --ring: #f28a1e;          /* 押す場所を示すオレンジの輪 */
  --primary: #1b2440;       /* 主ボタン */
  --primary-text: #ffffff;
  --link: #3461d9;

  /* 模型（アプリ画面）の色 */
  --win-bg: #ffffff;
  --win-bar: #f1f0ee;
  --win-side: #f6f5f2;
  --win-line: #e3e1dc;
  --win-text: #222a3d;
  --win-muted: #8a90a0;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 36, 64, .06), 0 12px 32px -12px rgba(27, 36, 64, .18);
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b;
    --bg-soft: #161a23;
    --card: #1a1f2a;
    --text: #e9ebf1;
    --muted: #a0a7b8;
    --line: #2a3140;
    --line-strong: #3a4256;
    --gray: #4a5163;
    --primary: #e9ebf1;
    --primary-text: #11141b;
    --link: #8aa6ff;
    --win-bg: #1e222c;
    --win-bar: #272b36;
    --win-side: #232733;
    --win-line: #333949;
    --win-text: #e3e6ee;
    --win-muted: #8b92a5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { text-decoration: none; }
h1, h2, h3 { line-height: 1.35; letter-spacing: .01em; }
code, kbd { font-family: var(--mono); font-size: .92em; }
code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: .05em .4em; word-break: break-all; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand img, .brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand .brand-mark { display: inline-grid; place-items: center; background: var(--blue); color: #fff; font-size: .8rem; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-soft); }
.nav .btn { margin-left: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--primary-text); background: var(--primary); }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { opacity: .9; }
.btn-accent { background: var(--blue); color: #fff; }
.btn-accent:hover { opacity: .92; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.buy-error { color: var(--red); font-size: .9rem; margin: 8px 0 0; min-height: 1em; }

/* ---------- セクション ---------- */
section { padding: 72px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--blue)); }
.section-title { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin: 10px 0 12px; }
.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 8px; }

/* ---------- ヒーロー ---------- */
.hero { padding: 64px 0 56px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: 14px 0 18px; font-weight: 800; }
.hero h1 .hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--blue) 28%, transparent) 62%); }
.hero .lead { font-size: 1.12rem; max-width: 640px; }
.hero .btn-row { margin: 28px 0 10px; }
.hero-note { color: var(--muted); font-size: .85rem; margin: 0; }
.hero-visual { margin-top: 48px; }

/* ---------- 機能 2カラム ---------- */
.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.reverse > .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 10px 0 12px; }
.feature p { color: var(--muted); margin: 0 0 12px; }
.checks { list-style: none; padding: 0; margin: 14px 0 0; }
.checks li { position: relative; padding-left: 26px; margin: 6px 0; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature.reverse > .feature-text { order: 0; }
  .feature + .feature { margin-top: 64px; }
}

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 1.05rem; margin: 0 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ============================================================
   アプリ画面の模型（CSS で描く。画像は使わない）
   ============================================================ */
.mock {
  background: var(--win-bg); color: var(--win-text);
  border: 1px solid var(--win-line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden;
  font-size: 13px; line-height: 1.5;
  position: relative;
}
.mock-bar {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  background: var(--win-bar); border-bottom: 1px solid var(--win-line);
  font-size: 12px; color: var(--win-muted);
}
.mock-bar .dots { display: flex; gap: 6px; }
.mock-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: block; }
.mock-bar .dots i:nth-child(2) { background: #febc2e; }
.mock-bar .dots i:nth-child(3) { background: #28c840; }
.mock-bar .title { flex: 1; text-align: center; margin-right: 50px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-body { display: flex; min-height: 220px; }
.mock-side {
  width: 150px; flex: none; background: var(--win-side); border-right: 1px solid var(--win-line);
  padding: 12px 8px; display: flex; flex-direction: column; gap: 2px;
}
.mock-side span { padding: 5px 10px; border-radius: 6px; color: var(--win-muted); white-space: nowrap; }
.mock-side span.on { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--win-text); font-weight: 600; }
.mock-main { flex: 1; min-width: 0; padding: 14px 16px; }
.mock-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mock-h b { font-size: 15px; }
.mock-h small { color: var(--win-muted); }
@media (max-width: 560px) {
  /* スマホではサイドバーを上の横並びにする（輪の位置が消えないように） */
  .mock-body { flex-direction: column; }
  .mock-side { width: auto; flex-direction: row; flex-wrap: wrap; gap: 8px 4px; padding: 12px 10px; border-right: 0; border-bottom: 1px solid var(--win-line); }
  .mock-side span { padding: 3px 8px; }
  .mock-side span br { display: none; }
  .mock { font-size: 12px; }
}

/* タイムライン（1時間ごとの帯） */
.tl { display: grid; gap: 5px; }
.tl-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; }
.tl-row > em { font-style: normal; color: var(--win-muted); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.tl-bar { display: flex; height: 18px; border-radius: 5px; overflow: hidden; background: color-mix(in srgb, var(--win-line) 55%, transparent); position: relative; }
.tl-bar > i { display: block; height: 100%; }
.tl-bar > i + i { box-shadow: inset 1px 0 0 var(--win-bg); }
.c-blue { background: var(--blue); }
.c-orange { background: var(--orange); }
.c-green { background: var(--green); }
.c-red { background: var(--red); }
.c-gray { background: var(--gray); }
.c-empty { background: transparent; }
.c-manual { background: repeating-linear-gradient(135deg, var(--green) 0 6px, color-mix(in srgb, var(--green) 70%, #fff) 6px 12px); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--win-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--sw, var(--gray)); }

/* 小さな UI 部品（模型の中） */
.m-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: color-mix(in srgb, var(--sw, var(--blue)) 15%, transparent); color: var(--win-text); white-space: nowrap; }
.m-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sw, var(--blue)); }
.m-btn { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 6px; border: 1px solid var(--win-line); background: var(--win-bg); font-size: 12px; white-space: nowrap; color: var(--win-text); }
.m-btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.m-list { border: 1px solid var(--win-line); border-radius: 8px; overflow: hidden; }
.m-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--win-line); min-width: 0; }
.m-item:first-child { border-top: 0; }
.m-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-item .t { color: var(--win-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.m-ico { width: 20px; height: 20px; border-radius: 5px; flex: none; background: var(--sw, var(--gray)); display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.m-field { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--win-line); border-radius: 6px; background: var(--win-side); min-width: 0; }
.m-field .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-label { color: var(--win-muted); font-size: 11px; margin: 10px 0 4px; }
.m-toggle { width: 30px; height: 18px; border-radius: 999px; background: var(--gray); position: relative; flex: none; }
.m-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.m-toggle.on { background: var(--green); }
.m-toggle.on::after { left: 14px; }
.m-code { font-family: var(--mono); font-size: 11.5px; background: #0f1320; color: #d7def0; border-radius: 6px; padding: 8px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ダッシュボードの模型 */
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.m-stat { border: 1px solid var(--win-line); border-radius: 8px; padding: 8px 10px; }
.m-stat small { display: block; color: var(--win-muted); font-size: 11px; }
.m-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.m-hbar { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 8px; margin: 6px 0; font-size: 12px; }
.m-hbar .track { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--win-line) 60%, transparent); overflow: hidden; }
.m-hbar .track i { display: block; height: 100%; border-radius: 5px; }
.m-hbar .v { text-align: right; color: var(--win-muted); font-variant-numeric: tabular-nums; }
.m-seg { display: inline-flex; border: 1px solid var(--win-line); border-radius: 7px; overflow: hidden; font-size: 11px; }
.m-seg span { padding: 2px 10px; color: var(--win-muted); }
.m-seg span.on { background: var(--win-text); color: var(--win-bg); }

/* Claude との会話の模型 */
.chat { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 13px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--win-side); border: 1px solid var(--win-line); border-bottom-left-radius: 4px; }
.tool-call { align-self: flex-start; font-size: 11.5px; color: var(--win-muted); font-family: var(--mono); display: flex; align-items: center; gap: 6px; }
.tool-call::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.summary-card { border: 1px solid var(--win-line); border-radius: 10px; padding: 10px 12px; background: var(--win-bg); margin-top: 6px; }
.summary-card ul { margin: 4px 0 0; padding-left: 18px; }
.saved { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--green); font-weight: 700; }

/* 押す場所を示すオレンジの輪 */
.ring { position: relative; display: inline-flex; border-radius: 9px; }
.ring::after {
  content: ""; position: absolute; inset: -5px; border: 2.5px solid var(--ring); border-radius: inherit;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 22%, transparent);
  pointer-events: none;
}
.ring.block { display: flex; }
.ring[data-n]::before {
  content: attr(data-n); position: absolute; top: -14px; right: -14px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; background: var(--ring); color: #fff;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.num { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--ring); color: var(--ring); font-weight: 800; font-size: 12px; }

/* ---------- 価格 ---------- */
.price-box {
  max-width: 520px; margin: 32px auto 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 36px 28px; text-align: center; box-shadow: var(--shadow);
}
.price-box .price { font-size: 3rem; font-weight: 800; line-height: 1.1; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.price-box .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-box .checks { text-align: left; display: inline-block; margin: 20px 0 24px; }
.price-box .btn-row { justify-content: center; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 28px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- はじめかた ---------- */
.step-nav {
  position: sticky; top: 60px; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.step-nav .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.step-nav .wrap::-webkit-scrollbar { display: none; }
.step-nav a { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .85rem; background: var(--card); }
.step-nav a b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-soft); color: var(--text); font-size: .72rem; }
.step-nav a:hover { color: var(--text); }
.step { padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.step-label { color: var(--ring); font-weight: 800; font-size: .82rem; letter-spacing: .12em; display: inline-flex; align-items: center; gap: 8px; }
.step-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ring); }
.step-label span { color: var(--muted); font-weight: 500; }
.step h2 { font-size: clamp(1.4rem, 3.6vw, 1.9rem); margin: 10px 0 10px; }
.step .lead { margin-bottom: 26px; }
.step .mock { max-width: 720px; }
.howto { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; max-width: 720px; }
.howto li { display: flex; gap: 12px; align-items: flex-start; }
.howto li .num { margin-top: 3px; }
.tip { margin-top: 22px; max-width: 720px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 14px 16px; font-size: .93rem; color: var(--muted); }
.tip b { color: var(--text); }

/* Finder 風（ダウンロード手順） */
.finder { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 36px 20px; flex-wrap: wrap; }
.finder .app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 18px; border-radius: 10px; }
.finder .app-icon { width: 64px; height: 64px; border-radius: 15px; background: linear-gradient(140deg, var(--blue), #2f4fb8); position: relative; overflow: hidden; }
.finder .app-icon::before, .finder .app-icon::after { content: ""; position: absolute; left: 12px; right: 12px; height: 7px; border-radius: 4px; }
.finder .app-icon::before { top: 22px; background: linear-gradient(90deg, var(--orange) 0 40%, #fff 40% 44%, var(--green) 44%); }
.finder .app-icon::after { top: 35px; background: linear-gradient(90deg, #fff 0 4%, var(--red) 4% 30%, rgba(255,255,255,.5) 30%); }
.finder .folder { width: 70px; height: 56px; border-radius: 6px 6px 8px 8px; background: #5ab0f6; position: relative; margin-top: 8px; }
.finder .folder::before { content: ""; position: absolute; top: -8px; left: 0; width: 30px; height: 12px; border-radius: 4px 4px 0 0; background: #5ab0f6; }
.finder .arrow { width: 90px; height: 2px; background: var(--ring); position: relative; }
.finder .arrow::after { content: ""; position: absolute; right: -1px; top: -5px; border: 6px solid transparent; border-left: 9px solid var(--ring); border-right: 0; }
@media (max-width: 560px) { .finder .arrow { width: 40px; } }

/* システム設定風 */
.settings-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--win-muted); margin-bottom: 12px; }
.settings-path b { color: var(--win-text); font-weight: 600; }
.dialog { max-width: 360px; margin: 26px auto; text-align: center; padding: 20px; border-radius: 12px; border: 1px solid var(--win-line); background: var(--win-side); box-shadow: var(--shadow); }
.dialog .d-icon { width: 46px; height: 46px; border-radius: 11px; margin: 0 auto 10px; background: linear-gradient(140deg, var(--blue), #2f4fb8); }
.dialog p { margin: 0 0 8px; font-size: 12.5px; }
.dialog .d-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* ---------- 購入完了・ライセンス ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 32px 26px; box-shadow: var(--shadow); }
.key-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin: 18px 0 8px; padding: 20px; border: 2px dashed var(--line-strong); border-radius: 14px; background: var(--bg-soft);
}
.key-box .key { font-family: var(--mono); font-size: clamp(1.05rem, 4.4vw, 1.6rem); font-weight: 700; letter-spacing: .04em; word-break: break-all; text-align: center; }
@media (max-width: 560px) {
  .doc .panel { padding: 26px 16px; }
  .key-box { padding: 16px 8px; }
  .key-box .key { font-size: 3.7vw; letter-spacing: 0; }
}
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin 1s linear infinite; margin: 8px auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } html { scroll-behavior: auto; } }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.form-row input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: inherit; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
}
.form-row input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); }
.notice.err { background: color-mix(in srgb, var(--red) 10%, transparent); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.next-steps { counter-reset: s; list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.next-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.next-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--text); color: var(--bg); font-weight: 800; font-size: .8rem; margin-top: 2px; }
[hidden] { display: none !important; }

/* ---------- 文書ページ（規約・ポリシー等） ---------- */
.doc { padding: 48px 0 80px; }
.doc h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 0 0 6px; }
.doc .doc-meta { color: var(--muted); font-size: .9rem; margin: 0 0 32px; }
.doc h2 { font-size: 1.2rem; margin: 40px 0 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 1.02rem; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.doc th { width: 34%; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
@media (max-width: 560px) {
  .doc table, .doc tbody, .doc tr, .doc th, .doc td { display: block; width: 100%; }
  .doc th { border-bottom: 0; padding-bottom: 4px; }
  .doc td { padding-top: 4px; }
}
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 8px; }
.toc ul { margin: 6px 0 0; }
.release { border-left: 3px solid var(--blue); padding-left: 18px; }
.release h2 { border-top: 0; margin-top: 0; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- 価格：先行販売（買い切り）とサブスク ---------- */
.lifetime { max-width: 760px; margin: 28px auto 0; padding: 28px; border-radius: 20px; background: var(--card);
  border: 2px solid #4F7CF7; text-align: left; box-shadow: 0 10px 30px rgba(20, 26, 46, .08); }
.lifetime-head h3 { margin: 8px 0 4px; font-size: 1.4rem; }
.lifetime-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #4F7CF7; color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.lifetime-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0 10px; }
.lifetime-stat { padding: 14px; border-radius: 14px; background: rgba(79, 124, 247, .07); }
.lifetime-stat .serial, .lifetime-stat .seats { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.lifetime-stat .seats small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.lifetime-stat .price { font-size: 1.9rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.lifetime-stat .price .off { display: inline-block; white-space: nowrap; font-size: .85rem; font-weight: 700; color: #EB5757; }
.tier-note { margin: 6px 0 12px; }
.tiers { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.tiers li { display: grid; grid-template-columns: 1.2fr 1fr 1fr .8fr; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px;
  background: rgba(20, 26, 46, .04); font-variant-numeric: tabular-nums; font-size: .95rem; }
.tiers li em { font-style: normal; font-size: .8rem; font-weight: 700; text-align: right; }
.tiers li.current { background: rgba(79, 124, 247, .14); outline: 2px solid #4F7CF7; font-weight: 700; }
.tiers li.current em { color: #4F7CF7; }
.tiers li.sold-out { opacity: .5; text-decoration: line-through; }
.tiers li.sold-out em { text-decoration: none; }
.lifetime .btn-row { justify-content: flex-start; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 760px; margin: 18px auto 0; }
.plans .price-box { margin: 0; max-width: none; }
.plans .price-box .price { font-size: 2.2rem; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(39, 174, 96, .15); color: #1f8a4c; font-size: .75rem; font-weight: 700; }
.plan-checks { text-align: left; display: inline-block; margin: 22px auto 12px; }
@media (max-width: 640px) {
  .lifetime { padding: 20px; }
  .lifetime-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .tiers li { grid-template-columns: 1fr 1fr; }
  .tiers li em { text-align: left; }
}
@media (prefers-color-scheme: dark) {
  .tiers li { background: rgba(255, 255, 255, .05); }
}
