/* あそべる診断ラボ 共通スタイル */
:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2b2b35;
  --sub: #6f6f7d;
  --primary: #ff6b6b;
  --primary-dark: #e85555;
  --accent: #ffd166;
  --blue: #4ecdc4;
  --line: #06c755;
  --x: #0f1419;
  --fb: #1877f2;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(43, 43, 53, 0.08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--primary-dark); }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー（追従） */
.site-header {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff9e7d 100%);
  padding: 10px 0;
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 90;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.hdr-side { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.site-logo {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-logo span { font-size: 1.3rem; margin-right: 6px; }
.nav-btn {
  background: rgba(255,255,255,0.18); border: none; color: #fff; font-size: 1.05rem;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-family: inherit;
}
.nav-btn:hover { background: rgba(255,255,255,0.3); }

/* カテゴリドロワー（スライドイン） */
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(260px, 80vw); z-index: 100;
  background: #fff; box-shadow: 4px 0 24px rgba(0,0,0,0.18); padding: 70px 14px 20px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(-105%); transition: transform 0.22s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 14px; right: 12px;
  background: #ece8e1; color: var(--sub);
}
/* ブランドアイコン（site-logo内） */
.logo-icon { width: 26px; height: 26px; margin-right: 8px; vertical-align: -6px; border-radius: 7px; }
.drawer-link {
  display: block; text-decoration: none; color: var(--text); font-weight: 700;
  padding: 13px 14px; border-radius: 10px; font-size: 0.95rem;
}
.drawer-link:hover { background: #fff3f0; color: var(--primary-dark); }
.drawer-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 95;
  opacity: 0; transition: opacity 0.22s ease;
}
.drawer-bg.show { opacity: 1; }
.search-none { text-align: center; color: var(--sub); padding: 28px 0; font-weight: 700; }

/* 検索オーバーレイ */
.search-overlay {
  position: fixed; inset: 0; background: rgba(20,18,28,0.55); z-index: 110;
  display: flex; justify-content: center; align-items: flex-start; padding: 60px 14px;
}
/* display:flex が hidden属性（UAのdisplay:none）より強いため明示的に消す */
.search-overlay[hidden] { display: none; }
.search-box {
  background: var(--bg); border-radius: var(--radius); width: 100%; max-width: 760px;
  max-height: 80vh; overflow-y: auto; padding: 16px; box-shadow: 0 12px 48px rgba(0,0,0,0.3);
}
.search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.search-row input {
  flex: 1; font-family: inherit; font-size: 1rem; padding: 11px 16px;
  border: 2px solid var(--primary); border-radius: 999px; outline: none;
}
.search-row .nav-btn { background: #ece8e1; color: var(--sub); flex-shrink: 0; }

/* セクションの「すべて見る」リンク（ピルボタンで目立たせる） */
.section-title { justify-content: space-between; }
.more-link {
  font-size: 0.8rem; font-weight: 800; text-decoration: none; color: #fff;
  background: var(--primary); border-radius: 999px; padding: 7px 16px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.35);
  transition: transform 0.12s ease, opacity 0.15s;
}
.more-link:hover { transform: translateY(-1px); opacity: 0.92; }

/* カテゴリチップ（トップ最上部のナビ。ヒーロー文言の代替）
   必ず1行: 折り返さず、収まらない幅では横スクロール（スクロールバーは非表示）。
   first/lastのmargin:autoで「収まる時は中央寄せ・あふれる時は端から自然スクロール」を両立 */
.cat-chips {
  display: flex; flex-wrap: nowrap; gap: 10px; padding: 26px 0 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; text-decoration: none; font-weight: 800; font-size: 0.95rem; color: var(--text);
  background: var(--card); border: 2px solid #f3d9c8; border-radius: 999px; padding: 10px 20px;
  box-shadow: var(--shadow); transition: transform 0.12s ease, border-color 0.12s, color 0.12s;
}
.cat-chip:first-child { margin-left: auto; }
.cat-chip:last-child { margin-right: auto; }
.cat-chip:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary-dark); }
@media (max-width: 480px) {
  .cat-chip { font-size: 0.85rem; padding: 8px 14px; }
}

