/* ラッパは中央固定幅（PC）、内部はSPで横スクロール */
.nominees-wrap{ max-width:var(--table-maxw); width:100%; margin:2rem auto 4rem; padding:0 1rem; }

/* 凡例：●と名前は離さない */
.legend{ display:flex; gap:1.2rem; align-items:center; flex-wrap:wrap; margin:.6rem 0 1rem; }
.legend-item{ display:inline-flex; align-items:center; gap:.35rem; white-space:nowrap; }

.dot{ display:inline-block; width:.9em; height:.9em; border-radius:50%; margin:0 .35em 0 0; vertical-align:middle; }
.green{ background:var(--judge-green); } .blue{ background:var(--judge-blue); }
.gray{ background:var(--judge-gray); } .pink{ background:var(--judge-pink); }
.red{  background:var(--judge-red);  }

.table-scroller{ overflow-x:auto; -webkit-overflow-scrolling:touch; }

.nominees-table{ width:100%; border-collapse:collapse; min-width:720px; }
.nominees-table th, .nominees-table td{
  border-bottom:1px solid var(--color-border);
  padding:.6rem .8rem; text-align:left; vertical-align:top;
  font-size:.95rem; line-height:1.5;
}

/* 部門は控えめ */
.nominees-table td:first-child{ font-size:.85rem; color:#666; white-space:nowrap; }

/* 作品名・作者名：最大5行 */
.work-cell{
  white-space:normal; word-break:break-word; max-width:520px;
  overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:5;
}
.work-cell .title{ font-weight:600; }
.work-cell .author{ opacity:.9; }

/* 票ドット */
.vote-dots{ white-space:nowrap; }
.vote-dots .group{ display:inline-block; margin-right:.4rem; }

/* 行ホバー（任意） */
.nominees-table tr:hover{ background:#fafafa; }

/* SP：凡例＆thead固定（部門は固定しない） */
@media (max-width:720px){
  .legend{
    position:sticky; top:0; background:#fff; z-index:5;
    padding:6px 0; border-bottom:1px solid #eee;
  }
  .table-scroller thead th{
    position:sticky; top:var(--legend-sticky-h); background:#fff; z-index:3;
  }
}
/* スマホ：凡例の行間を少し狭く */
@media (max-width: 720px){
  .legend {
    line-height: 1.2; /* ← デフォルト1.9前後から少し詰める */
  }
}
/* ===== モバイル専用の見た目調整（≤720px） ===== */
@media (max-width: 720px){
  .legend{
    position: sticky;
    top: 0;
    background:#fff;
    z-index: 5;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    line-height: 1.2;
  }

  .table-scroller{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-top: 0 !important;        /* ← 押し下げない */
    scroll-padding-top: 0 !important;
  }

  .nominees-table thead th{
    position: sticky !important;
    top: 0 !important;                 /* ← JSで実測 top に上書き */
    background:#fff !important;
    z-index: 4 !important;
    white-space: nowrap;
  }

  /* 1行目の上に置く“薄いスペーサー行”（6px前後で調整可） */
  .nominees-table tr._spacer-first-row td{
    padding: 0 !important;
    height: 3px;
    border-bottom: none !important;
    background: transparent;
  }
}
/* 見出しの左揃え補正（PC用）*/
.nominees-wrap > h2 {
  margin-left: -1rem;
  display: inline-block;
  background: var(--color-accent);
  padding: 0 4px;
}

/* スマホではマイナス余白を解除して横揺れ防止 */
@media (max-width: 720px){
  .nominees-wrap { padding-left: 0; padding-right: 0; }
  .nominees-wrap > h2 { margin-left: 0; }
}

/* 凡例内テキスト（※注釈） */
.legend-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0.5rem 0 0;
  line-height: 1.4;
  text-align: left;
}

/* スマホでは少し詰めてコンパクトに */
@media (max-width: 720px) {
  .legend-note {
    font-size: 0.8rem;
    margin-top: 0.4rem;
  }
}
