/* 作品投票：入口、Category（一覧／評価済み）、作品詳細。1点ずつ（ショーケース）は showcase.css */
a.button {
  display: inline-block;
  border: 1px solid var(--line);
  background: white;
  color: #202437;
  border-radius: 12px;
  padding: 12px 19px;
  font-weight: 600;
  text-decoration: none;
}
a.button:hover {
  border-color: #bac1ed;
  background: #f5f6ff;
}
.vote-back {
  display: inline-block;
  margin-bottom: 14px;
  color: #4758d9;
  font-size: 14px;
  font-weight: 600;
}
/* /vote 上部の目玉（最新コンテスト + ショーケース、voting.js の spotlightHtml）。投票中がないときは下の空状態カードとの間隔 */
.vote-home + .card {
  margin-top: 24px;
}
.vote-contest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  margin-bottom: 24px;
}
.vote-contest > img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  max-height: 320px;
  object-fit: cover;
  background: #202944;
}
.vote-contest-body {
  padding: 32px;
}
.vote-contest-body h2 {
  margin: 14px 0 8px;
  font-size: 24px;
  overflow-wrap: anywhere;
}
.vote-contest-body p {
  margin: 0;
  color: #646e85;
  font-size: 14px;
}
.vote-contest-body h3 {
  margin: 26px 0 12px;
  font-size: 15px;
}
.vote-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.vote-category {
  padding: 12px 22px;
  border-radius: 12px;
  background: #e8ebfc;
  color: #3846b8;
  font-weight: 700;
  text-decoration: none;
}
.vote-category:hover {
  background: #dce1fb;
}
.vote-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.vote-switch button {
  padding: 8px 6px;
  font-size: 13px;
}
.vote-switch .chosen,
.vote-info .chosen {
  background: #e8ebfc;
  border-color: #8f9cf0;
  color: #3846b8;
}
.vote-info > a {
  color: #4758d9;
  font-weight: 600;
  font-size: 14px;
}
.vote-description {
  white-space: pre-wrap;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
.vote-info h2 {
  overflow-wrap: anywhere;
}
.vote-info .badge + h2,
.vote-info .eyebrow + .badge {
  margin-top: 12px;
}
@media (max-width: 720px) {
  .vote-contest {
    grid-template-columns: minmax(0, 1fr);
  }
  .vote-contest > img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .vote-contest-body {
    padding: 22px;
  }
}
.save-actions a.button {
  font-size: 13px;
  padding: 8px 12px;
}
.vote-contest-body p a {
  color: #4758d9;
  font-weight: 600;
}
/* 作品（/gallery）：上の 1 行にコンテストとグッズの種類のチップ、右に「一覧／1点ずつ投票」。下は絵だけのウォーターフォール */
#app:has(.gallery-bar) {
  padding-top: 18px;
}
.gallery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.gallery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #e9ebf3;
  color: #646e85;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.gallery-chip:hover {
  color: #202437;
}
.gallery-chip.is-on {
  background: #202437;
  color: #fff;
}
.gallery-chip.is-kind {
  border: 1.5px solid #dfe3f0;
  background: #fff;
}
.gallery-chip.is-kind.is-on {
  border-color: #5261ee;
  background: #eef0ff;
  color: #3846b8;
}
.gallery-divider {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: #dfe3f0;
}
/* 「一覧／1点ずつ投票」：作品ページでは右端、投票ページでは暗い背景の上 */
.works-toggle {
  display: flex;
  margin-left: auto;
  padding: 4px;
  border-radius: 999px;
  background: #e9ebf3;
}
.works-toggle > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  color: #646e85;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.works-toggle a:hover {
  color: #202437;
}
.works-toggle [aria-current] {
  background: #fff;
  color: #202437;
  box-shadow: 0 1px 3px #20243720;
}
.works-toggle.is-dark {
  margin: 0;
  border: 1px solid #ffffff24;
  background: #141a30b3;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.works-toggle.is-dark a {
  color: #c5cbe6;
}
.works-toggle.is-dark a:hover {
  color: #fff;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.gallery-col {
  display: grid;
  gap: 10px;
}
.gallery-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff, #e9ecf8);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #1d25351f;
}
.gallery-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.gallery-card img {
  display: block;
  width: 100%;
  height: auto;
}
/* 絵の下のタグ：グッズの種類とキャラクター */
.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #fff;
}
.gallery-tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef0fb;
  color: #3d4560;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 本人が投票済みの作品の小さな印 */
.vote-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5261ee;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.gallery-more {
  height: 1px;
}
@media (max-width: 720px) {
  #app:has(.gallery-bar) {
    padding-top: 12px;
  }
  .gallery-bar {
    gap: 6px;
    margin-bottom: 12px;
  }
  /* スマホ：切り替えを上に、チップは横にスクロール */
  .works-toggle {
    order: -1;
    width: 100%;
    margin: 0 0 4px;
  }
  .works-toggle > * {
    flex: 1;
    justify-content: center;
  }
  .gallery-chips {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .gallery-chip {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
  .gallery-divider {
    display: none;
  }
  .gallery,
  .gallery-col {
    gap: 8px;
  }
}
