@charset "utf-8";

/* ===== 共通 ===== */
.ifl-row-list {
  max-width: 960px;
  margin: 0 auto;
  font-size: 80%;
}

.ifl-row-game {
  border-bottom: 1px solid #e0e0e0;
  padding: 6px 4px;
}

.ifl-row-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 4px 6px;
}

.ifl-row-link:hover {
  background: #f9fbff;
}

/* 上：試合日時など */
.ifl-row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}

/* 本体：HOME | SCORE | VISITOR */
.ifl-row-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 8px;
}

/* ==== HOME / VISITOR ブロック ==== */
.ifl-side {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  box-sizing: border-box;
}

/* HOMEは右寄せ、VISITORは左寄せ → スコアを中心に対称に */
.ifl-side--home {
  flex-direction: row;
  text-align: right;
  justify-content: flex-end;
}

.ifl-side--visitor {
  flex-direction: row;
  text-align: left;
  justify-content: flex-start;
}

.ifl-side-text {
  min-width: 0;
}

.ifl-side-role {
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 1px;
  white-space: nowrap;
}

.ifl-team-name {
  font-weight: bold;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ifl-player-name {
  font-size: 0.8em;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 選手画像：必ず 400x450 比率を守る */
.ifl-thumb {
  width: 60px;
  aspect-ratio: 400 / 450;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.ifl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==== スコア（中央） ==== */
.ifl-score-box {
  min-width: 78px;
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #fff;
}

.ifl-score-num {
  display: inline-block;
  min-width: 18px;
}

.ifl-score-sep {
  padding: 0 3px;
}

.ifl-score-box--pending {
  font-size: 0.9em;
  color: #888;
}

/* ==== 勝敗バッジ ==== */
.ifl-result-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 4px;
}

.ifl-result-badge--win  { background: #ffb74d; color: #000; }
.ifl-result-badge--lose { background: #b0bec5; color: #000; }
.ifl-result-badge--vs   { background: #e0e0e0; color: #555; }

/* ==== 勝ったチームの強調 ==== */
.ifl-side--winner {
  background: #fff3cd;           /* 薄い黄色背景 */
  box-shadow: 0 0 0 2px #ffb74d inset; /* 内側枠でくっきり */
}

.ifl-side--winner .ifl-team-name,
.ifl-side--winner .ifl-player-name {
  font-weight: bold;
  opacity: 1;
}

/* 勝ち側のスコア数字を強調 */
.ifl-score-num--winner {
  color: #d35400;
  font-size: 1.15em;
}

@media screen and (max-width: 640px) {
  .ifl-row-main {
    column-gap: 6px;
  }
  .ifl-thumb {
    width: 52px;
  }
  .ifl-score-box {
    min-width: 68px;
    font-size: 1em;
  }
}

