* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #120e1c;
  color: #f6ecd2;
  font-family: "Kaisei Decol", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

/* 上にA、下にBを3つ */
.page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 12px;
}

/* A：しめまるーむの背景と文字（index.html の入口と同じ見た目） */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #2a2140;
  border: 2px solid #c9a85a;
  outline: 1px solid rgba(201, 168, 90, 0.55);
  outline-offset: -8px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("img/bg-shimemaru.jpg") center / cover no-repeat;
  filter: brightness(0.4);
}

.hero-head {
  position: relative;
  padding: clamp(28px, 6vw, 56px) 16px clamp(20px, 4vw, 36px);
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.hero-title {
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f3d98b;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85), 0 0 18px rgba(243, 217, 139, 0.35);
}

/* タイトル下の飾り線 */
.hero-title::after {
  content: "";
  display: block;
  width: 70%;
  height: 1px;
  margin: 0.35em auto 0;
  background: linear-gradient(90deg, transparent, #c9a85a, transparent);
}

.hero-text {
  margin-top: 0.7em;
  font-size: clamp(0.9rem, 2.2vw, 1.15rem);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* 説明欄（3行ぶんの高さを確保） */
.hero-desc {
  position: relative;
  min-height: calc(1.8em * 3 + 32px);
  padding: 16px clamp(20px, 5%, 48px);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  line-height: 1.8;
  border-top: 1px solid rgba(201, 168, 90, 0.55);
  background: rgba(18, 14, 28, 0.45);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* B：ゲームの入口を横に3つずつ。高さは固定で、増えたら下に行が足される（ページごとスクロール） */
.games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}

/* 狭い画面では1列に縦並び */
@media (max-width: 700px) {
  .games {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }
}

/* 画像が来るまでは白地に文字だけ */
.game {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  color: #2a2140;
  text-decoration: none;
  text-align: center;
  background: #fff;
  border: 2px solid #c9a85a;
  transition: transform 0.2s, box-shadow 0.2s;
}

.game:hover,
.game:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.game:focus-visible {
  outline: 3px solid #f3d98b;
}

.game-title {
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  letter-spacing: 0.04em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* タイトル画面の画像で埋める（ロゴが中央に来るように切り取った画像）。文字は画像の中にあるので見えなくする */
.game {
  background: #2a2140 center / cover no-repeat;
}
.game-tot { background-image: url("img/title-tot.jpg"); }
.game-acrobatline { background-image: url("img/title-acrobatline.jpg"); }
.game-honmono { background-image: url("img/title-honmono.jpg"); }
.game .game-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
