/* PIKU クローン スタイル */
:root {
  --pk-red: #ff2e4d;
  --pk-red-dark: #e01e3c;
  --pk-pink: #ff6b81;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #22252a;
  --muted: #8b929c;
  --line: #e9ecef;
  --shadow: 0 4px 16px rgba(20, 24, 40, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header__inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 62px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -1px;
  color: var(--pk-red);
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo span { font-size: 22px; }
.logo__mark {
  font-size: 14px !important;
  font-style: italic;
  font-weight: 900;
  color: #fff;
  background: var(--pk-red);
  border-radius: 8px;
  padding: 3px 7px;
  line-height: 1;
  letter-spacing: 0;
}

.search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}
.search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--text);
}
.search__icon { color: var(--muted); margin-right: 8px; }

.header__actions { margin-left: auto; display: flex; gap: 8px; }
.btn {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: scale(.96); }
.btn--ghost { background: var(--bg); color: var(--text); }
.btn--primary { background: var(--pk-red); color: #fff; }
.btn--primary:hover { background: var(--pk-red-dark); }

/* ---------- Categories ---------- */
.cats {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 18px 2px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.cat.is-active {
  background: var(--pk-red);
  border-color: var(--pk-red);
  color: #fff;
}

/* ---------- Grid ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 18px; }
.section-title {
  font-size: 18px;
  font-weight: 800;
  margin: 8px 2px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(20,24,40,.14); }
.card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.card__half {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.card__img {
  width: 58%;
  height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}
/* 実写真: コンテナいっぱいに表示（角丸クリップ） */
.thumb-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card__half,
.pick__img,
.winner__img { overflow: hidden; }
.card__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}
.card__body { padding: 12px 13px 14px; }
.card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}
.card__meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 10px;
}

/* ---------- Modal / Game ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 26, .78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal.is-open { display: flex; }
.game {
  width: 100%;
  max-width: 860px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.game__top {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.game__title { font-size: 16px; font-weight: 800; }
.game__round {
  font-size: 13px;
  color: #fff;
  background: var(--pk-red);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.game__close {
  margin-left: auto;
  border: none;
  background: var(--bg);
  border-radius: 999px;
  width: 34px; height: 34px;
  font-size: 18px;
  color: var(--muted);
}
.progress {
  height: 5px;
  background: var(--line);
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--pk-red);
  transition: width .25s ease;
}

.match {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: stretch;
  min-height: 340px;
}
.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 18px;
  cursor: pointer;
  transition: background .15s ease;
}
.pick:hover { background: #fff4f5; }
.pick__img {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 76px;
  box-shadow: var(--shadow);
}
.pick__img-el {
  width: 68%;
  height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.14));
}
.pick__name { font-size: 20px; font-weight: 800; }
.vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-style: italic;
  font-size: 26px;
  color: var(--pk-red);
  background:
    linear-gradient(#fff, #fff) padding-box;
}

/* winner screen */
.winner {
  padding: 34px 24px 30px;
  text-align: center;
}
.winner__crown { font-size: 40px; }
.winner__img {
  width: 170px; height: 170px;
  margin: 14px auto 8px;
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 92px;
  box-shadow: var(--shadow);
}
.winner__img-el {
  width: 66%;
  height: 66%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
}
.winner__label { font-size: 14px; color: var(--muted); font-weight: 700; }
.winner__name { font-size: 28px; font-weight: 900; margin: 4px 0 18px; }
.winner__actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- Create panel ---------- */
.create__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0; }
.create__row { display: flex; gap: 8px; }
.create__row input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; outline: none;
}
.create__row input:focus { border-color: var(--pk-red); }
.create__field { padding: 16px 20px 4px; }
.create__field label { font-size: 13px; font-weight: 700; color: var(--muted); }

.footer {
  max-width: 1080px;
  margin: 24px auto 0;
  padding: 24px 18px 40px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
  border-top: 1px solid var(--line);
}
.footer strong { color: var(--text); }

