/* =========================================================
   SHOWPA サイト案
   色・寸法・動きは アプリの src/styles/tokens.css を そのまま持ってくる。
   サイトだけ 別の 見た目に すると、ストアから 来た人が
   「同じ アプリの ページか」 を 一瞬 迷う。
   1 テーマのみ。アプリ側が テーマ切替を 廃止しているので、
   サイトも 1 つの 見え方に そろえる（地の色は 必ず 明示して塗る）。
   ========================================================= */
:root {
  --bg: #f4efe4;
  --bg-warm: #ffe6cf;
  --bg-cool: #e9e2f7;
  --tx: #191712;
  --dim: #6b6558;
  --line: #ddd5c3;

  --a1: #ff5a1f;   /* 朱。押すもの */
  --a2: #6a4bd6;   /* 菫。色面 */
  --a3: #ffc53d;   /* 山吹。刷りズレの 2 版目 */
  --night: #1b1630;
  --cream: #fff6e9;

  --skew: -3deg;
  --radius: 3px;

  --jp: -apple-system, BlinkMacSystemFont, system-ui, "Hiragino Kaku Gothic ProN",
        "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

  --dur-screen: 420ms;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.25, 1.35);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --maxw: 1080px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--jp);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* --- 見出し ---------------------------------------------
   刷りズレは 疑似要素で 山吹の 2 版目を 少し ずらして 敷く。
   画像では なく 文字の 複製なので、拡大しても にじまない。 */
.display {
  font-size: clamp(40px, 9vw, 96px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
  position: relative;
  display: inline-block;
  text-wrap: balance;
}
.display::before {
  content: attr(data-echo);
  position: absolute;
  inset: 0;
  color: var(--a3);
  transform: translate(10px, 10px);
  z-index: -1;
  transition: transform 700ms var(--ease-out);
}
.reveal.in .display::before { transform: translate(6px, 6px); }

h2 {
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 8px;
  text-wrap: balance;
}
.label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--a1);
  margin: 0 0 10px;
}
.lead { color: var(--dim); margin: 0; max-width: 34em; }

/* --- 色面 -------------------------------------------------
   面ごと -3deg に 傾け、中身は 逆に 戻して 水平に 読ませる。
   アプリの パネルと 同じ 作り。 */
