/* ToysVR Player — サイト共通のスタイル
   色はアプリの UI (すりガラスのパネル・青の操作色・funscript の橙・CSV の水色) に合わせている */
:root {
  --night: #13121e;        /* 背景 (シアターの暗さ) */
  --night-2: #1b1a29;      /* 一段明るい面 */
  --glass: rgba(255, 255, 255, 0.055);
  --glass-line: rgba(255, 255, 255, 0.13);
  --text: #eceaf4;
  --muted: #a6a3b8;
  --faint: #6f6c84;
  --action: #5c99ff;       /* アプリの操作色 */
  --action-ink: #0d1a33;
  --funscript: #ffb84d;    /* アプリの funscript 表示色 */
  --csv: #73ccff;          /* アプリの CSV 表示色 */
  --danger: #f25454;
  --good: #7dfc99;
  --radius-panel: 18px;
  --radius-small: 10px;
  --measure: 42rem;
  --wide: 70rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  font-feature-settings: "palt" 0;
}

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

a { color: var(--action); text-underline-offset: 0.2em; }
a:hover { color: #8db8ff; }

:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 4px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(19, 18, 30, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-line);
}
.site-header .inner {
  max-width: var(--wide); margin: 0 auto; padding: 0.7rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand {
  color: var(--text); text-decoration: none; font-weight: 900; font-size: 1.15rem;
  letter-spacing: 0.01em; white-space: nowrap; display: flex; align-items: center; gap: 0.55rem;
}
.brand-mark {
  width: 1.6rem; height: 1rem; border-radius: 3px;
  background: linear-gradient(90deg, var(--funscript), #ff5c9a 45%, var(--csv));
  box-shadow: 0 6px 18px -4px rgba(255, 120, 160, 0.55);
}
.site-nav { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--muted); text-decoration: none; padding: 0.35rem 0.6rem; border-radius: 999px;
  white-space: nowrap; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); background: var(--glass); }
.site-nav a[aria-current="page"] { color: var(--text); background: rgba(92, 153, 255, 0.18); }

/* ---------- ページの骨組み ---------- */
main { padding-bottom: 5rem; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: var(--measure); }

h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 900; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin-top: 4.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-top: 2.25rem; margin-bottom: 0.5rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }

.page-head { padding: 3.5rem 0 1rem; }
.page-head p { color: var(--muted); max-width: var(--measure); margin-top: 1rem; }

