/* ポンクソフトのトップ。昔のポンクソフト（/cpp/dxlib/ の main.css）と同じ、クリーム色の地に緑 #00a381 */
html { background: #fffff5; color: #3c3c32; font: 15px/1.8 "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, "Noto Sans JP", sans-serif; }
body { margin: 0 auto; max-width: 1180px; padding: 0 16px; }
a:link, a:visited { color: #46a; }
header { text-align: center; padding: 32px 0 8px; border-bottom: 1px solid #00a381; }
header h1 { margin: 0; line-height: 0; }
header h1 img { max-width: 100%; height: auto; image-rendering: auto; }
header p { margin: 4px 0 12px; color: #5a5a4a; }

/* ゲームのカード: 2 列（狭い画面では 1 列）。高さをそろえ、「いま あそぶ」は下にそろえる */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 24px 0 32px; }
.game { display: flex; flex-direction: column; padding: 0 0 18px; background: #fff; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, .25); overflow: hidden; }
.game > * { margin-left: 18px; margin-right: 18px; }
.game h2 { margin: 0 0 12px; padding: 8px 18px; font-size: 17px; line-height: 1.4; color: #fffff5; background: #00a381; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 0; margin-bottom: 12px; padding: 0; }
.tags li { font-size: 12px; line-height: 1.6; padding: 0 8px; color: #00775e; background: #e3f4ee; border-radius: 3px; }

/* ゲーム画面（ドット絵はドットのまま拡大）と紹介動画。縦横比はカードの --ar（既定 4:3） */
img { image-rendering: pixelated; }
.media { aspect-ratio: var(--ar, 4 / 3); background: #000; border: 1px solid #00a381; }
.media video, .screen, .screen > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.screen { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.movie { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 6px 18px; font-size: 16px; font-weight: bold; color: #fffff5; background: rgba(0, 163, 129, .9); border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, .4); white-space: nowrap; }
.screen:hover .movie { background: #008a6d; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.thumbs button { padding: 0; border: 2px solid #e6e6da; background: #000; cursor: pointer; line-height: 0; }
.thumbs button.on { border-color: #00a381; }
.thumbs img { width: 100%; height: auto; aspect-ratio: var(--ar, 4 / 3); object-fit: contain; }
/* ドット絵でないゲームは、なめらかに縮める */
.topurun img, .etoile img, .fukusui img, .hasami img { image-rendering: auto; }
.topurun, .etoile, .fukusui { --ar: 16 / 9; }

.catch { font-size: 17px; font-weight: bold; color: #00775e; margin-top: 16px; margin-bottom: 4px; }
.game > p:not(.catch), .points { font-size: 14px; line-height: 1.75; }
.points { padding-left: 1.2em; }
.howto { color: #6a6a5a; }
.game > :nth-last-child(2) { margin-bottom: 16px; }
.play { align-self: flex-start; margin-top: auto; padding: 8px 22px; font-weight: bold; text-decoration: none; color: #fffff5 !important; background: #00a381; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
.play:hover { background: #008a6d; }

footer { text-align: center; color: #6a6a5a; font-size: 13px; padding: 16px 0 40px; border-top: 1px solid #00a381; }
footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .games { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  header { padding-top: 16px; }
  .game > * { margin-left: 12px; margin-right: 12px; }
  .game h2 { padding: 8px 12px; }
}
footer .links { font-size: 15px; margin-bottom: 8px; }

/* 作者について（/about/） */
.about { max-width: 720px; margin: 24px auto 32px; padding: 8px 28px 20px; background: #fff; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, .25); }
.about h2 { margin: 24px 0 8px; padding: 6px 12px; font-size: 17px; color: #fffff5; background: #00a381; }
.about .main-links { margin: 16px 0 0; }
.about li { margin: 4px 0; }

/* 自分のリンク（LAPRAS・X・note）。白地に黒（LAPRAS は公式ロゴのまま） */
.main-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
.main-links a { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 20px; font-weight: bold; text-decoration: none; color: #000 !important; background: #fff; border-radius: 4px; box-shadow: 0 2px 3px rgba(0, 0, 0, .35); }
.main-links a:hover { background: #f4f4ee; }
.main-links a:not(.logo) { justify-content: space-between; line-height: 1; padding-top: 8px; padding-bottom: 5px; }
.ic { margin-top: 5px; width: 44px; height: 44px; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.ic-x { --ic: url(/img/icon-x.svg); }
.ic-note { --ic: url(/img/icon-note.svg); }
/* LAPRAS は公式ロゴ（縦組み）をそのまま、白地で。色や形は変えない */
.main-links a.logo { padding: 8px 22px; }
.main-links a.logo img { display: block; width: auto; height: 76px; }
@media (max-width: 600px) {
  .main-links { gap: 8px; flex-wrap: nowrap; }
  .main-links a { padding: 8px 14px; }
  .main-links a.logo { padding: 8px 14px; }
  .main-links a.logo img { height: 64px; }
  .ic { margin-top: 4px; width: 34px; height: 34px; }
}
