/* 作品投票：入口、Category（一覧／評価済み）、作品詳細。1点ずつ（ショーケース）は showcase.css */
a.button {
  display: inline-block;
  border: 1px solid var(--line);
  background: white;
  color: var(--fc-color-text);
  border-radius: var(--fc-radius-lg);
  padding: 12px 19px;
  font-weight: 600;
  text-decoration: none;
}
a.button:hover {
  border-color: var(--fc-color-border-strong);
  background: var(--fc-color-accent-soft);
}
.vote-back {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--fc-color-text);
  font-size: 14px;
  font-weight: 600;
}

.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: var(--fc-color-text-muted);
  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: var(--fc-radius-lg);
  background: var(--fc-color-accent-soft);
  color: var(--fc-color-accent-hover);
  font-weight: 700;
  text-decoration: none;
}
.vote-category:hover {
  background: var(--fc-color-accent-soft);
}
.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: var(--fc-color-accent-soft);
  border-color: var(--fc-color-border-strong);
  color: var(--fc-color-accent-hover);
}
.vote-info > a {
  color: var(--fc-color-text);
  text-decoration: underline;
  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: var(--fc-color-text);
  text-decoration: underline;
  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;
}
/* The contest switch: a segmented control like 「一覧／1点ずつ投票」 (one contest is always selected). The goods kinds are filter chips (contest.css). */
.gallery-contests {
  gap: 0;
  padding: 3px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-color-surface-sunken);
}
.gallery-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--fc-radius-pill);
  color: var(--fc-color-text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.gallery-chip:hover {
  color: var(--fc-color-text);
}
.gallery-chip[aria-current] {
  background: var(--fc-color-surface);
  color: var(--fc-color-text);
  box-shadow: 0 1px 3px #20243720;
}
.gallery-divider {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: var(--fc-color-surface-sunken);
}
/* 「一覧／1点ずつ投票」：作品ページでは右端、投票ページでは 3D の上に浮かぶ白い板 */
.works-toggle {
  display: flex;
  margin-left: auto;
  padding: 4px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-color-surface-sunken);
}
.works-toggle > * {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: var(--fc-radius-pill);
  color: var(--fc-color-text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.works-toggle a:hover {
  color: var(--fc-color-text);
}
.works-toggle [aria-current] {
  background: #fff;
  color: var(--fc-color-text);
  box-shadow: 0 1px 3px #20243720;
}
.works-toggle.is-floating {
  margin: 0;
  border: 1px solid var(--fc-color-border);
  background: rgb(255 255 255 / 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--fc-shadow-sm);
}
.works-toggle.is-floating [aria-current] {
  background: var(--fc-color-accent);
  color: var(--fc-color-text-on-accent);
  box-shadow: none;
}
.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: var(--fc-radius-lg);
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 35%,
    #fff,
    var(--fc-color-accent-soft)
  );
  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: var(--fc-radius-pill);
  background: var(--fc-color-accent-soft);
  color: var(--fc-color-text);
  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: var(--fc-color-accent);
  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: 26px;
    padding: 0 12px;
    font-size: 12px;
  }
  .gallery-divider {
    display: none;
  }
  .gallery,
  .gallery-col {
    gap: 8px;
  }
}
