/* ペインゲーム トップ（ゲームの「難易度えらび」画面ふう、2026-11-14）
   生成りの地・朱赤の帯・細長い太字。左にゲーム名（常に4つ）、右に選んだゲームの絵。 */
@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Oswald:wght@500;700&family=M+PLUS+1:wght@500;700;800&display=swap');

:root {
  --cream: #f1e9d8;
  --paper: #f8f3e8;
  --red: #d42a24;
  --red-dk: #a91e1a;
  --ink: #221d18;
  --sub: #6d6355;
  --jp: 'M PLUS 1', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --cond: 'Oswald', 'M PLUS 1', 'Hiragino Sans', sans-serif;
  --head: 'Dela Gothic One', 'M PLUS 1', 'Hiragino Sans', sans-serif;
  --row: 100px;
  --name: 40px;
  --gap: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { background: var(--cream); }
body {
  color: var(--ink);
  font-family: var(--jp);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

/* ── 上：ロゴ・大見出し・小さなリンク ── */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 10px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
}
.logo img { width: 40px; height: 40px; border-radius: 8px; }
.title { text-align: center; color: var(--red); line-height: 1; }
.title .en {
  display: block;
  font-family: var(--head);
  font-weight: 400;
  font-size: 74px;
  letter-spacing: 0;
  white-space: nowrap;
  transform: skewX(-8deg) scaleX(.74);
}
.title .ja { margin-top: 8px; }
.title .ja { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: .5em; text-indent: .5em; color: var(--red-dk); }
.links { justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 16px; font-size: 13px; font-weight: 700; }
.links a { color: var(--sub); }
.links a:hover, .links a:focus-visible { color: var(--red); }

/* ── 本体：左にリスト、右に絵 ── */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 30%) minmax(0, 1fr);
  gap: var(--gap);
  min-height: 0;
}
.side { display: flex; flex-direction: column; min-width: 0; }

.menu { user-select: none; -webkit-user-select: none; }
.tri {
  display: block;
  width: 100%;
  height: 34px;
  background: none;
  border: 0;
  color: var(--red);
  font: inherit;
  font-size: 20px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  transition: opacity .2s ease;
}
.tri.end { opacity: .25; cursor: default; }
.win { height: calc(var(--row) * 4); overflow: hidden; touch-action: none; transition: height .3s ease; }
.list { list-style: none; transition: transform .3s ease; }
.list li { height: var(--row); border-bottom: 4px solid var(--cream); }
.list a {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0 calc(var(--row) * .09);
  padding: 0 22px;
  background: var(--red);
  transform: skewX(-9deg);
  color: #fff;
  overflow: hidden;
  transition: background-color .18s ease, color .18s ease;
}
.list a span {
  display: inline-block;
  font-family: var(--cond);
  font-weight: 800;
  font-size: var(--name);
  line-height: 1;
  white-space: nowrap;
  transform: scaleX(.84);
  transform-origin: left center;
  letter-spacing: .01em;
}
.list li.sel a { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 3px var(--red); }
.list a:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }

/* 選んだゲームの一言 */
.info { margin-top: 14px; min-height: 8.6em; }
.info .g { display: none; }
.info .g.sel { display: block; }
.info .meta { font-size: 13px; font-weight: 700; color: var(--red-dk); letter-spacing: .03em; }
.info .desc { margin-top: 4px; font-size: 14px; font-weight: 500; line-height: 1.7; }
.info .act { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; font-weight: 700; }
.info .act a { color: var(--red); border-bottom: 1px solid currentColor; }

/* サイトの紹介（小さく常に見せる） */
.intro { margin-top: auto; padding-top: 12px; font-size: 12px; line-height: 1.75; color: var(--sub); }
.intro h1 { font-size: 13px; font-weight: 800; color: var(--ink); }
.intro p { margin-top: 4px; }
.intro a { color: var(--red); border-bottom: 1px solid currentColor; }

/* 右の絵 */
.shot {
  position: relative;
  min-height: 0;
  border: 12px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(34, 29, 24, .08);
  background: #1a1612;
  overflow: hidden;
}
.shot a { position: absolute; inset: 0; display: block; }
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s ease;
}
.shot img.on { opacity: 1; }
/* 選んだゲームの 動く プレイ映像（静止画の 上に かさねる。再生が はじまってから 見せる） */
.shot video.pv {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  background: transparent;
}
.shot video.pv.on { opacity: 1; }

/* いちばん下の小さな行 */
.foot { display: flex; flex-wrap: wrap; gap: 2px 16px; padding-top: 10px; font-size: 11px; font-weight: 500; color: var(--sub); }
.foot a { color: var(--sub); }
.foot a:hover { color: var(--red); }

/* ── 背の低いPC・スマホ横 ── */
@media (max-height: 820px) and (min-width: 641px) {
  :root { --row: 56px; --name: 25px; }
  .title .en { font-size: 52px; }
  .tri { height: 28px; line-height: 28px; font-size: 17px; }
  .info { min-height: 0; margin-top: 8px; }
  .intro { font-size: 11px; line-height: 1.65; }
}
@media (max-height: 520px) and (min-width: 641px) {
  :root { --row: 50px; --name: 22px; --gap: 14px; }
  .page { padding-top: max(10px, env(safe-area-inset-top)); }
  .top { padding-bottom: 6px; }
  .title .en { font-size: 40px; }
  .title .ja { display: none; }
  .logo img { width: 28px; height: 28px; border-radius: 6px; }
  .links { font-size: 11px; gap: 2px 10px; }
  .tri { height: 24px; line-height: 24px; font-size: 15px; }
  .main { flex: none; grid-template-columns: minmax(240px, 34%) minmax(0, 1fr); align-items: start; }
  .shot { border-width: 8px; aspect-ratio: 16 / 10; }
  .info { margin-top: 10px; }
}

/* ── スマホ縦：見出し→絵→リスト ── */
@media (max-width: 640px) {
  :root { --row: 58px; --name: 25px; }
  .page { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .top { grid-template-columns: 34px 1fr 34px; gap: 8px 6px; }
  .logo { justify-self: start; align-self: start; }
  .links { grid-column: 1 / -1; }
  .logo img { width: 30px; height: 30px; border-radius: 6px; }
  .title .en { font-size: 46px; }
  .links { justify-self: center; justify-content: center; font-size: 12px; gap: 2px 14px; }
  .main { display: flex; flex-direction: column; gap: 6px; }
  .shot { order: -1; aspect-ratio: 16 / 10; border-width: 8px; }
  .info { min-height: 0; }
  .intro { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot img, .win, .list, .list a { transition: none; }
  .shot video.pv { display: none; }
}
