/* ピコピコメーカー 日本語版のトップ(index.php)と作品ページ(game.php)の共通 CSS。2026-10 のリニューアル
   ドット調は残し、余白と文字の大きさをそろえる。見出しの DotGothic16(Google Fonts)は 16px で使う。
   古い iOS(14 以前)でも崩れない書き方にしている(aspect-ratio と flex の gap を使わない) */

:root {
  --bg-col: #000;          /* 中央の黒い帯 */
  --text: #fff;
  --accent: #ffe14a;       /* 見出しの黄色 */
  --normal: #0aa3d6;       /* ノーマル版の青 */
  --normal-dark: #06607e;
  --wide: #e07d2d;         /* ワイド版のオレンジ */
  --frame: #fff;
  --muted: #c4c4c4;
  --gap: 12px;
  --side: 16px;
  --div-gap: 24px;          /* 区切り線の上と下の余白(同じ値) */
  --dot: "DotGothic16", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
img { border: 0; display: block; max-width: 100%; }
/* ドット絵を拡大しても にじませない(古い指定を先、pixelated を最後に) */
.px { image-rendering: crisp-edges; image-rendering: pixelated; }

body {
  background: #993300 url("/piko_img/s5.jpg") repeat;
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }

/* 中央の帯。スマホでも左右にレンガを少し見せる。PC では 420px */
.col {
  background: var(--bg-col);
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 32px;
}
@media (max-width: 440px) { body { padding: 0 8px; } }

.hero img { width: 100%; height: auto; }

/* 区切り線(既存のブロックの列) */
.divider { padding: var(--div-gap) var(--side); }
.divider + .sec, .divider + .foot { padding-top: 0; }
.divider img { width: 100%; height: auto; }

.sec { padding: 28px var(--side) 0; }
.sec--tight { padding-top: 12px; }

.h2 {
  font-family: var(--dot);
  font-weight: normal;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
  letter-spacing: .06em;
  text-shadow: 2px 2px 0 #7a5200;
}
.lead { color: var(--muted); font-size: 12px; text-align: center; margin-top: 4px; }
.center { text-align: center; }

/* ── アプリのダウンロード ─────────────────── */
.apps { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 8px; }
.app {
  display: flex; align-items: center;
  padding: 8px;
  text-decoration: none;
  border: 3px solid var(--frame);
  box-shadow: 4px 4px 0 #333;
}
.app > img { width: 48px; height: 48px; flex: none; margin-right: 8px; }
.app b { display: block; font-family: var(--dot); font-weight: normal; font-size: 16px; line-height: 1.3; }
.app small { display: block; font-size: 12px; opacity: .92; }
.app--normal { background: var(--normal); }
.app--wide { background: var(--wide); }
.app--full { grid-column: 1 / -1; }
.app--main { padding: 10px 12px; }
.app--main > img { width: 64px; height: 64px; margin-right: 12px; }
.badge {
  margin-left: auto; align-self: center; flex: none;
  font-size: 12px; font-weight: bold; line-height: 1.6;
  background: #fff; padding: 0 8px;
}
.app--normal .badge { color: var(--normal-dark); }
.app--wide .badge { color: #8a4511; }

/* ── アプリ欄(従来の形) ─────────────────── */
.dl { display: flex; border: 2px solid var(--frame); }
.dl__item { flex: 1 1 50%; display: flex; align-items: center; padding: 4px 6px; color: #fff; text-decoration: none; min-width: 0; }
.dl__item img { width: 50px; height: 50px; flex: none; margin-right: 8px; }
.dl__item b { font-size: 13px; line-height: 1.45; }
.dl__item--normal { background: var(--normal); }
.dl__item--wide { background: var(--wide); border-left: 2px solid var(--frame); }

/* ── ボタン(別のステージも見る など) ─────────────────── */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-block;
  font-family: var(--dot);
  font-size: 16px; line-height: 1;
  color: #3b2a00; background: #ffe14a;
  border: 0; border-radius: 0;
  padding: 13px 22px 15px;
  min-width: 128px; min-height: 44px;
  cursor: pointer;
  -webkit-clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  box-shadow: inset 0 4px 0 #fff3a6, inset 0 -5px 0 #c99b00;
}
.btn:active { box-shadow: inset 0 5px 0 #c99b00, inset 0 -2px 0 #fff3a6; padding: 15px 22px 13px; }
.reload { margin-top: 20px; text-align: center; }

/* ── 版のラベル ───────────────────────── */
/* 案 A: ドットの角(ゲームのウインドウ風)。角を 1 段ずつ欠き、上を明るく・下を暗くする */
.tag {
  display: inline-block;
  font-family: var(--dot); font-size: 16px; font-weight: normal; line-height: 1.5; letter-spacing: .06em;
  padding: 5px 18px 7px; margin: 20px 0 10px;
  color: #fff;
  -webkit-clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -4px 0 rgba(0,0,0,.35);
  text-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.tag--normal { background: var(--normal); }
.tag--wide { background: var(--wide); }
.tag--top { margin-top: 0; }
.center { line-height: 0; }
.center .tag { line-height: 1.5; }

/* ── 作品の画像(黒い帯を除いてステージ部分だけを見せる) ──
   aspect-ratio は iOS 15 から。padding-top の比率で高さを作り、画像を上下中央に置く */
.thumb {
  display: block;
  width: 100%;  /* grid の中で margin: auto を使っても縮まないように(実寸の上限は max-width) */
  background: #fff;
  padding: 3px;
  box-shadow: 4px 4px 0 #333;
  text-decoration: none;
}
.thumb .crop { position: relative; overflow: hidden; background: #000; height: 0; }
.thumb .crop img {
  position: absolute; left: 0; top: 50%; width: 100%; height: auto;
  -webkit-transform: translateY(-50%); transform: translateY(-50%);
  image-rendering: crisp-edges; image-rendering: pixelated;
}
.thumb--normal .crop { padding-top: 71.429%; }  /* 21x15 マス */
.thumb--wide .crop { padding-top: 32.258%; }    /* 31x10 マス */
.thumb--normal { max-width: 321px; margin-left: auto; margin-right: auto; }  /* 315px + 枠 3px x 2 */
.thumb--wide { max-width: 316px; margin-left: auto; margin-right: auto; }    /* 310px + 枠 3px x 2 */
.grid2 .thumb .crop img { image-rendering: auto; }
@media (max-width: 352px) { .thumb .crop img { image-rendering: auto; } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; grid-gap: var(--gap); }
.stack { display: grid; grid-gap: var(--gap); padding-bottom: 4px; }  /* 影(4px)のぶん。区切り線との間を 24px にそろえる */

/* ── 特集ステージのボタン ───────────────── */
.features { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; margin-top: 12px; }
.features a { display: block; }
.features img { width: 100%; height: auto; }
.features a:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }

/* ── 作品ページ ──────────────────────── */
.play { display: block; width: 100px; margin: 14px auto 0; }
.play img { width: 100px; height: 75px; }
.play-note { text-align: center; font-size: 13px; margin-top: 6px; }
.get-app {
  display: block; text-align: center; margin: 10px auto 0;
  font-size: 13px; font-weight: bold; color: var(--accent);
  padding: 8px; text-decoration: underline;
}
.get-app--wide { color: #ffb36b; }

.panel { border: 2px dashed #555; padding: 12px; }
.panel p { font-size: 12px; color: #ff9a9a; text-align: center; }

.copybox {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%;
  background: #fff; color: #000;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5; text-align: center;
  padding: 10px 8px;
  margin-top: 10px;
  border: 0; border-radius: 0;
  word-break: break-all;
  cursor: pointer;
  -webkit-user-select: text; user-select: text;  /* コピーできないとき長押しで選べるように */
}
.copy-label { text-align: center; font-size: 12px; color: var(--accent); margin-top: 4px; min-height: 1.5em; line-height: 1.5; cursor: pointer; }

.h2--sub { margin-top: 24px; }
.share { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 8px; margin-top: 12px; }
.share img { width: 100%; height: auto; }

.sns { text-align: center; }
.sns a { display: inline-block; }
.sns img { width: 160px; height: auto; }

.foot { padding: 24px var(--side) 0; text-align: center; font-size: 15px; }
.foot a, .foot b { display: inline-block; padding: 8px; }
.foot .top-link { font-family: var(--dot); font-size: 16px; }
.foot .lang b { color: var(--accent); }

/* ── 特集ページ(include/piko_feature.inc) ──────────────── */
.fbanner { text-align: center; margin-bottom: 10px; }
.fbanner img { display: inline-block; width: 300px; height: auto; image-rendering: crisp-edges; image-rendering: pixelated; }
.fcount { font-family: var(--dot); font-size: 14px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin: 16px auto; max-width: 321px; }
.pager__now { font-family: var(--dot); font-size: 16px; color: var(--muted); }
.pager__now b { color: #fff; font-weight: normal; }
.pager__arrow { display: block; width: 47px; height: 44px; }
.pager__arrow img { width: 47px; height: 44px; image-rendering: crisp-edges; image-rendering: pixelated; }
/* 1 作品 = 番号 → 画像(横いっぱい)→ PLAY(右)。作品の間は四角いドットの線 */
.flist { display: block; max-width: 321px; margin: 0 auto; }
.fitem {
  display: grid; grid-template-columns: 1fr; grid-template-areas: "no" "img" "play";
  padding: 18px 0 20px;
  background: linear-gradient(90deg, #555 50%, transparent 0) 0 0 / 8px 2px repeat-x;
}
.fitem:first-child { background: none; padding-top: 0; }
.fitem:last-child { padding-bottom: 0; }
.fno {
  grid-area: no; justify-self: start; margin-bottom: 8px; white-space: nowrap;
  font-family: var(--dot); font-size: 14px; line-height: 1.4; color: #fff; letter-spacing: .04em;
  padding: 2px 10px 4px; background: var(--normal);
  -webkit-clip-path: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
  clip-path: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.3);
  text-shadow: 1px 1px 0 rgba(0,0,0,.35);
}
.fitem--wide .fno { background: var(--wide); }
.fitem .thumb { grid-area: img; min-width: 0; }
.fplay { grid-area: play; justify-self: center; margin-top: 10px; }
.fplay img { width: 80px; height: 60px; }
/* 見た目では隠し、読み上げにだけ出す */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.features a.is-current { outline: 3px solid var(--accent); outline-offset: 0; }
