:root {
  color-scheme: light;
  --bg: #fff7ee;
  --fg: #1f1a2e;
  --card-bg: #fff;
  --border: #eee0f5;
  --accent: #ff5da2;
  --muted: #7a7186;

  /* 候補ごとのハッピーカラー(6色) */
  --c-a: #ff6b6b;  /* 猫との距離: コーラルレッド */
  --c-b: #ffb703;  /* last-draw: マリーゴールド */
  --c-c: #4cc9f0;  /* polarity-daily: スカイブルー */
  --c-d: #06d6a0;  /* park-attendant: ミント */
  --c-e: #9d4edd;  /* guild-board-idle: バイオレット */
  --c-f: #ff5da2;  /* deathless-dungeon: ピンク */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 20px calc(20px + env(safe-area-inset-right, 0px)) 20px calc(20px + env(safe-area-inset-left, 0px));
  background:
    radial-gradient(700px 380px at 100% 0%, rgba(255, 183, 3, 0.18), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(76, 201, 240, 0.18), transparent 60%),
    radial-gradient(900px 500px at 50% -10%, rgba(255, 93, 162, 0.14), transparent 55%),
    var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-lg, 18px);
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(80, 50, 100, 0.14);
}

.notice {
  position: relative;
  background: linear-gradient(180deg, #fff2c2, #ffe38a);
  border: none;
  border-radius: 14px;
  padding: 12px 14px 12px 44px;
  margin-bottom: 18px;
  font-size: 0.9em;
  font-weight: 700;
  color: #6b4a00;
  box-shadow: 0 6px 18px rgba(255, 183, 3, 0.25);
}
.notice::before {
  content: "🔒";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15em;
}

h1 {
  font-size: 1.7em;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: .3px;
  background: linear-gradient(90deg, #ff5da2, #ff8a3d 45%, #4cc9f0 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.candidates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.section-title {
  margin: 28px 0 4px;
  font-size: 1.1em;
  font-weight: 800;
  color: var(--fg);
}

.recent-updates {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 8px;
}
.recent-updates .section-title {
  margin: 0 0 2px;
}
.recent-updates-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85em;
}
.recent-updates ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.9em;
}
.recent-updates li {
  margin-bottom: 4px;
}
.ru-date {
  font-weight: 800;
  color: var(--accent);
  margin-right: 4px;
}

.update-note {
  margin: -6px 0 10px;
  font-size: 0.78em;
  color: var(--muted);
}

.card--extra {
  --card-accent: #94a3b8;
}
.card--extra .badge {
  background: #fff;
  border: 2px solid var(--card-accent);
}

.card {
  position: relative;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 6px 18px rgba(80, 50, 100, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.card::before {
  /* 上端のカラーバー */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--card-accent, var(--accent));
}
.card--a { --card-accent: var(--c-a); }
.card--b { --card-accent: var(--c-b); }
.card--c { --card-accent: var(--c-c); }
.card--d { --card-accent: var(--c-d); }
.card--e { --card-accent: var(--c-e); }
.card--f { --card-accent: var(--c-f); }

.thumb-link {
  display: block;
  margin: -18px -16px 12px;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  aspect-ratio: 389 / 696;
  max-height: 320px;
}
.thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4eef9;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover, .card:focus-within {
    transform: translateY(-4px) rotate(-0.3deg);
    box-shadow: 0 14px 28px rgba(80, 50, 100, 0.16);
    border-color: var(--card-accent, var(--accent));
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card-accent, var(--accent));
  color: #fff;
  font-weight: 900;
  font-size: 0.85em;
  margin-bottom: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.card h2 {
  font-size: 1.08em;
  font-weight: 800;
  margin: 0 0 6px;
}

.card h2 .emoji {
  margin-left: 2px;
}

.tagline {
  margin: 0 0 8px !important;
  color: var(--fg) !important;
  font-size: 0.95em !important;
  font-weight: 700;
}

.card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92em;
}

.card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 800;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(.96); }

.btn.play {
  background: linear-gradient(135deg, var(--card-accent, var(--accent)), var(--accent));
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 93, 162, 0.35);
}
.btn.play::before { content: "▶"; margin-right: 6px; font-size: 0.8em; }

@media (hover: hover) and (pointer: fine) {
  .btn.play:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255, 93, 162, 0.4); }
}

.btn.feedback {
  background: #fff;
  border: 2px solid var(--border);
  color: var(--fg);
}
.btn.feedback::before { content: "💬"; margin-right: 6px; }

@media (hover: hover) and (pointer: fine) {
  .btn.feedback:hover { border-color: var(--card-accent, var(--accent)); }
}

/* 第2段階(公開後)の広告枠。第1段階では空のまま何も出さない。 */
.ad-slot {
  display: none;
}

.loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

/* ゲーム画面のラッパー(トップへ戻るバー + iframe)。 */
html.pt-play, body.pt-play {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

/* ゲームのcanvasサイズを圧迫しないよう、バーはiframeの上に重ねるオーバーレイにする
   (レイアウト分を差し引くとGodotの adaptive resize でcanvasごと縮む問題があったため)。 */
.pt-topbar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: env(safe-area-inset-left, 0px);
  background: linear-gradient(135deg, rgba(255, 93, 162, 0.85), rgba(76, 201, 240, 0.85));
  border-radius: 0 0 14px 0;
  z-index: 10;
}

.pt-topbar a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 800;
  padding: 8px 12px;
}

.pt-frame {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 検索に読まれる本文(2026-10-19)。ゲームの遊びを邪魔しないよう、右上の小さなボタンで開く開閉式。 */
.pt-about { position: fixed; top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); z-index: 11; }
.pt-about > summary { list-style: none; cursor: pointer; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  color: #fff; font: 800 1rem/1 Georgia, serif; font-style: italic;
  background: linear-gradient(135deg, rgba(255, 93, 162, 0.85), rgba(76, 201, 240, 0.85)); border-radius: 0 0 0 14px; }
.pt-about > summary::-webkit-details-marker { display: none; }
.pt-about-body { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 40px); left: 8px; right: 8px; margin-left: auto; max-width: 560px;
  max-height: calc(100vh - 60px); max-height: calc(100dvh - 60px); overflow-y: auto; box-sizing: border-box;
  background: #fffaf2; color: #3a2f26; border-radius: 12px; padding: 14px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); line-height: 1.65; font-size: 0.92rem; }
.pt-about-body h1 { font-size: 1.05rem; margin: 0 0 8px; line-height: 1.4; }
.pt-about-body img { float: right; margin: 0 0 6px 10px; height: auto; border-radius: 8px; }
.pt-about-body p { margin: 0 0 8px; }
.pt-about-close { font: inherit; padding: 6px 14px; border: 1px solid #c9b79c; border-radius: 8px; background: #fff; color: inherit; cursor: pointer; }
.about-site p { line-height: 1.7; }