/* ---------- トップのスクリーン (このサイトの印象の要) ---------- */
.hero { padding-top: 3.5rem; padding-bottom: 2rem; }
.hero h1 { max-width: 18em; text-wrap: balance; }
.hero .lead { margin-top: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.screen {
  position: relative; margin: 3rem auto 0; max-width: 62rem; isolation: isolate;
}
figure { margin: 0; }
/* スクリーンの光が床に広がる: 同じ画像をぼかして下に敷く (アプリの「スクリーンの照り返し」と同じ考え) */
.screen-glow {
  position: absolute; inset: 12% 4% -16% 4%; z-index: -1;
  background: center / cover no-repeat;
  filter: blur(48px) saturate(1.5);
  opacity: 0.55;
  border-radius: 50%;
}
.screen img {
  border-radius: 10px;
  border: 1px solid var(--glass-line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- ボタン ---------- */
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.4rem; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: var(--action); color: var(--action-ink); border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.button:hover { background: #7aaeff; color: var(--action-ink); }
.button.secondary { background: var(--glass); color: var(--text); border: 1px solid var(--glass-line); }
.button.secondary:hover { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* ---------- お知らせ ---------- */
.notice {
  margin-top: 2.5rem; padding: 1rem 1.25rem; border-radius: var(--radius-small);
  background: rgba(255, 184, 77, 0.09); border: 1px solid rgba(255, 184, 77, 0.35);
  max-width: var(--measure);
}
.notice strong { color: var(--funscript); }
.notice.safe { background: rgba(242, 84, 84, 0.08); border-color: rgba(242, 84, 84, 0.4); }
.notice.safe strong { color: #ff8a8a; }
.notice.info { background: rgba(92, 153, 255, 0.08); border-color: rgba(92, 153, 255, 0.35); }
.notice.info strong { color: #9cc0ff; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- できること (画像と文を交互に) ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2.5rem;
  align-items: center; margin-top: 4rem;
}
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { margin-top: 0; font-size: 1.35rem; font-weight: 900; }
.feature p { color: var(--muted); }
.feature img { border-radius: 10px; border: 1px solid var(--glass-line); }

/* 3 つ並べる短い説明 */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.trio h3 { margin-top: 0; font-size: 1.05rem; }
.trio p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- 表 ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--glass-line); }
th { color: var(--muted); font-weight: 500; white-space: nowrap; }
td:first-child { white-space: nowrap; font-weight: 700; }

/* ---------- 手順 (順番が意味を持つところだけ番号を出す) ---------- */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: step; max-width: 56rem; }
.steps > li {
  counter-increment: step; position: relative; padding: 0 0 2.75rem 4.25rem;
  border-left: 2px solid var(--glass-line); margin-left: 1.25rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0.5rem; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -1.3rem; top: -0.15rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night); border: 2px solid var(--action); color: var(--text);
  font-weight: 900; font-size: 1.1rem;
}
.steps h3 { margin-top: 0; font-size: 1.15rem; }
.steps p, .steps ul { color: var(--muted); max-width: var(--measure); }
.steps ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.steps img { margin-top: 1rem; border-radius: 10px; border: 1px solid var(--glass-line); max-width: min(44rem, 100%); }

/* 画面の名前 (メニュー・ボタン) */
.ui {
  display: inline-block; padding: 0 0.45em; border-radius: 6px; line-height: 1.6;
  background: rgba(255, 255, 255, 0.09); border: 1px solid var(--glass-line); color: var(--text);
  font-size: 0.93em; white-space: nowrap;
}
code, .path {
  font-family: "Zen Kaku Gothic New", ui-monospace, Consolas, monospace;
  background: rgba(255, 255, 255, 0.07); padding: 0.05em 0.4em; border-radius: 5px; font-size: 0.93em;
  word-break: break-all;
}

/* ---------- コントローラーの操作 ---------- */
.hands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.hand { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius-panel); padding: 1.25rem 1.4rem; }
.hand h3 { margin-top: 0; }
.hand dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1rem; }
.hand dt { font-weight: 700; }
.hand dd { margin: 0; color: var(--muted); }
.hand .stop dt, .hand .stop dd { color: #ff8a8a; }

/* スクリプトの種類の印 (アプリと同じ色) */
.tag { font-weight: 700; white-space: nowrap; }
.tag::before { content: "◆"; margin-right: 0.25em; font-size: 0.85em; }
.tag.funscript { color: var(--funscript); }
.tag.csv { color: var(--csv); }

/* ---------- よくある質問 ---------- */
details {
  border-bottom: 1px solid var(--glass-line); padding: 0.9rem 0; max-width: var(--measure);
}
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; gap: 0.75rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; color: var(--action); font-weight: 900; width: 1rem; flex: none; }
details[open] summary::before { content: "−"; }
details > div { padding: 0.75rem 0 0 1.75rem; color: var(--muted); }
details > div p:last-child { margin-bottom: 0; }

img.narrow { max-width: min(26rem, 100%); }

/* ---------- 次のページへ ---------- */
.next {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 4rem; padding-top: 2rem;
  border-top: 1px solid var(--glass-line);
}

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--glass-line); color: var(--faint); font-size: 0.9rem; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: var(--muted); }

/* ---------- 18 歳以上の確認 ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 1.25rem;
  background: rgba(10, 9, 18, 0.94);
}
.age-gate.show { display: grid; }
.age-gate .box {
  max-width: 28rem; width: 100%; padding: 1.75rem; border-radius: var(--radius-panel);
  background: var(--night-2); border: 1px solid var(--glass-line);
}
.age-gate h2 { margin: 0 0 0.75rem; font-size: 1.35rem; }
.age-gate p { color: var(--muted); }
.age-gate .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ---------- 狭い画面 ---------- */
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .site-header .inner { flex-wrap: wrap; gap: 0.25rem 1rem; padding-bottom: 0.4rem; }
  .site-nav { margin-left: 0; width: 100%; margin-right: -1.25rem; padding-right: 1.25rem; }
  .feature { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 3rem; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .trio, .hands { grid-template-columns: 1fr; }
  .hand dl { grid-template-columns: 1fr; gap: 0 0; }
  .hand dd { margin-bottom: 0.6rem; }
  .steps > li { padding-left: 2.5rem; margin-left: 1.3rem; }
  .hero { padding-top: 2.25rem; }
  .hero h1 br { display: none; }
  .screen { margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