.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .search { max-width: none; }
  .pick__img { width: 110px; height: 110px; font-size: 56px; }
  .match { min-height: 300px; }
}
@media (max-width: 480px) {
  .logo { font-size: 22px; }
  .header__actions .btn--ghost { display: none; }
  .winner__img { width: 140px; height: 140px; font-size: 76px; }
}

/* ---------- 作成: 画像アップロード ---------- */
.create__scroll { max-height: 46vh; overflow-y: auto; padding: 0 20px; }
.create__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }
.create__row { display: flex; gap: 8px; align-items: stretch; }
.create__img {
  flex: 0 0 56px; height: 56px; border-radius: 10px;
  border: 1.5px dashed var(--line); background: var(--bg);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700;
  text-align: center; line-height: 1.1; overflow: hidden;
}
.create__img.has-img { border-style: solid; border-color: var(--pk-red); }
.create__img.has-img .create__img-ph { display: none; }
.create__name {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; outline: none; min-width: 0;
}
.create__name:focus { border-color: var(--pk-red); }
.create__note { padding: 6px 20px 0; margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.create__actions { padding: 12px 20px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 広告 ---------- */
.ad { margin: 0; }
.ad--banner { margin: 10px 0 0; }
.ad--infeed { display: flex; align-items: center; justify-content: center; }
.ad--result { margin: 16px auto 4px; max-width: 468px; }
.ad__ph {
  width: 100%; min-height: 90px; border: 1px dashed var(--line);
  border-radius: 12px; background:
    repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f2f3f5 10px, #f2f3f5 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #adb5bd; gap: 2px;
}
.ad__ph span { font-size: 13px; font-weight: 800; }
.ad__ph small { font-size: 10px; letter-spacing: 1px; }
.ad--infeed .ad__ph { min-height: 220px; }
.ad__ins { display: block; }

/* 両端サイドレール広告（ワイド画面のみ・コンテンツに被らない余白がある時だけ表示） */
.ad-rail {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;            /* ヘッダー(50)より下・対戦ページ(100)より下 */
  display: none;          /* 既定は非表示。十分な横幅の時だけ表示 */
}
.ad-rail--left { left: 18px; }
.ad-rail--right { right: 18px; }
.ad-rail .ad--rail { width: 160px; }
.ad-rail .ad--rail .ad__ph { height: 600px; min-height: 600px; }
/* 余白が 160px + 余裕 取れる幅（コンテンツ1080px）でのみ表示 */
@media (min-width: 1440px) {
  .ad-rail { display: block; }
}

/* ---------- 通報リンク ---------- */
.report-link {
  margin-top: 14px; background: none; border: none; color: var(--muted);
  font-size: 12px; text-decoration: underline; cursor: pointer;
}
.report-link:hover { color: var(--pk-red); }

/* ---------- Cookie 同意バナー ---------- */
.consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  max-width: 720px; margin: 0 auto;
  background: #22252a; color: #fff; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
/* hidden 属性で確実に非表示に（.consent の display:flex が UA の [hidden] を上書きするため明示） */
.consent[hidden] { display: none; }
.consent__text { flex: 1; min-width: 220px; font-size: 12.5px; line-height: 1.7; }
.consent__text a { color: #ffd0d6; text-decoration: underline; }
.consent__btns { display: flex; gap: 8px; margin-left: auto; }
.footer a { color: var(--muted); text-decoration: underline; }
.footer a:hover { color: var(--pk-red); }

@media (max-width: 480px) {
  .consent { flex-direction: column; align-items: stretch; }
  .consent__btns { margin-left: 0; }
}

/* ---------- ヒーロー ---------- */
.hero {
  background: linear-gradient(135deg, #ff2e4d 0%, #ff6b81 55%, #ff9a5a 100%);
  color: #fff;
}
.hero__inner {
  max-width: 1080px; margin: 0 auto; padding: 34px 18px 30px; text-align: center;
}
.hero__title { font-size: 26px; font-weight: 900; margin: 0 0 8px; letter-spacing: -.5px; }
.hero__sub { font-size: 14px; opacity: .95; margin: 0 0 18px; }
.hero__cta {
  background: #fff; color: var(--pk-red); font-size: 15px; padding: 12px 22px;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.hero__cta:hover { background: #fff; opacity: .92; }

/* ---------- 並び替え ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 14px; }
.section-head .section-title { margin: 0; }
.sort { display: flex; gap: 6px; }
.sort__tab {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 700;
}
.sort__tab.is-active { background: #22252a; border-color: #22252a; color: #fff; }

/* ---------- 作成: カテゴリ選択 ---------- */
.create__select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; background: #fff; outline: none; color: var(--text);
}
.create__select:focus { border-color: var(--pk-red); }

@media (max-width: 480px) {
  .hero__title { font-size: 21px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- 作成: 候補ヘッダ・追加ボタン・動画URL ---------- */
.create__field--rowhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.create__rowctl { display: flex; align-items: center; gap: 10px; }
.create__count { font-size: 12px; color: var(--muted); font-weight: 700; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.create__list { grid-template-columns: 1fr; } /* 動画URL欄があるため1列に */
.create__fields { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.create__video {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 12.5px; outline: none; color: var(--text); background: #fff;
}
.create__video:focus { border-color: var(--pk-red); }
.create__video.is-invalid { border-color: #ffa8a8; background: #fff5f5; }
.create__img { flex: 0 0 56px; }

/* ---------- 作成モーダル: スマホは全画面シート ---------- */
@media (max-width: 680px) {
  /* 余白なしで画面いっぱいに */
  #createModal { padding: 0; align-items: stretch; }
  #createModal .game {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    animation: none;
  }
  /* ヘッダーは上部に固定 */
  #createModal .game__top {
    position: sticky; top: 0; z-index: 3;
    background: #fff;
  }
  /* 候補リストのスクロール領域を伸ばして中身を活かす */
  #createModal .create__scroll {
    max-height: none;
    flex: 1;
    min-height: 120px;
  }
  /* 候補ヘッダは縦積み（ラベルが窮屈にならないように） */
  #createModal .create__field--rowhead {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  #createModal .create__rowctl { justify-content: space-between; }
  /* 補足テキストは1行の余白を詰める */
  #createModal .create__note { padding-bottom: 4px; }
  /* 作成/キャンセルボタンを下部に固定して常に押せるように */
  #createModal .create__actions {
    position: sticky; bottom: 0; z-index: 3;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  #createModal .create__actions .btn { flex: 1; }
}

/* ---------- 動画サムネ再生バッジ / ポスター ---------- */
.card__half { position: relative; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.video-poster {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: #2b2f36; color: #fff;
}

/* ---------- 動画対戦レイアウト ---------- */
.match--video {
  grid-template-columns: 1fr 56px 1fr;
  align-items: start;
  min-height: 0;
  padding: 22px 18px 26px;
  gap: 6px;
}
.vpick { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vplayer {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #000; box-shadow: var(--shadow);
}
.vplayer__frame { width: 100%; height: 100%; border: 0; display: block; }
.vpick .pick__name { font-size: 18px; text-align: center; }
.vpick .vselect { width: 100%; max-width: 260px; }
.vs--video { align-self: center; }
.winner__video {
  width: 100%; max-width: 460px; aspect-ratio: 16 / 9; margin: 14px auto 8px;
  border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow);
}
.winner__video .vplayer__frame { width: 100%; height: 100%; }

@media (max-width: 680px) {
  .match--video { grid-template-columns: 1fr; }
  .vs--video { justify-self: center; margin: 4px 0; }
}

/* ---------- 対戦ページ（全画面・モーダルではなく別ページ表示） ---------- */
.gamepage {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gamepage.is-open { display: block; }
/* 全画面ページの土台はトップページと同じ明るい背景。
   対戦画面は画像が全面を覆い、優勝画面は独自背景を持つので、この明るい土台は
   ラウンド選択などのユーティリティ画面で見える。 */
.gamepage .game {
  max-width: none;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  animation: none;
}
/* 上部バー＋進捗を固定（トップページと同じ白ヘッダー） */
.gamepage .game__top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.gamepage .game__title { color: var(--text); }
.gamepage .progress {
  position: sticky; top: 58px; z-index: 5;
  height: 4px; background: var(--line);
}
.gamepage .game__round { margin-left: auto; }
/* 戻るボタン */
.game__back {
  flex: 0 0 auto;
  border: none;
  background: var(--bg);
  border-radius: 999px;
  width: 38px; height: 38px;
  font-size: 20px; line-height: 1;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.game__back:hover { background: var(--line); }

/* 本体を伸ばして対戦を画面いっぱいに表示 */
.gamepage #gameBody { flex: 1; display: flex; flex-direction: column; }
.gamepage .match {
  flex: 1;
  position: relative;              /* VS を中央に重ねる基準 */
  display: grid;
  grid-template-columns: 1fr 1fr;  /* 2枚を全幅で左右分割（間の隙間なし） */
  gap: 0;
  min-height: calc(100dvh - 62px);
}
/* 各サイド: 余白ゼロで画像を敷き詰める。名前は下に重ねる */
.gamepage .pick {
  position: relative;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.gamepage .pick:hover { background: transparent; }
.gamepage .pick:hover .pick__img { transform: scale(1.03); }
.gamepage .pick:active .pick__img { transform: scale(0.99); }
/* 画像コンテナがサイド全体を占める */
.gamepage .pick__img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  font-size: min(26vw, 200px);     /* 絵文字フォールバック時のサイズ */
  transition: transform .25s ease;
}
/* 写真は全面を覆う（cover） */
.gamepage .pick .thumb-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* 絵文字フォールバックは中央に程よく配置 */
.gamepage .pick .pick__img-el {
  width: 52%; height: 52%;
  object-fit: contain;
}
/* 名前を画像の下部に重ねる（白文字＋影で可読性確保） */
.gamepage .pick__name {
  position: absolute;
  left: 0; right: 0; bottom: 9%;
  z-index: 2;
  text-align: center;
  padding: 0 14px;
  pointer-events: none;
}
.gamepage .pick__name span {
  display: inline-block;
  color: #fff;
  font-weight: 900;
  font-size: clamp(18px, 3vw, 40px);
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}
/* 中央のグラデーション影で2枚の境目を締める */
.gamepage .match::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 120px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.28) 45%, rgba(0,0,0,.28) 55%, transparent);
  pointer-events: none; z-index: 1;
}
/* VS を中央に浮かせる（grid外＝absoluteなので2カラムを崩さない） */
.gamepage .vs {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  background: transparent;
  color: #fff;
  font-weight: 900; font-style: italic;
  font-size: clamp(34px, 6vw, 72px);
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* 動画対戦: プレイヤーはそのまま（黒背景に合わせて名前を白く） */
.gamepage .match--video {
  flex: 1;
  align-items: center;
  grid-template-columns: 1fr 84px 1fr;
  padding: 30px 24px 36px;
}
.gamepage .match--video .vs { position: static; transform: none; }
.gamepage .vpick .pick__name { position: static; font-size: 22px; }
.gamepage .vpick .pick__name span { text-shadow: none; }

/* 優勝画面: 勝者画像を主役にした没入型のお祝い演出 */
.gamepage .winner {
  position: relative;
  background: transparent;
  max-width: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  min-height: calc(100dvh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* 背景に勝者画像をぼかして敷く */
.winner__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.42) saturate(1.15);
  transform: scale(1.2);
}
.winner__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 85% at 50% 38%, rgba(255, 84, 112, 0.30), transparent 62%),
    rgba(9, 9, 13, 0.55);
}
/* 中身 */
.winner__inner {
  position: relative; z-index: 3;
  width: 100%; max-width: 540px;
  padding: 22px 22px 34px;
  text-align: center;
  color: #fff;
  animation: winner-pop .45s cubic-bezier(.2, .9, .25, 1.1);
}
@keyframes winner-pop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.winner__badge {
  display: inline-block;
  background: var(--pk-red); color: #fff;
  font-weight: 900; font-size: 14px; letter-spacing: .02em;
  padding: 6px 18px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(255, 84, 112, 0.55);
}
.gamepage .winner__crown {
  font-size: 46px; margin-top: 6px; line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  animation: crown-bounce 2.2s ease-in-out infinite;
}
@keyframes crown-bounce { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-6px) rotate(4deg); } }
/* 勝者メディア（大きく・白フチ＋グロー） */
.winner__media {
  width: min(86vw, 460px);
  height: min(86vw, 460px);
  margin: 10px auto 18px;
  border-radius: 26px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 5px rgba(255, 255, 255, 0.95),
    0 0 46px rgba(255, 209, 102, 0.35);
}
.winner__media .thumb-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.winner__media .winner__img-el { width: 60%; height: 60%; object-fit: contain; }
.gamepage .winner__video {
  max-width: min(86vw, 640px);
  margin: 10px auto 16px;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.gamepage .winner__label { color: rgba(255, 255, 255, 0.82); font-weight: 700; font-size: 14px; }
.gamepage .winner__name {
  font-size: clamp(28px, 6vw, 46px); font-weight: 900; color: #fff;
  margin: 3px 0 22px; text-shadow: 0 3px 16px rgba(0, 0, 0, 0.5);
}
.gamepage .winner__actions { justify-content: center; flex-wrap: wrap; }
/* 暗背景でも見えるようにghostボタンを白ガラス調に */
.gamepage .winner .btn--ghost {
  background: rgba(255, 255, 255, 0.16); color: #fff; border-color: transparent;
}
.gamepage .winner .btn--ghost:hover { background: rgba(255, 255, 255, 0.28); }
.gamepage .winner .ad { margin: 18px auto 0; max-width: 360px; }
.gamepage .winner .report-link { color: rgba(255, 255, 255, 0.6); margin-top: 14px; }

/* 紙吹雪 */
.winner__confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.winner__confetti i {
  position: absolute; top: -12%;
  height: 14px; border-radius: 2px; opacity: .9;
  animation: confetti-fall linear infinite;
}
@keyframes confetti-fall {
  0% { transform: translateY(-12vh) rotate(0deg); opacity: 0; }
  8% { opacity: .95; }
  100% { transform: translateY(112vh) rotate(760deg); opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .winner__confetti { display: none; }
  .gamepage .winner__crown { animation: none; }
}
/* ラウンド選択はトップページと同じ雰囲気の白カードで */
.gamepage .chooser {
  background: #fff;
  max-width: 560px;
  margin: 8vh auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* スマホ: 対戦は上下2分割（縦積み）にして各画像を大きく見せる */
@media (max-width: 680px) {
  .gamepage .match {
    grid-template-columns: 1fr;      /* 1列 */
    grid-template-rows: 1fr 1fr;     /* 上下2段 */
  }
  /* 中央の境目ラインを縦線→横線に */
  .gamepage .match::before {
    top: 50%; bottom: auto; left: 0;
    width: 100%; height: 120px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.28) 45%, rgba(0,0,0,.28) 55%, transparent);
  }
  /* 名前は各画像の下端に少し余白を持たせて重ねる */
  .gamepage .pick__name { bottom: 6%; }
  /* 動画対戦も縦積み */
  .gamepage .match--video { grid-template-columns: 1fr; }
}

/* ---------- ラウンド選択 ---------- */
.chooser { padding: 34px 24px 32px; text-align: center; }
.chooser__q { font-size: 20px; font-weight: 800; margin: 0 0 20px; }
.chooser__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 12px; max-width: 460px; margin: 0 auto;
}
.chooser__btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  border-radius: 14px; padding: 18px 10px; font-size: 20px; font-weight: 900;
  transition: transform .08s ease, border-color .15s, background .15s, color .15s;
}
.chooser__btn:hover { border-color: var(--pk-red); background: #fff4f5; color: var(--pk-red); }
.chooser__btn:active { transform: scale(.96); }
.chooser__note { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
/* スマホ: ラウンド選択ボタンが横に溢れないよう2列固定（4択→2×2などに自動段組み） */
@media (max-width: 560px) {
  .chooser { padding: 26px 16px 24px; }
  .chooser__grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 320px;
    gap: 10px;
  }
  .chooser__btn { padding: 16px 8px; font-size: 18px; }
}
