/* Give the artwork room while keeping voting controls close to the pair. */
body.taste-vote-page .vote-page {
  margin-top: .7rem;
  gap: .7rem;
}

body.taste-vote-page .vote-stage {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 980px;
  gap: .65rem;
  padding: clamp(.75rem, 2vw, 1.15rem);
}

body.taste-vote-page .vote-context {
  min-width: 0;
  margin-bottom: 0 !important;
}

body.taste-vote-page .vote-context > div:first-child {
  gap: .25rem;
  min-width: 0;
}

body.taste-vote-page .vote-context-head {
  flex-wrap: wrap;
  min-height: 1.4rem;
  gap: .4rem;
}

body.taste-vote-page .vote-context-head .group-bar-state {
  position: static;
  width: auto;
  max-width: 100%;
  transform: none;
}

body.taste-vote-page .group-bar-state.is-empty {
  display: none;
}

body.taste-vote-page .vote-context-kicker {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: none;
  color: #74dccc;
  font-size: .69rem;
  line-height: 1.3;
}

body.taste-vote-page .vote-context h1 {
  font-size: clamp(1.35rem, 5.8vw, 2.35rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

body.taste-vote-page .vote-context-intro {
  font-size: .87rem;
  line-height: 1.35;
}

body.taste-vote-page .card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: min(100%, 42.5rem);
  max-width: 42.5rem;
  margin-inline: auto;
  gap: clamp(.65rem, 2.8vw, 1rem);
}

body.taste-vote-page.published-vote-page .card-grid {
  max-width: calc(var(--published-card-width) * 2 + 1rem);
}

body.taste-vote-page .card-grid > .game-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
}

body.taste-vote-page .card-frame {
  height: auto;
  grid-template-rows: auto auto;
}

/* Keep each complete image, including mixed portrait and landscape pairs. */
body.taste-vote-page .card-art:has(img) {
  height: auto;
  max-height: none;
  aspect-ratio: auto;
}

body.taste-vote-page .card-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

body.taste-vote-page .card-body {
  min-width: 0;
  min-height: 3rem;
  gap: .2rem;
  padding: .55rem;
  align-content: center;
}

body.taste-vote-page .card-title {
  min-height: 0;
  font-size: clamp(.82rem, 2.9vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

body.taste-vote-page .card-chip-row,
body.taste-vote-page:not([data-category-slug="best-selling-albums"]) .card-subtitle {
  display: none;
}

body.taste-vote-page .game-card.is-pending .card-frame {
  border-color: #c6d6d4;
}

body.taste-vote-page .vote-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  width: min(100%, 34rem);
  margin: 0 auto;
  margin-top: 0 !important;
}

body.taste-vote-page .vote-actions > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: .5rem .8rem;
  border-radius: 12px;
  line-height: 1.25;
  font-size: .8rem;
}

body.taste-vote-page .vote-actions > [hidden] {
  display: none;
}

body.taste-vote-page .vote-share-pick {
  border: 1px solid rgba(116, 220, 204, .5);
  background: #143732;
  color: #d4fff1;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

body.taste-vote-page .vote-share-pick:disabled {
  opacity: .6;
  cursor: wait;
}

body.taste-vote-page .vote-share-pick:focus-visible {
  outline: 2px solid #f6d782;
  outline-offset: 3px;
}

body.taste-vote-page .vote-save-state {
  min-height: 1.2em;
  margin: .25rem 0 0;
  color: #d3e7df;
  font-size: .76rem;
  line-height: 1.2;
  text-align: center;
}

/* Keep the live region available without reserving an empty grid row. */
body.taste-vote-page .vote-save-state:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body.taste-vote-page .vote-status {
  box-sizing: border-box;
  margin-bottom: .5rem;
}

body.taste-vote-page .vote-progress {
  max-width: 34rem;
  gap: .35rem;
  margin-top: .25rem;
}

body.taste-vote-page .vote-progress-copy {
  flex-wrap: wrap;
  gap: .2rem .6rem;
  line-height: 1.4;
}

body.taste-vote-page .vote-progress-count {
  white-space: nowrap;
}

body.taste-vote-page .vote-progress-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .3rem;
}

body.taste-vote-page .vote-progress-tier {
  padding: .1rem .4rem;
  border: 1px solid rgba(116, 220, 204, .25);
  border-radius: 999px;
  color: #b4e7d8;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.4;
}

body.taste-vote-page .vote-progress-tier[hidden] {
  display: none;
}

body.taste-vote-page .vote-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0 .5rem;
  width: min(100%, 34rem);
  min-width: 0;
  margin: -.35rem auto 0;
}

