/* =========================================================
   JOPT Results - Single source of truth CSS
   ========================================================= */

/* ===== Font =====
   NOTE: "Univers" は端末に入ってなければ当たりません。
   確実にUniversにしたいならWebフォントを別途読み込みが必要。
*/
body, .result-wrapper {
  font-family: "Univers", "Universe", "Univers LT Std", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400; /* 太字禁止 */
}

/* ===== Layout wrapper ===== */
.result-wrapper {
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== Grid (2nd+) ===== */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* ===== Item ===== */
.result-item {
  position: relative; /* share の基準 */
}

/* ===== Rank & Name ===== */
.result-rank,
.result-name {
  font-weight: 400 !important; /* 太字禁止 */
  text-align: center;
  margin: 0;
}

.result-rank {
  margin-bottom: 4px;
}

.result-name {
  margin-bottom: 12px;
}

/* ===== Image wrapper =====
   share を写真の中に固定するために relative
*/
.result-image-wrapper {
  position: relative;
}

/* Flickrの埋め込みimgの width="400" を潰して 100% に */
.result-image-wrapper img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* ===== 1st hero ===== */
.result-item--first {
  width: 100%;
  margin-bottom: 40px;
  text-align: center;
}

/* 1位だけ「写真を中央、幅はwrapperに合わせる」 */
.result-item--first .result-image-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* 1位の文字だけ 1.5倍 */
.result-item--first .result-rank,
.result-item--first .result-name {
  font-size: 1.5em !important;
  line-height: 1.15;
}

/* ===== Share buttons (inside photo, bottom-right) ===== */
/* shareを写真の外（下の右端）に */
.result-share{
  position: static !important;   /* absoluteを無効化 */
  margin-top: 10px;
  justify-content: flex-end;
  display: flex;
  gap: 10px;
}

/* 画像の下に並ぶので、ラッパーを縦並びに */
.result-item{
  display: flex;
  flex-direction: column;
}

/* Icon button base */
.result-share a {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08);
  text-decoration: none;
  font-size: 0 !important;      /* ラベル消す */
  color: transparent !important; /* ラベル消す */
}

/* Icon via pseudo element */
.result-share a::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* 1: X */
.result-share a:nth-child(1)::before {
  background-image: url("https://japanopenpoker.com/wp-content/uploads/sosical_icon/x_social_icon.png");
}

/* 2: LINE */
.result-share a:nth-child(2)::before {
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/4/41/LINE_logo.svg");
}

/* 3: Threads */
.result-share a:nth-child(3)::before {
  background-image: url("https://japanopenpoker.com/wp-content/uploads/sosical_icon/threads_social_icon.png");
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .result-wrapper {
    max-width: 92vw;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
}
/* results配下：日付バッジを全殺し（かなり強め） */
.is-results-page time,
.is-results-page .entry-date,
.is-results-page .posted-on,
.is-results-page .post-date,
.is-results-page .post-date-wrap,
.is-results-page .alpha-post-date,
.is-results-page .elementor-post__meta-data,
.is-results-page .elementor-post-date {
  display: none !important;
}

/* “バッジっぽい日付”にも対応（青いpill対策） */
.is-results-page .badge,
.is-results-page .label,
.is-results-page .tag,
.is-results-page [class*="date"],
.is-results-page [class*="Date"],
.is-results-page [class*="badge"],
.is-results-page [class*="Badge"] {
  display: none !important;
}

/* =========================
   resultsページ：不要な投稿要素を消す
   ========================= */

/* 上の日付バッジ */
.post-date,
.post-date-wrap,
.alpha-post-date,
.entry-date,
.post-meta .date,
.elementor-post__meta-data .elementor-post-date {
  display: none !important;
}

/* 著者(JOPTstaff)・Like post などのメタ */
.post-author,
.author,
.alpha-post-author,
.post-meta,
.entry-meta,
.like-post,
.post-like,
.alpha-like,
.like,
.meta,
.single .post-meta,
.single .entry-meta {
  display: none !important;
}

/* Post placeholder image（アイキャッチが無い時のダミー） */
.post-media img[alt="Post placeholder image"],
.post-media .wp-post-image[alt="Post placeholder image"],
.post-thumbnail img[alt="Post placeholder image"],
img[alt="Post placeholder image"] {
  display: none !important;
}

/* =========================
   テーマ標準のシェアボタン（5個並び）＋区切り線を消す
   ========================= */

/* 5個並ぶ丸アイコン系（テーマ/プラグイン差を吸収して広めに指定） */
.is-results-page .share,
.is-results-page .social-share,
.is-results-page .social-icons,
.is-results-page .social-links,
.is-results-page .post-share,
.is-results-page .alpha-share,
.is-results-page .elementor-share-buttons,
.is-results-page .elementor-social-icons,
/* =========================
   テーマ標準のシェアボタン（5個並び）だけ消す：安全版
   ========================= */

/* よくある share アイコンのコンテナだけを狙う（広いワイルドカード禁止） */
.is-results-page .post-share,
.is-results-page .alpha-share,
.is-results-page .elementor-share-buttons,
.is-results-page .elementor-social-icons,
.is-results-page .social-icons,
.is-results-page .social-share {
  display: none !important;
}

/* 区切り線 */
.is-results-page hr,
.is-results-page .elementor-divider,
.is-results-page .divider,
.is-results-page .separator {
  display: none !important;
}

/* 区切り線（hrやdivider系） */
.is-results-page hr,
.is-results-page .divider,
.is-results-page .separator,
.is-results-page .elementor-divider,
.is-results-page [class*="divider"],
.is-results-page [class*="separator"] {
  display: none !important;
}

/* 自作の写真右下SNSは絶対表示（巻き添え防止） */
.is-results-page .result-share {
  display: flex !important;
}

/* =========================
   resultsページ：ナビ・中央ボタン・Relatedを消す
   ========================= */

/* 前/次トーナメント（投稿ナビ） */
.is-results-page .post-navigation,
.is-results-page nav.navigation.post-navigation,
.is-results-page .navigation.post-navigation,
.is-results-page .nav-links,
.is-results-page .nav-previous,
.is-results-page .nav-next {
  display: none !important;
}

/* 真ん中のグリッド/一覧ボタン（テーマ依存の可能性あり） */
.is-results-page .post-nav-center,
.is-results-page .nav-center,
.is-results-page .navigation .nav-center,
.is-results-page .post-navigation .nav-center,
.is-results-page a[class*="grid"],
.is-results-page button[class*="grid"] {
  display: none !important;
}

/* Related リザルト（関連記事/関連投稿） */
.is-results-page .related,
.is-results-page .related-posts,
.is-results-page .related-post,
.is-results-page .alpha-related,
.is-results-page section[class*="related"],
.is-results-page div[class*="related"] {
  display: none !important;
}