.card-vote {
  color: #ffffff;
  background: #3a5a40;
  text-align: center;
  border: 2px solid #241a12;
  border-radius: 1.25rem;
  box-shadow: 0 16px 55px #0005;
  padding: clamp(1rem, 3vw, 2rem);
  width: min(64rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  overflow: auto;
}

.card-vote::backdrop { background: #181411bb; }
.card-vote h2 {
  margin: 0 0 .75rem;
  color: inherit;
  font-family: var(--heading-font);
  font-weight: 400;
}

.card-vote p { margin: .75rem 0; color: inherit; }
.card-vote [role="status"]:empty { display: none; }

.card-vote-group { border: 0; padding: 0; margin: 0; min-inline-size: 0; }

.card-vote-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .625rem;
  padding: .25rem;
  border: 0;
  margin: 1rem 0;
  min-inline-size: 0;
}

/* The real radio still handles keyboard navigation and form validation. */
.card-vote-options label {
  display: grid;
  place-items: center;
  position: relative;
  min-width: 0;
  padding: 1rem;
  cursor: pointer;
}

.card-vote-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.card-vote-artwork {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  isolation: isolate;
}

.card-vote-artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter .22s ease;
}

@media (hover: hover) {
  .card-vote-options label:hover img {
    filter: drop-shadow(0 0 4px #ffd759) drop-shadow(0 0 8px #efa424);
  }
}

.card-vote-options label:has(:focus-visible) .card-vote-artwork {
  outline: 2px dashed #ffffff;
  outline-offset: 5px;
}

.card-vote-options label:has(:checked) img {
  filter: drop-shadow(0 0 4px #d3f7ff) drop-shadow(0 0 9px #81dcff);
}

.card-vote-frostfire.frostfire-spray {
  display: none;
  inset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .card-vote[open] .card-vote-options label:has(:checked) .card-vote-frostfire {
    display: block;
  }
}

.card-vote button {
  border: 1px solid #241a12;
  color: #241a12;
  font: 400 1.125rem/1.25 var(--heading-font);
  padding: .55rem 1rem;
  border-radius: .5rem;
  cursor: pointer;
}

.card-vote button:focus-visible,
.card-vote input:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.card-vote button[type="submit"] { background: #f7d00e; }
.card-vote button:disabled { opacity: .45; cursor: default; }
.card-vote .card-vote-close {
  background: transparent;
  border-color: currentColor;
  color: inherit;
  margin-top: .75rem;
}
.card-vote .card-vote-arrow { display: none; }

@media (max-width: 760px) {
  .card-vote { width: min(30rem, calc(100% - 1rem)); }
  .card-vote-carousel {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    margin: .25rem 0 .75rem;
  }

  .card-vote-options {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    padding: .5rem .25rem;
    margin: 0;
    scrollbar-width: none;
  }

  .card-vote-options::-webkit-scrollbar { display: none; }

  .card-vote-options label {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }

  .card-vote-artwork { width: min(100%, 62vw, 40dvh); }
  .card-vote .card-vote-arrow {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #F7D00E;
    text-shadow: 0 0 5px rgb(247 208 14 / .6), 0 0 11px rgb(247 208 14 / .35);
    font: 400 2rem/1 Arial, sans-serif;
  }

  .card-vote .card-vote-arrow:disabled {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card-vote-artwork img { transition: none; }
}

.card-vote-trigger {
  margin: .75rem auto 0;
  padding: .55rem 1rem;
  border: 1px solid #241a12;
  border-radius: .5rem;
  color: #241a12;
  background: #f7d00e;
  font: 400 1.125rem/1.25 var(--heading-font);
  cursor: pointer;
}

.card-vote-trigger[hidden] { display: none; }
.card-vote-trigger:hover { background: #ffdf4a; }
.card-vote-trigger:focus-visible { outline: 2px solid #f7d00e; outline-offset: 3px; }