/* スクリーンリーダー専用（視覚的に非表示のh1等） */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ヒーロー */
.hero { text-align: center; padding: 44px 16px 28px; }
.hero h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.hero p { color: var(--sub); font-size: 0.95rem; }

/* セクション */
.section-title {
  font-size: 1.15rem; font-weight: 800; margin: 36px 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after { content: ""; flex: 1; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), transparent); }

/* カードグリッド */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.content-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  display: block; transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}
.content-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(43,43,53,0.14); border-color: var(--accent); }
.content-card .card-emoji { font-size: 2rem; }
.content-card .card-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 10px; margin-bottom: 10px; display: block;
}
.content-card h3 { font-size: 1.05rem; margin: 6px 0 4px; }
/* 紹介文は3行で省略（カード縦幅の暴れ防止。短めの紹介文が前提＝CMSが長文を警告） */
.content-card p {
  font-size: 0.85rem; color: var(--sub);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* メインパネル（診断・クイズ画面） */
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 22px; margin: 24px 0; text-align: center;
}
.panel .big-emoji { font-size: 3.4rem; line-height: 1.2; }
.panel h1, .panel h2 { font-size: 1.3rem; margin: 12px 0 8px; }
.panel .desc { color: var(--sub); font-size: 0.92rem; margin-bottom: 16px; }

