/* sansess.com の共通スタイル。値は DESIGN.md のとおり。ここ以外に色・文字・余白を直書きしない */
:root {
  --bg:           #1D1F24;
  --text:         #F3ECDC;
  --muted:        #B0AA9B;
  --line:         #F3ECDC40;
  --accent:       #F4C542;
  --accent-shade: #9F802B;
  --on-accent:    #1D1F24;

  --font-display: 'RocknRoll One', 'M PLUS 1', sans-serif;
  --font-body:    'M PLUS 1', 'Hiragino Sans', sans-serif;
  --font-num:     'DotGothic16', monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;
  --pad-x: 20px;
  --max-w: 640px;
  --icon-size: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.03em;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }

.wrap {
  max-width: calc(var(--max-w) + var(--pad-x) * 2);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
}

/* ヘッダー */
.site-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  padding-top: max(var(--s6), env(safe-area-inset-top));
  padding-bottom: var(--s4);
}
.logo { font-family: var(--font-display); font-size: 22px; line-height: 1; letter-spacing: 0.01em; text-decoration: none; }
.logo b { color: var(--accent); font-weight: 400; }
.site-nav { display: flex; gap: var(--s4); font-size: 13px; line-height: 1.7; white-space: nowrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent; }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

/* 見出し */
.page-head { padding: var(--s8) 0 var(--s6); }
.page-head h1 { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.3; letter-spacing: 0.02em; margin: 0; }
.page-head p { margin: var(--s3) 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
@media (min-width: 640px) { .page-head h1 { font-size: 38px; } }

.num { font-family: var(--font-num); color: var(--accent); font-size: 13px; line-height: 1; letter-spacing: 0.08em; }

/* ゲームの一覧 */
.games { list-style: none; margin: 0; padding: 0; }
.game {
  display: grid; grid-template-columns: var(--icon-size) 1fr auto; column-gap: var(--s4); align-content: start;
  padding: var(--s6) 0;
  border-top: 1px dashed var(--line);
}
.game img { grid-row: 1 / span 3; width: var(--icon-size); height: var(--icon-size); border-radius: 22%; display: block; }
.game h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; }
.game p, .game .stores { grid-column: 2 / span 2; }
.game p { margin: var(--s1) 0 var(--s3); color: var(--muted); font-size: 13px; line-height: 1.7; }
.game h2, .game .num { align-self: baseline; }
.game .num { white-space: nowrap; }
.stores { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.empty { color: var(--muted); font-size: 13px; padding: var(--s6) 0; border-top: 1px dashed var(--line); }

/* ストアのボタン：サイトの中で黄色い面はこれだけ */
.btn {
  display: inline-block;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 13px; line-height: 1.4; letter-spacing: 0.02em; text-decoration: none;
  padding: var(--s2) var(--s4);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--accent-shade);
  transition: transform 80ms, box-shadow 80ms;
}
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--accent-shade); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* 規約などの長い文章 */
.doc-date { color: var(--muted); font-size: 13px; margin: var(--s3) 0 0; }
.doc-sec { padding: var(--s6) 0; border-top: 1px dashed var(--line); }
.doc-sec h2 { display: flex; align-items: baseline; gap: var(--s3); margin: 0 0 var(--s3); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: 0.02em; }
.doc-sec p { margin: 0 0 var(--s3); }
.doc-sec p:last-child { margin-bottom: 0; }
.doc-sec ul { margin: 0 0 var(--s3); padding-left: 1.2em; }
.doc-sec li { margin-bottom: var(--s1); }

/* ゲームの中から開かれたとき（?from=<ゲームの id>）は一覧だけ */
.from-game .site-head, .from-game .site-foot { display: none; }
.from-game .page-head { padding-top: max(var(--s8), env(safe-area-inset-top)); }
.from-game main { padding-bottom: max(var(--s8), env(safe-area-inset-bottom)); }

/* フッター */
.site-foot {
  margin-top: var(--s12);
  padding-top: var(--s6);
  padding-bottom: max(var(--s8), env(safe-area-inset-bottom));
  border-top: 1px dashed var(--line);
  color: var(--muted); font-size: 13px; line-height: 1.7;
}
.site-foot ul { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); }
.site-foot a { color: var(--text); }
.site-foot small { font-size: 13px; }
