:root {
  --bg: #f6eedd; --bg2: #ecdfc8; --ink: #3a2a1a; --sub: #7a634a; --card: #fffaf0; --line: #e2cfab;
  --red: #d9503f; --teal: #2f8f89; --gold: #f2c230; --dark: #2b2520;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  background-image: radial-gradient(rgba(141,108,66,.16) 1.6px, transparent 1.7px); background-size: 28px 28px;
  font: 16px/1.75 "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
a { color: var(--teal); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.top { background: var(--dark); color: #f6eedd; }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe6a3, #d8b04a 60%, #8a651b); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.top nav { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
.top nav a { color: #e9dcc4; text-decoration: none; }
.top nav a:hover { color: #fff; }
.brand, .top nav a { white-space: nowrap; }
@media (max-width: 480px) {
  .top .wrap { gap: 8px; }
  .brand { font-size: 15px; gap: 6px; }
  .brand .dot { width: 18px; height: 18px; }
  .top nav { gap: 10px; font-size: 13px; }
}

/* ヒーロー */
.hero { padding: 40px 0 24px; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.3; margin: 0 0 8px; letter-spacing: .02em; }
.hero p { color: var(--sub); margin: 0 0 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 22px; border-radius: 14px; font-weight: 700; text-decoration: none; color: var(--ink); background: #efe2c8; box-shadow: 0 3px 0 #cdb58c; border: 0; font-size: 16px; cursor: pointer; }
.btn.main { background: var(--red); color: #fff; box-shadow: 0 3px 0 #8f2c20; }
.btn.teal { background: var(--teal); color: #fff; box-shadow: 0 3px 0 #1f6d68; }
.btn small { font-weight: 400; opacity: .85; font-size: 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* 見出しとカード */
section { padding: 22px 0; }
h2 { font-size: 22px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
h2::before { content: ''; width: 10px; height: 22px; border-radius: 3px; background: var(--gold); }
.card { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 6px 18px rgba(80,50,20,.08); }
.game { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 18px; align-items: center; }
.game .shot { border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: #ece2cf; }
.game .shot img { width: 100%; height: auto; }
.game h3 { margin: 0 0 4px; font-size: 22px; }
.game p { margin: 0 0 12px; color: var(--sub); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #e7f3f2; color: var(--teal); margin-right: 4px; }
@media (max-width: 640px) { .game { grid-template-columns: 1fr; } .game .shot { max-width: 100%; } }

/* 動画 */
#videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.video { display: block; text-align: left; padding: 0; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); color: inherit; font: inherit; cursor: pointer; }
div.video { cursor: default; }
.video .thumb, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; background: #d8c8a8 center / cover no-repeat; position: relative; border: 0; }
.video .play { position: absolute; left: 50%; top: 50%; width: 56px; height: 40px; margin: -20px -28px; border-radius: 12px; background: rgba(217,80,63,.92); color: #fff; display: grid; place-items: center; font-size: 18px; }
.video .vt { display: block; padding: 8px 12px 10px; font-weight: 700; }
.video .vt small { font-weight: 400; color: var(--sub); }

/* 広告枠: 中身(広告コード)が入るまでは表示しない。?ads=preview で点線の枠を出す */
.ad-slot { margin: 18px auto; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.ads-preview .ad-slot:empty { display: grid; place-items: center; border: 2px dashed #c8ad7e; border-radius: 8px; color: #a0855d; font-size: 13px; }
.ads-preview .ad-slot:empty::after { content: '広告枠 ' attr(data-slot) ' (' attr(data-size) ')'; }
.ads-preview .ad-slot[data-size="300x250"]:empty { width: 300px; height: 250px; }
.ads-preview .ad-slot[data-size="728x90"]:empty { width: min(728px, 100%); height: 90px; }
.ads-preview .ad-slot[data-size="320x100"]:empty { width: 320px; height: 100px; }
.ad-label { font-size: 11px; color: #a0855d; text-align: center; margin: 0; }
.ad-label:has(+ .ad-slot:empty) { display: none; }
.ads-preview .ad-label { display: block; }

/* フッター */
footer { margin-top: 28px; padding: 22px 0 36px; background: var(--dark); color: #cbbca2; font-size: 13px; }
footer a { color: #f0e2c6; }
footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

/* ゲームのページ */
.play-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 16px 0; align-items: start; }
.frame { background: #2b2520; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 26px rgba(40,25,10,.25); }
.frame iframe { display: block; width: 100%; height: min(86vh, 900px); min-height: 560px; border: 0; }
.side { display: flex; flex-direction: column; gap: 14px; }
.side h1 { font-size: 24px; margin: 0; }
.side ol { padding-left: 1.3em; margin: 6px 0; }
.side ul.modes { list-style: none; padding: 0; margin: 6px 0; font-size: 15px; }
.side ul.modes li { padding: 3px 0; }
@media (max-width: 860px) {
  .play-page { grid-template-columns: 1fr; padding: 0; gap: 12px; }
  .frame { border-radius: 0; margin: 0 -16px; }
  /* 下に続き(遊び方・完全版・広告)があると分かるよう、次のカードの頭が少し見える高さにする。
     ゲームの画面はタッチでページを動かせないので、この見えている所が下へ進む手がかりになる */
  .frame iframe { height: calc(100svh - 56px - 72px); min-height: 480px; }
}
.prose h2 { margin-top: 24px; }
.prose p, .prose li { color: #4a3826; }