/* ボタン */
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 13px 30px; border-radius: 999px; transition: transform 0.1s ease, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #ff9e7d); color: #fff; box-shadow: 0 4px 12px rgba(255,107,107,0.4); }
.btn-ghost { background: transparent; color: var(--sub); border: 2px solid #e3e0da; }
.btn-block { display: block; width: 100%; margin: 10px 0; }

/* 選択肢 */
.choice-btn {
  display: block; width: 100%; margin: 10px 0; padding: 14px 18px;
  background: var(--bg); border: 2px solid #ece8e1; border-radius: 12px;
  font-family: inherit; font-size: 0.98rem; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; transition: border-color 0.12s, background 0.12s;
}
.choice-btn:hover { border-color: var(--primary); background: #fff3f0; }
.choice-btn:disabled { cursor: default; opacity: 0.85; }
.choice-btn.correct { border-color: #2dbd6e; background: #e9f9f0; }
.choice-btn.wrong { border-color: var(--primary); background: #ffecec; }

/* プレイ中の小タイトル（スタート画面廃止に伴いプレイ画面上部に常駐） */
.play-title {
  text-align: center; font-weight: 800; font-size: 0.92rem; color: var(--sub);
  margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 進捗バー */
.progress-wrap { background: #ece8e1; border-radius: 999px; height: 10px; margin: 14px 0 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--accent)); transition: width 0.25s ease; width: 0; }
.progress-label { font-size: 0.8rem; color: var(--sub); text-align: right; }

/* クイズ解説 */
.explanation {
  margin-top: 14px; padding: 14px; border-radius: 12px; background: #fffbe9;
  border: 1px solid #f2e3a8; font-size: 0.9rem; text-align: left;
}
.judge { font-size: 1.5rem; font-weight: 800; margin-top: 10px; }
.judge.ok { color: #2dbd6e; }
.judge.ng { color: var(--primary-dark); }

/* 結果カード */
.result-card {
  border: 3px solid var(--accent); border-radius: var(--radius);
  padding: 24px 18px; margin: 18px 0; background: linear-gradient(180deg, #fffdf5, #fff);
}
.result-card .result-label { font-size: 0.85rem; color: var(--sub); }
.result-card .result-name { font-size: 1.7rem; font-weight: 800; margin: 4px 0; letter-spacing: 0.02em; }
.result-card .result-emoji { font-size: 4rem; line-height: 1.3; }
.result-card .result-icon { width: 96px; height: 96px; object-fit: contain; }
/* 柄付きカード（applyResultStyle適用時）: 絵文字/アイコンを柄バンドに重なる白丸バッジにする。
   バッジはバンド直下に並べ替え（ラベル文字との重なり防止） */
.result-card.styled { display: flex; flex-direction: column; }
.result-card.styled .result-style-band { order: -2; }
.result-card.styled .result-emoji,
.result-card.styled .result-icon { order: -1; }
.result-card.styled .result-emoji,
.result-card.styled .result-icon {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; margin: -52px auto 8px; font-size: 3rem; line-height: 1;
  background: #fff; border-radius: 50%; border: 3px solid var(--accent);
  box-shadow: 0 4px 14px rgba(43, 43, 53, 0.14);
}
.result-card.styled .result-icon { padding: 10px; }
.result-card.styled .result-name { font-size: 1.85rem; }
.result-card .result-text { text-align: left; font-size: 0.95rem; margin-top: 12px; }
.result-card .result-advice {
  text-align: left; font-size: 0.9rem; margin-top: 12px; padding: 12px;
  background: #f0fbfa; border-radius: 10px; border: 1px solid #c9ece9;
}
.result-card .result-compatible { margin-top: 10px; font-size: 0.9rem; font-weight: 700; }

/* ランキング */
.ranking-list { list-style: none; text-align: left; margin: 16px 0; }
.ranking-list li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px dashed #ece8e1; font-weight: 600;
}
.ranking-list .rank-no { font-weight: 800; color: var(--sub); width: 2.6em; flex-shrink: 0; }
.ranking-list li:nth-child(1) { background: #fff8e0; border-radius: 10px; font-size: 1.1rem; }
.ranking-list li:nth-child(2) { background: #f4f4f6; border-radius: 10px; }
.ranking-list li:nth-child(3) { background: #fdf0e7; border-radius: 10px; }

/* VS画面（ソート） */
.vs-wrap { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.vs-item {
  flex: 1; background: var(--bg); border: 3px solid #ece8e1; border-radius: var(--radius);
  padding: 26px 8px; cursor: pointer; font-family: inherit; transition: border-color 0.12s, transform 0.1s;
}
.vs-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.vs-item .vs-emoji { font-size: 2.6rem; display: block; }
.vs-item .vs-name { font-weight: 800; font-size: 1.05rem; margin-top: 6px; display: block; }
.vs-label { font-weight: 800; color: var(--primary); font-size: 1.2rem; }

/* シェアボタン */
.share-box { margin: 22px 0 6px; }
.share-box .share-title { font-size: 0.9rem; font-weight: 700; color: var(--sub); margin-bottom: 10px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  color: #fff; font-weight: 700; font-size: 0.9rem; padding: 10px 18px;
  border-radius: 999px; border: none; cursor: pointer; font-family: inherit;
  transition: opacity 0.15s;
}
.share-btn:hover { opacity: 0.85; }
.share-x { background: var(--x); }
.share-line { background: var(--line); }
.share-fb { background: var(--fb); }
.share-copy { background: var(--sub); }

/* 広告枠（--pc/--spはデバイス別出し分け。renderAdsは非表示スロットに広告を入れない） */
.ad-slot { margin: 26px auto; text-align: center; }
@media (max-width: 768px) { .ad-slot--pc { display: none; } }
@media (min-width: 769px) { .ad-slot--sp { display: none; } }
.ad-placeholder {
  border: 2px dashed #d8d4cc; border-radius: 12px; padding: 28px 10px;
  color: #b5b1a8; font-size: 0.8rem; background: #fdfcfa;
}

/* お絵描き */
.oekaki-canvas-wrap { display: flex; justify-content: center; margin: 14px 0; }
#oekaki-canvas {
  border: 3px solid #ece8e1; border-radius: 12px; background: #fff;
  touch-action: none; max-width: 100%; cursor: crosshair;
}
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.palette .color-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #d8d4cc; cursor: pointer; padding: 0;
}
.palette .color-btn.active { box-shadow: 0 0 0 3px var(--primary); transform: scale(1.12); }
.brush-row { display: flex; gap: 8px; justify-content: center; margin: 8px 0 14px; flex-wrap: wrap; }
.brush-btn {
  font-family: inherit; font-size: 0.85rem; font-weight: 700; padding: 7px 14px;
  border-radius: 999px; border: 2px solid #ece8e1; background: #fff; cursor: pointer;
}
.brush-btn.active { border-color: var(--primary); color: var(--primary-dark); }
.theme-banner {
  background: #fff3da; border: 2px solid var(--accent); border-radius: 12px;
  padding: 10px 14px; font-weight: 700; margin: 12px 0;
}
.result-drawing { max-width: 220px; border-radius: 12px; border: 3px solid var(--accent); margin: 10px auto; display: block; }

/* スコアメーター */
.score-meter { margin: 14px auto; max-width: 320px; }
.score-meter .score-num { font-size: 2.4rem; font-weight: 800; color: var(--primary-dark); }

/* レコメンド */
.rec-box { margin: 26px 0 6px; text-align: center; }
.rec-title { font-size: 0.9rem; font-weight: 700; color: var(--sub); margin-bottom: 12px; }
.rec-grid { text-align: left; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rec-grid .content-card { padding: 14px; }
.rec-grid .content-card .card-emoji { font-size: 1.5rem; }
.rec-grid .content-card h3 { font-size: 0.92rem; }
.rec-grid .content-card p { font-size: 0.78rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* タグチップ（トップページ絞り込み） */
.tag-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.tag-chip {
  font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer;
  padding: 6px 16px; border-radius: 999px; border: 2px solid #ece8e1; background: #fff; color: var(--sub);
  transition: border-color 0.12s, color 0.12s;
}
.tag-chip:hover { border-color: var(--primary); }
.tag-chip.active { border-color: var(--primary); background: #fff3f0; color: var(--primary-dark); }

/* 言語切り替え */
.lang-switch { color: #fff; text-decoration: none; font-weight: 700; font-size: 0.85rem;
  border: 2px solid rgba(255,255,255,0.6); border-radius: 999px; padding: 4px 14px; }
.lang-switch:hover { background: rgba(255,255,255,0.15); }
.lang-wrap {
  display: inline-flex; align-items: center; gap: 6px; color: #fff;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.6);
  border-radius: 999px; padding: 4px 12px; font-size: 0.95rem;
}
.lang-select {
  font-family: inherit; font-weight: 700; font-size: 0.85rem; color: #fff;
  background: transparent; border: none; cursor: pointer; appearance: auto;
}
.lang-select option { color: var(--text); }

/* 結果カードの柄バンド（IP風デザイン演出） */
.result-style-band { height: 38px; border-radius: 10px; margin-bottom: 14px; }

/* メーカー・運勢 */
.maker-input {
  font-family: inherit; font-size: 1.05rem; text-align: center; width: 100%; max-width: 320px;
  padding: 12px 16px; border: 2px solid #ece8e1; border-radius: 12px; margin: 12px 0;
}
.maker-input:focus { outline: none; border-color: var(--primary); }
/* ステータス窓風のスロット表（メーカー・運勢の結果欄） */
.slot-list { list-style: none; text-align: left; margin: 14px 0; }
.slot-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px dashed #ece8e1;
}
.slot-list li:nth-child(odd) { background: rgba(250, 247, 242, 0.7); border-radius: 8px; }
.slot-list .slot-label {
  flex-shrink: 0; font-size: 0.78rem; font-weight: 800; color: var(--sub);
  background: #fff; border: 1.5px solid #ece8e1; border-radius: 999px; padding: 3px 12px;
}
.slot-list .slot-value { font-weight: 800; text-align: right; font-size: 1.02rem; }
.fortune-stars { letter-spacing: 2px; }
.fortune-level { font-size: 2.6rem; font-weight: 800; margin: 6px 0; }

/* アフィリエイト枠（PR表記必須） */
.affiliate-box {
  position: relative; background: #fffdf5; border: 2px solid var(--accent);
  border-radius: var(--radius); padding: 20px 16px 16px; margin: 16px 0; text-align: center;
}
.pr-badge {
  position: absolute; top: -11px; left: 14px; background: var(--sub); color: #fff;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; padding: 2px 12px; border-radius: 999px;
}
.aff-text { font-size: 0.9rem; margin-bottom: 12px; }
.aff-btn { font-size: 0.92rem; padding: 11px 26px; }

/* チェックリスト */
.check-list { list-style: none; text-align: left; margin: 14px 0; }
.check-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin: 7px 0;
  background: var(--bg); border: 2px solid #ece8e1; border-radius: 12px;
  cursor: pointer; font-weight: 600; font-size: 0.95rem; user-select: none;
  transition: border-color 0.12s, background 0.12s;
}
.check-item:hover { border-color: var(--primary); }
.check-item.on { background: #e9f9f0; border-color: #2dbd6e; }
.check-item .check-mark { font-size: 1.1rem; flex-shrink: 0; }

/* 10秒ストップ */
/* 数字は等幅・高さ固定。フェードしてもヒントが出てもレイアウトは1pxも動かさない */
.stop-display {
  font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums;
  margin: 14px 0 0; letter-spacing: 0.02em; height: 4.4rem; line-height: 4.4rem;
}
.stop-hint { height: 1.6rem; line-height: 1.6rem; color: var(--sub); font-weight: 700; font-size: 0.9rem; opacity: 0; margin-bottom: 10px; }
.stop-best-line { min-height: 1.3em; }
.stop-go { min-width: 240px; font-size: 1.2rem; padding: 18px 40px; }

/* スライドパズル */
.puzzle-wrap { display: flex; justify-content: center; margin: 14px 0; }
#puzzle-canvas { border: 3px solid #ece8e1; border-radius: 12px; touch-action: manipulation; max-width: 100%; cursor: pointer; background: #fff; }
.puzzle-stats { display: flex; gap: 18px; justify-content: center; font-weight: 700; color: var(--sub); font-size: 0.95rem; }

/* フッター */
.site-footer { margin-top: 48px; padding: 26px 0 36px; background: #2b2b35; color: #cfcfd8; font-size: 0.85rem; }
.site-footer .container { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.site-footer a { color: #ffd166; text-decoration: none; margin: 0 8px; }

/* 静的ページ */
.page-body { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px; margin: 24px 0; }
.page-body h1 { font-size: 1.4rem; margin-bottom: 16px; }
.page-body h2 { font-size: 1.1rem; margin: 22px 0 8px; }
.page-body p, .page-body li { font-size: 0.92rem; color: #44444f; }
.page-body ul { padding-left: 1.4em; }

@media (max-width: 480px) {
  .hero h1 { font-size: 1.3rem; }
  .panel { padding: 22px 14px; }
  .vs-item .vs-emoji { font-size: 2rem; }
  /* ヘッダーを1行に収める（モバイル） */
  .site-header .container { flex-wrap: nowrap; gap: 6px; }
  .hdr-side { gap: 6px; }
  .site-logo { font-size: 0.92rem; }
  .site-logo span { font-size: 1.05rem; margin-right: 4px; }
  .nav-btn { width: 34px; height: 34px; font-size: 0.95rem; flex-shrink: 0; }
  .lang-wrap { padding: 3px 8px; gap: 3px; flex-shrink: 0; }
  .lang-select { font-size: 0.76rem; max-width: 84px; }
}

/* ガチャ演出（即時結果系の結果リビール。common.js gachaReveal が生成） */
.gacha-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(24, 20, 34, 0.74);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
.gacha-overlay.out { opacity: 0; }
.gacha-stage {
  position: relative; width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.gacha-capsule { position: relative; width: 110px; height: 110px; animation: gacha-shake 0.85s ease-in; }
.gacha-cap-top, .gacha-cap-bottom {
  position: absolute; left: 0; width: 110px; height: 55px;
  transition: transform 0.32s cubic-bezier(0.2, -0.4, 0.4, 1.3), opacity 0.32s;
}
.gacha-cap-top {
  top: 0; border-radius: 110px 110px 0 0;
  background: linear-gradient(180deg, #fffdf8, #efe9dd);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}
.gacha-cap-bottom {
  bottom: 0; border-radius: 0 0 110px 110px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.12);
}
.gacha-cap-shine {
  position: absolute; top: 13px; left: 17px; width: 28px; height: 15px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); transform: rotate(-25deg); transition: opacity 0.2s;
}
@keyframes gacha-shake {
  0% { transform: rotate(0); }
  15% { transform: rotate(-10deg) translateX(-3px); }
  30% { transform: rotate(9deg) translateX(3px); }
  45% { transform: rotate(-11deg) translateX(-4px); }
  60% { transform: rotate(10deg) translateX(4px); }
  72% { transform: rotate(-12deg) translateX(-5px); }
  84% { transform: rotate(12deg) translateX(5px); }
  100% { transform: rotate(0) scale(1.07); }
}
.gacha-overlay.pop .gacha-cap-top { transform: translateY(-95px) rotate(-20deg); opacity: 0; }
.gacha-overlay.pop .gacha-cap-bottom { transform: translateY(95px) rotate(16deg); opacity: 0; }
.gacha-overlay.pop .gacha-cap-shine { opacity: 0; }
.gacha-flash {
  position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe9a8 45%, rgba(255, 233, 168, 0) 72%);
  transform: scale(0); opacity: 0; pointer-events: none;
}
.gacha-overlay.pop .gacha-flash { animation: gacha-flash 0.6s ease-out forwards; }
@keyframes gacha-flash {
  0% { transform: scale(0); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: scale(22); opacity: 0; }
}
.gacha-rays {
  position: absolute; inset: -50px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 214, 102, 0) 0deg 12deg, rgba(255, 214, 102, 0.30) 12deg 24deg);
  transform: scale(0); opacity: 0;
}
.gacha-overlay.pop .gacha-rays { animation: gacha-rays 0.85s ease-out 0.05s forwards; }
@keyframes gacha-rays {
  0% { transform: scale(0.2) rotate(0); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scale(1.25) rotate(40deg); opacity: 0; }
}
.gacha-burst { position: absolute; inset: 0; margin: auto; width: 0; height: 0; pointer-events: none; }
.gacha-burst i { position: absolute; width: 15px; height: 15px; border-radius: 3px; opacity: 0; box-shadow: 0 0 6px rgba(0, 0, 0, 0.12); }
.gacha-overlay.pop .gacha-burst i { animation: gacha-burst 0.8s cubic-bezier(0.15, 0.6, 0.35, 1) 0.06s forwards; }
@keyframes gacha-burst {
  0% { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(560deg) scale(0.55); opacity: 0; }
}
.gacha-burst i:nth-child(1)  { background: #ff6b6b; --tx: 150px;  --ty: 0; }
.gacha-burst i:nth-child(2)  { background: #ffd166; --tx: 104px;  --ty: -62px; border-radius: 50%; }
.gacha-burst i:nth-child(3)  { background: #4ecdc4; --tx: 76px;   --ty: -132px; }
.gacha-burst i:nth-child(4)  { background: #5a8dee; --tx: 0;      --ty: -152px; border-radius: 50%; }
.gacha-burst i:nth-child(5)  { background: #b388eb; --tx: -76px;  --ty: -132px; }
.gacha-burst i:nth-child(6)  { background: #ff9f68; --tx: -104px; --ty: -62px; border-radius: 50%; }
.gacha-burst i:nth-child(7)  { background: #ff6b6b; --tx: -150px; --ty: 0; }
.gacha-burst i:nth-child(8)  { background: #ffd166; --tx: -104px; --ty: 62px; border-radius: 50%; }
.gacha-burst i:nth-child(9)  { background: #4ecdc4; --tx: -76px;  --ty: 132px; }
.gacha-burst i:nth-child(10) { background: #5a8dee; --tx: 0;      --ty: 152px; border-radius: 50%; }
.gacha-burst i:nth-child(11) { background: #b388eb; --tx: 76px;   --ty: 132px; }
.gacha-burst i:nth-child(12) { background: #ff9f68; --tx: 104px;  --ty: 62px; border-radius: 50%; }
/* 結果カードのポップイン（演出明けに付与） */
.reveal-pop { animation: reveal-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes reveal-pop {
  0% { transform: scale(0.86); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 動きに敏感なユーザー（前庭障害等）向けのOS設定を尊重（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
