/* 名言ゲームの共通の見た目（/games/）。大人っぽく：黒・金・明朝。ゲームの画面は .gm-stage の中に各ゲームが作る */
.gm-hero, .gm-head { background: radial-gradient(1100px 480px at 50% 0%, #2a2733 0%, #131217 58%, #0c0c0f 100%); color: #f3ede2; margin-top: -1px; text-align: center; }
.gm-hero { padding: 58px 0 46px; position: relative; overflow: hidden; }
.gm-hero.has-img { background: linear-gradient(180deg, rgba(12, 12, 15, 0.55), rgba(12, 12, 15, 0.92)), var(--img) center / cover; }
.gm-head { padding: 34px 0 22px; }
.gm-k { margin: 0 0 10px; font: 600 11.5px/1.6 'Poppins', sans-serif; letter-spacing: 0.24em; color: #c9a24a; }
.gm-hero h1, .gm-head h1 { margin: 0 0 12px; font: 800 clamp(30px, 5.6vw, 56px) / 1.25 'Shippori Mincho B1', var(--jp), serif; letter-spacing: 0.05em; }
.gm-head h1 { font-size: clamp(26px, 4.4vw, 42px); }
.gm-hero h1 small, .gm-head h1 small { display: block; margin-top: 6px; font: italic 600 clamp(14px, 1.8vw, 18px) 'Playfair Display', Georgia, serif; letter-spacing: 0.12em; color: #e1c47e; }
.gm-lead { max-width: 40em; margin: 0 auto; font-size: 15px; line-height: 1.9; color: rgba(243, 237, 226, 0.82); }

/* ── ハブ：ゲームのカード */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 34px 0 60px; }
.gm-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 22px; border-radius: 18px; overflow: hidden; color: #f3ede2; text-decoration: none; background: linear-gradient(160deg, #1c1a22, #0e0d11); isolation: isolate; box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.7); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s; }
.gm-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.gm-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 13, 0.05) 20%, rgba(10, 10, 13, 0.92) 78%); }
.gm-card:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -26px rgba(0, 0, 0, 0.8); }
.gm-card:hover img { transform: scale(1.06); }
.gm-card .gm-no { position: absolute; top: 16px; left: 20px; font: 600 11px 'Poppins', sans-serif; letter-spacing: 0.2em; color: #e1c47e; }
.gm-card .gm-kind { position: absolute; top: 14px; right: 16px; padding: 4px 11px; border-radius: 999px; background: rgba(10, 10, 13, 0.6); border: 1px solid rgba(225, 196, 126, 0.5); font: 700 11.5px var(--jp); color: #e1c47e; backdrop-filter: blur(4px); }
.gm-card b { font: 800 24px/1.35 'Shippori Mincho B1', var(--jp), serif; }
.gm-card i { font: italic 600 13px 'Playfair Display', Georgia, serif; letter-spacing: 0.1em; color: #e1c47e; }
.gm-card span.gm-cl { margin-top: 6px; font-size: 13.5px; line-height: 1.7; opacity: 0.85; }
.gm-card em { margin-top: 12px; align-self: flex-start; padding: 8px 18px; border-radius: 999px; background: #c9a24a; color: #141217; font: 700 13px var(--jp); font-style: normal; }

/* ── 各ゲームのページ */
.gm-stage-wrap { padding-top: 18px; padding-bottom: 8px; }
.gm-stage { position: relative; width: 100%; max-width: 980px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #0c0c0f; color: #f3ede2; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(201, 162, 74, 0.22); min-height: 420px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.gm-stage:fullscreen { max-width: none; border-radius: 0; display: flex; align-items: center; justify-content: center; }
.gm-tools { display: flex; justify-content: center; gap: 10px; margin: 12px 0 0; }
.gm-tools button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: inherit; font: 600 12.5px var(--jp); cursor: pointer; }
.gm-tools button[data-gm-mute]::before { content: '♪ 音：オン'; }
.gm-tools button[data-gm-mute][aria-pressed='true']::before { content: '♪ 音：オフ'; }
.gm-how { padding-top: 26px; padding-bottom: 10px; max-width: 760px; }
.gm-how h2, .gm-more h2 { font: 800 22px/1.4 'Shippori Mincho B1', var(--jp), serif; margin: 0 0 12px; }
.gm-how ol { margin: 0; padding-left: 1.4em; font-size: 15px; line-height: 2; }
.gm-more { padding-top: 26px; padding-bottom: 60px; }
.gm-more .gm-grid { padding: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gm-more .gm-card { min-height: 170px; padding: 16px; }
.gm-more .gm-card b { font-size: 17px; }
.gm-more .gm-card span.gm-cl, .gm-more .gm-card em { display: none; }
.gm-err { padding: 40px; text-align: center; }

/* ── ゲームの中で共通に使える部品（使うかどうかは各ゲーム次第） */
.gm-ov { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(28, 26, 34, 0.92), rgba(8, 8, 10, 0.97)); }
.gm-ov h2 { margin: 0; font: 800 clamp(26px, 4.6vw, 44px) / 1.25 'Shippori Mincho B1', var(--jp), serif; }
.gm-ov h2 small { display: block; font: italic 600 14px 'Playfair Display', Georgia, serif; letter-spacing: 0.14em; color: #e1c47e; }
.gm-ov p { margin: 0; max-width: 34em; font-size: 14.5px; line-height: 1.8; opacity: 0.86; }
.gm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; padding: 12px 26px; border-radius: 999px; border: 0; background: linear-gradient(180deg, #e1c47e, #b8913c); color: #141217; font: 800 15px var(--jp); cursor: pointer; box-shadow: 0 10px 24px -12px rgba(201, 162, 74, 0.8); transition: transform 0.15s, box-shadow 0.2s; }
.gm-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(201, 162, 74, 0.9); }
.gm-btn:active { transform: translateY(1px); }
.gm-btn.ghost { background: transparent; color: #f3ede2; border: 1px solid rgba(243, 237, 226, 0.35); box-shadow: none; }
.gm-hud { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font: 700 13px 'Poppins', var(--jp), sans-serif; letter-spacing: 0.06em; color: #e1c47e; background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent); }
.gm-ja { font: 700 clamp(14px, 2vw, 17px) / 1.6 'Shippori Mincho B1', var(--jp), serif; }
.gm-en { font: italic 600 clamp(16px, 2.4vw, 22px) / 1.45 'Playfair Display', Georgia, serif; }
.gm-pop { animation: gm-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes gm-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-shake { animation: gm-shake 0.4s; }
@keyframes gm-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@media (max-width: 640px) { .gm-stage { border-radius: 0; margin: 0 -14px; width: calc(100% + 28px); } .gm-card { min-height: 240px; } }
@media (prefers-reduced-motion: reduce) { .gm-card, .gm-card img { transition: none; } .gm-pop, .gm-shake { animation: none; } }
/* 各ゲームの頭にも Codex の油彩（g-<id>.webp があるとき） */
.gm-head.has-img { position: relative; padding: 64px 0 34px; background: linear-gradient(180deg, rgba(12, 12, 15, 0.42), rgba(12, 12, 15, 0.9)), var(--img) center 45% / cover; }
@media (max-width: 640px) { .gm-head.has-img { padding: 44px 0 24px; } }