section { position: relative; }
.slab {
  transform: skewY(var(--skew));
  margin: 96px 0;
  padding: 84px 0;
}
.slab > .wrap { transform: skewY(calc(var(--skew) * -1)); }
.slab.night { background: var(--night); color: var(--cream); }
.slab.night .lead { color: #bdb4cf; }
.slab.night .label { color: var(--a3); }
.slab.violet { background: var(--a2); color: #fff; }
/* 色面が 続くときは 隙間を 作らない。あいだに 地の色が 出ると
   1 つの かたまりに 見えず、切れて 見える。 */
.slab.joined { margin-bottom: 0; }
.slab.joined + .slab { margin-top: 0; }
.slab.violet .lead { color: #ded6f8; }
.slab.violet .label { color: var(--a3); }

/* --- 背景の多角形 -----------------------------------------
   アプリのホームと 同じ 2 枚。ゆっくり 泳がせる。 */
.blob { position: absolute; z-index: 0; pointer-events: none; }
.blob b {
  display: block; width: 100%; height: 100%;
  background: var(--a1);
  clip-path: polygon(18% 0, 100% 6%, 92% 62%, 54% 100%, 0 74%, 10% 30%);
  animation: drift 26s ease-in-out infinite;
}
.blob.cool { }
.blob.cool b {
  background: var(--a2);
  clip-path: polygon(0 22%, 46% 0, 100% 34%, 74% 100%, 16% 88%);
  animation-duration: 34s;
  animation-direction: reverse;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%      { transform: translate(-3%, 4%) rotate(6deg) scale(1.06); }
  66%      { transform: translate(4%, -3%) rotate(-5deg) scale(0.97); }
}

/* --- ヒーロー --------------------------------------------- */
.hero { padding: 72px 0 24px; position: relative; overflow: hidden; }
.hero .blob.hot { top: -180px; right: -140px; width: 460px; height: 420px; }
.hero .blob.cool { bottom: -220px; left: -160px; width: 420px; height: 400px; }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
}
.kana { font-size: 15px; font-weight: 800; letter-spacing: 0.3em; color: var(--a1); margin: 0 0 12px; }
.hero p.tag { font-size: clamp(19px, 2.3vw, 24px); font-weight: 700; margin: 22px 0 0; max-width: 20em; }
.hero .sub { color: var(--dim); margin: 10px 0 0; max-width: 26em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 900; font-style: italic; font-size: 18px;
  padding: 16px 26px; border: 0; border-radius: var(--radius);
  background: var(--a1); color: #1a1917; cursor: pointer;
  transform: skewX(var(--skew));
  box-shadow: 6px 6px 0 var(--a3);
  transition: transform 110ms var(--ease-pop), box-shadow 110ms var(--ease-out);
  text-decoration: none;
}
.btn > span { transform: skewX(calc(var(--skew) * -1)); }
.btn:hover { transform: skewX(var(--skew)) translate(-2px, -2px); box-shadow: 9px 9px 0 var(--a3); }
.btn:active { transform: skewX(var(--skew)) translate(3px, 3px); box-shadow: 2px 2px 0 var(--a3); }
.btn.ghost { background: transparent; color: var(--tx); box-shadow: inset 0 0 0 3px var(--tx); }
.btn.ghost:hover { box-shadow: inset 0 0 0 3px var(--tx), 6px 6px 0 var(--a3); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn[disabled]:hover { transform: skewX(var(--skew)); box-shadow: 6px 6px 0 var(--a3); }
:focus-visible { outline: 3px solid var(--a2); outline-offset: 3px; }

/* --- 開始の合図（ヒーロー右） -------------------------------
   アプリを 開いた ときと 同じ 順で 出す。
   ページを 塞がずに、枠の 中だけで 起きる。 */
.signal {
  position: relative;
  aspect-ratio: 9 / 17;
  max-width: 300px; margin-left: auto;
  background: var(--bg);
  border-radius: 26px;
  box-shadow: 0 0 0 3px var(--tx), 14px 14px 0 var(--a2);
  overflow: hidden;
  display: grid; place-items: center;
}
.signal img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 500ms var(--ease-out); }
.signal.done img { opacity: 1; }
.signal-word {
  position: absolute; inset: 0;
  display: grid; place-content: center; gap: 4px; text-align: center;
}
.signal-word p { margin: 0; }
.signal-name { font-size: 20px; font-weight: 900; letter-spacing: 0.02em; }
.signal-go {
  font-size: 64px; font-weight: 900; font-style: italic; line-height: 1;
  color: var(--a1);
}
.signal-go.go { color: var(--a2); font-size: 76px; }
.pop { animation: pop 460ms var(--ease-pop) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: scale(1); } }

/* --- 3 つの要点 -------------------------------------------- */
.points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.point { background: #fff; border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 0 0 3px var(--tx); }
.point .n {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 700; color: var(--a2); letter-spacing: 0.1em;
}
.point h3 { font-size: 21px; font-weight: 900; margin: 6px 0 8px; }
.point p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.7; }

/* --- 流れ ------------------------------------------------- */
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step .shot {
  /* width/height 属性は 読み込み前に 場所を 取らせるために 付けてある。
     height:auto を 書かないと、その 属性が 高さとして 効いて 縦に 伸びる。 */
  width: 100%; height: auto; border-radius: 14px; display: block;
  box-shadow: 0 0 0 3px var(--tx), 8px 8px 0 var(--a3);
}
.slab.night .step .shot { box-shadow: 0 0 0 3px var(--cream), 8px 8px 0 var(--a1); }
.step h3 { font-size: 18px; font-weight: 900; margin: 4px 0 4px; }
.step p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--dim); }
.slab.night .step p { color: #bdb4cf; }
.step .n {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; color: var(--a3);
  /* 画像の 影は 8px 下に 出る。その下に 文字を 置く */
  margin: 22px 0 0;
}

/* --- 収録ゲーム ------------------------------------------- */
.genre { margin-top: 30px; }
.genre h3 {
  font-size: 15px; font-weight: 800; letter-spacing: 0.1em;
  margin: 0 0 10px; color: var(--a3);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 15px; font-weight: 700;
  padding: 8px 14px; border-radius: var(--radius);
  background: rgba(255, 246, 233, 0.1); color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(255, 246, 233, 0.28);
}

/* --- フッター --------------------------------------------- */
footer { padding: 60px 0 80px; border-top: 3px solid var(--tx); margin-top: 96px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-end; }
footer a { color: var(--tx); text-underline-offset: 4px; }
footer .muted { color: var(--dim); font-size: 14px; margin: 6px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 700; }

/* --- 付録（案の説明。ページ本体ではない） --------------------- */
.notes { background: #efe9dc; border-top: 3px solid var(--tx); padding: 64px 0 88px; }
.notes h2 { font-style: normal; font-size: 26px; }
.notes .card {
  background: var(--bg); border-radius: var(--radius);
  box-shadow: 0 0 0 2px var(--line); padding: 22px 24px;
}
.notes .cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 22px; }
.notes h3 { font-size: 17px; font-weight: 900; margin: 0 0 6px; }
.notes p, .notes li { font-size: 15px; color: #4b463c; line-height: 1.8; }
.notes ul { margin: 8px 0 0; padding-left: 1.2em; }
.notes code {
  font-family: var(--mono); font-size: 13px;
  background: #e3dccc; padding: 2px 6px; border-radius: 3px;
}
.notes table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.notes th, .notes td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.notes th { font-weight: 800; color: var(--dim); font-size: 13px; letter-spacing: 0.06em; }
.scroll-x { overflow-x: auto; }

/* --- 出現 ------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .signal { margin: 0 auto; }
  .points { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .notes .cards { grid-template-columns: 1fr; }
  .slab { margin: 64px 0; padding: 64px 0; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
}

/* 動きを 減らす 設定の 人には 出さない。
   ルーレットは 押した ときだけ 結果を 出す。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