body.taste-vote-page .vote-extras:has(> :only-child),
body.taste-vote-page .vote-extras:has(> details[open]) {
  grid-template-columns: minmax(0, 1fr);
}

body.taste-vote-page .vote-progress-help {
  min-width: 0;
  margin: 0;
}

body.taste-vote-page .vote-progress-help summary {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: .35rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.taste-vote-page .vote-progress-help p {
  line-height: 1.5;
}

body.taste-vote-page .group-status-card .group-status-exit {
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 760px) {
  body.taste-vote-page .vote-page {
    width: calc(100% - 8px);
  }

  body.taste-vote-page .vote-stage {
    padding: .7rem .4rem !important;
    border-radius: 20px;
  }

  body.taste-vote-page .vote-context {
    padding-inline: .3rem;
  }

  body.taste-vote-page .vote-page .group-bar-shell {
    margin-top: .25rem;
  }
}

@media (max-width: 540px) {
  body.taste-vote-page .vote-context h1 {
    font-size: clamp(1.3rem, 5.8vw, 1.8rem) !important;
  }

  body.taste-vote-page .vote-versus {
    width: 2.6rem;
    height: 2.6rem;
    font-size: .75rem;
  }

  body.taste-vote-page .vote-actions > * {
    padding-inline: .7rem;
  }

  body.taste-vote-page .game-card-text-only .card-art {
    min-height: 12rem;
  }

  body.taste-vote-page .game-card-text-only .fallback-art strong {
    font-size: clamp(1rem, 4.5vw, 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.taste-vote-page .game-card .card-frame,
  body.taste-vote-page .vote-stage {
    transition: none;
  }

  body.taste-vote-page .game-card:is(:hover, :focus-visible, .is-picked) .card-frame {
    transform: none;
  }
}

body.taste-vote-page .vote-pair-details {
  width: min(100%, 34rem);
  min-width: 0;
  margin: 0 auto;
  color: #c7d9d4;
  font-size: .8rem;
}

body.taste-vote-page .vote-pair-details summary {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.taste-vote-page [data-pair-details] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding: .4rem;
}

body.taste-vote-page [data-pair-details] > div {
  display: grid;
  align-content: start;
  gap: .3rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Fit the complete pair to the room left by navigation and voting controls.
   Without JavaScript, the natural-aspect-ratio layout above remains usable. */
body.taste-vote-page.vote-viewport-ready .vote-page {
  width: min(1180px, calc(100% - 24px));
  margin-top: .4rem;
  gap: .45rem;
  padding-bottom: 0;
}
body.taste-vote-page.vote-viewport-ready .vote-stage {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: .5rem;
  padding: .75rem;
}
body.taste-vote-page.vote-viewport-ready .vote-context h1 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}
body.taste-vote-page.vote-viewport-ready .card-grid {
  width: var(--vote-grid-width, 100%);
  grid-template-columns: var(--vote-left-width, minmax(0, 1fr)) var(--vote-right-width, minmax(0, 1fr)) !important;
  max-width: none;
  justify-items: center;
  align-items: center;
}
body.taste-vote-page.vote-viewport-ready .card-grid > .game-card {
  width: var(--vote-card-width, 100%);
  max-width: 100%;
  justify-self: center;
}
body.taste-vote-page.vote-viewport-ready .card-art,
body.taste-vote-page.vote-viewport-ready .game-card-text-only .card-art {
  height: var(--vote-art-height, auto);
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}
body.taste-vote-page.vote-viewport-ready .card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body.taste-vote-page.vote-viewport-ready .card-grid[data-vote-layout="stacked"] {
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 44px !important;
}
body.taste-vote-page.vote-viewport-ready .vote-duel:has([data-vote-layout="stacked"]) .vote-versus {
  top: var(--vote-versus-top, 50%);
}
body.taste-vote-page.vote-viewport-ready .group-bar-shell,
body.taste-vote-page.vote-viewport-ready .group-bar {
  margin-top: 0;
}
body.taste-vote-page.vote-viewport-ready .vote-extras {
  margin-top: -.25rem;
}
body.taste-vote-page.vote-viewport-ready .reference-vote-feedback {
  margin-top: 0;
}
body.taste-vote-page.vote-viewport-ready .vote-stage:has(.reference-vote-feedback:not([hidden])) .vote-actions {
  margin-top: 0;
}
@media (max-width: 760px) {
  body.taste-vote-page.vote-viewport-ready .vote-page {
    width: calc(100% - 8px);
  }
}
body.taste-vote-page.vote-viewport-ready .card-title {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
  overflow: visible;
}

body.taste-vote-page.vote-viewport-ready .vote-versus {
  left: var(--vote-versus-left, 50%);
}

body.taste-vote-page.vote-viewport-ready .vote-duel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body.taste-vote-page.vote-viewport-ready .card-body {
  min-height: 44px !important;
  padding: .45rem .55rem;
}

/* Supersede the legacy mobile row minimum so measured title height is real. */
body.taste-vote-page.vote-viewport-ready .card-frame {
  grid-template-rows: auto auto !important;
}

/* Text-only entries need room for their full label if it exceeds the budget. */
body.taste-vote-page.vote-viewport-ready .game-card-text-only .fallback-art {
  height: auto;
  min-height: var(--vote-art-height, 10rem);
}

/* A recognised skip symbol supports the short label without another control. */
body.taste-vote-page .skip-button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
body.taste-vote-page .skip-button .taste-icon{width:18px;height:18px}
body.taste-vote-page .vote-context-intro{margin:0}
@media(max-width:600px){
 body.taste-vote-page .vote-page{margin-top:.35rem;gap:.35rem}
 body.taste-vote-page .vote-stage{padding:.5rem;gap:.45rem}
 body.taste-vote-page .vote-context-head{gap:3px}
 body.taste-vote-page .vote-context h1{font-size:clamp(1.1rem,5vw,1.45rem)}
 body.taste-vote-page .group-status-label{display:inline!important;font-size:9px}
 body.taste-vote-page .group-status-copy{gap:2px!important}
}

/* Keep controls in easy reach when the natural image proportions leave space. */
body.taste-vote-page.vote-viewport-ready .vote-duel{display:grid;align-items:center;min-height:var(--vote-duel-height,0)}
body.taste-vote-page:not(.published-vote-page) .vote-context-kicker{display:none}
body.taste-vote-page .vote-context-head:has(.group-bar-state.is-empty){display:none}
body.taste-vote-page.published-vote-page .vote-context-head:has(.group-bar-state.is-empty){display:flex}
body.taste-vote-page .vote-context-head .group-status-card.is-compact{min-height:44px;padding:0 50px 0 10px;background:#112a30;border:1px solid #29474c;border-radius:10px;max-width:100%;overflow:visible}
body.taste-vote-page .group-status-card.is-compact strong{color:#b6dcd5}
body.taste-vote-page .group-status-card.is-compact .group-status-label{color:#a7bec0;font-size:10px}
body.taste-vote-page .group-status-card.is-compact .group-status-exit{right:0;top:50%;width:44px;height:44px;background:none;color:#a9c6c6;border:0}


/* Artwork-only sheen: selection stays immediate and natural cover ratios stay intact. */
body.taste-vote-page .game-card .card-art:has(img)::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(115deg,
    transparent 36%, rgba(255, 255, 255, .04) 43%,
    rgba(255, 255, 255, .25) 49%, rgba(255, 255, 255, .08) 55%,
    transparent 63%);
  opacity: 0;
  transform: translate3d(-75%, 0, 0);
}

@keyframes duellyArtSheen {
  0% { opacity: 0; transform: translate3d(-75%, 0, 0); }
  18% { opacity: 1; }
  74% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(75%, 0, 0); }
}

@media (hover: hover) and (pointer: fine) {
  body.taste-vote-page .game-card:hover:not(:disabled) .card-art:has(img)::after {
    animation: duellyArtSheen 680ms cubic-bezier(.2, .55, .3, 1) both;
  }
}

/* These existing states cover taps, mouse clicks and keyboard voting alike. */
body.taste-vote-page .game-card:is(.is-picked, .is-pending, :focus-visible) .card-art:has(img)::after {
  animation: duellyArtSheen 680ms cubic-bezier(.2, .55, .3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  body.taste-vote-page .game-card .card-art:has(img)::after {
    content: none;
    animation: none;
  }
}

/* Keep Kinda Funny's mixed source artwork inside consistent portrait cards. */
body.taste-vote-page[data-category-slug="published-kinda-funny-2026"] .card-grid {
  --vote-frame-ratio: .75;
}
body.taste-vote-page[data-category-slug="published-kinda-funny-2026"] .card-art {
  aspect-ratio: 3 / 4;
}
body.taste-vote-page[data-category-slug="published-kinda-funny-2026"] .card-art img {
  height: 100%;
  object-fit: contain;
}
body.taste-vote-page[data-category-slug="published-kinda-funny-2026"] .card-body {
  min-height: var(--vote-body-height, 44px) !important;
}
