/* The poll palette builds on the Match theme, with letters to distinguish choices. */
.poll-hero,
.poll-setup,
.poll-stage {
  min-width: 0;
}
.poll-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 27%);
  align-items: center;
  gap: 8px;
  padding: clamp(15px, 4vw, 30px);
  border: 1px solid #215648;
  border-radius: 1.15rem;
  background: radial-gradient(ellipse at 82% 0%, #306e5b, #123a31 63%);
  color: #fff9e8;
}
.poll-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(-52deg, transparent 0 23px, #e9f3db13 24px 25px);
  mask-image: linear-gradient(90deg, transparent 16%, black);
}
.poll-kicker {
  margin: 0;
  color: #286653;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .09em;
}
.poll-hero .poll-kicker,
.poll-handoff .poll-kicker {
  color: #f5d47d;
}
.poll-hero h1 {
  margin: .18em 0;
  font-size: clamp(1.63rem, 5.5vw, 2.8rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.poll-hero p:last-child {
  margin: 0;
  color: #edf7e7;
  line-height: 1.45;
}
.poll-hero-cards {
  position: relative;
  min-height: clamp(81px, 12vw, 133px);
}
.poll-hero-cards i {
  position: absolute;
  display: grid;
  place-items: center;
  top: 14%;
  left: 10%;
  width: 45%;
  aspect-ratio: .76;
  border: 2px solid #214438;
  border-radius: 8px;
  box-shadow: 0 5px 0 #0c342d;
  background: #b7dfc3;
  color: #1a5949;
  font-size: clamp(.95rem, 3vw, 1.9rem);
  font-weight: 900;
  font-style: normal;
  transform: rotate(-17deg);
}
.poll-hero-cards i:nth-child(2) {
  top: 18%;
  left: 46%;
  background: #f9df9c;
  color: #634512;
  transform: rotate(15deg);
}
.poll-hero-cards i:last-child {
  top: -2%;
  left: 76%;
  width: auto;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #f7d077;
}
.poll-setup,
.poll-stage,
.poll-ballot,
.poll-options,
.poll-result-groups {
  display: grid;
  min-width: 0;
  gap: clamp(.6rem, 2vw, 1rem);
}
.poll-settings-title h2,
.poll-stage-heading h1,
.poll-stage-heading p,
.poll-stage h1,
.poll-stage p {
  margin: 0;
}
.poll-settings-title h2 {
  color: #18483d;
  font-size: 1.23rem;
}
.poll-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.poll-setup select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 46px;
  min-height: 46px;
  padding-inline-end: 1.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2318483d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .55rem center;
  background-size: 1rem;
}
.poll-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #275b4d;
  font-size: .84rem;
  font-weight: 800;
}
.poll-progress span {
  flex: 0 0 auto;
}
.poll-progress progress {
  width: 100%;
  height: .45rem;
  accent-color: #246755;
}
.poll-stage .btn {
  min-height: 48px;
}
.poll-stage > .btn-primary,
.poll-ballot > .btn-primary {
  width: 100%;
}
.poll-topic,
.poll-verdict,
.poll-handoff {
  min-width: 0;
  display: grid;
  gap: .35rem;
  padding: clamp(14px, 4vw, 25px);
  border: 1px solid #cfe2d4;
  border-radius: .95rem;
  background: #eaf4e9;
  color: #18483d;
  overflow-wrap: anywhere;
}
.poll-topic h1,
.poll-handoff h1,
.poll-stage-heading h1,
.poll-verdict h1 {
  font-size: clamp(1.35rem, 5vw, 2.05rem);
}
.poll-handoff {
  justify-items: center;
  padding-block: clamp(18px, 5vw, 29px);
  border-color: #215648;
  background: radial-gradient(ellipse at 75% 0%, #397763, #173f35 70%);
  color: #fff9e8;
  text-align: center;
}
.poll-seal {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #dcb761;
  border-radius: 50%;
  background: #fae7ae;
  color: #664812;
  font-size: 1.2rem;
}
.poll-stage-heading {
  display: grid;
  gap: .3rem;
  color: #18483d;
}
.poll-stage-heading > p:last-child,
.poll-note {
  color: #496459;
  font-size: .9rem;
}
.poll-ballot fieldset {
  display: grid;
  min-width: 0;
  gap: .55rem;
  padding: 0;
  border: 0;
  margin: 0;
}
.poll-ballot legend {
  margin: 0 0 .35rem;
  padding: 0;
  color: #18483d;
  font-weight: 820;
}
.poll-error {
  padding: .55rem .7rem;
  border: 1px solid #ce9581;
  border-radius: .6rem;
  background: #fff0e9;
  color: #822d22;
  font-weight: 800;
}
.poll-options,
.poll-result-groups,
.poll-voters,
.poll-history {
  margin: 0;
  padding: 0;
  list-style: none;
}
.poll-choice-face,
.poll-result-line,
.poll-latest > p:last-child {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}
.poll-choice-face {
  min-height: 52px;
  padding: .55rem .7rem;
  border: 1px solid #c9ddd0;
  border-radius: .65rem;
  background: #fffef9;
  color: #18483d;
  font-weight: 800;
}
.poll-letter {
  display: inline-grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: .55rem;
  background: #d8eee1;
  color: #18483d;
  font-weight: 900;
}
[data-option-index="1"] .poll-letter { background: #f7e4aa; color: #604510; }
[data-option-index="2"] .poll-letter { background: #e9e3f4; color: #51436e; }
.poll-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.poll-radio {
  position: relative;
  display: block;
  cursor: pointer;
}
.poll-radio input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.poll-radio input:checked + .poll-choice-face {
  border-color: #246755;
  box-shadow: inset 0 0 0 1px #246755;
  background: #edf7ee;
}
.poll-radio input:focus-visible + .poll-choice-face {
  outline: 3px solid #176b61;
  outline-offset: 3px;
}
.poll-latest {
  display: grid;
  gap: .45rem;
  padding: .7rem;
  border: 1px solid #acccba;
  border-radius: .8rem;
  background: #e9f4e9;
  color: #18483d;
  font-weight: 820;
  animation: poll-open 260ms ease-out both;
}
.poll-verdict {
  justify-items: start;
  background: linear-gradient(125deg, #e7f3e7, #f8f3e1);
}
.poll-verdict[data-poll-verdict="unanimous"] {
  border-color: #dcb761;
  background: linear-gradient(130deg, #fff5d2, #f8e6a7);
}
.poll-verdict[data-poll-verdict] {
  animation: poll-open 260ms ease-out both;
}
@keyframes poll-open {
  from { opacity: .65; transform: translateY(5px) scale(.99); }
}
.poll-option-result {
  display: grid;
  min-width: 0;
  gap: .45rem;
  padding: .6rem;
  border: 1px solid #cadfd0;
  border-radius: .7rem;
  background: #fffefa;
}
.poll-option-result.is-empty {
  border-style: dashed;
  background: #faf8f2;
}
.poll-count {
  flex: 0 0 auto;
  color: #1d5a49;
  font-size: 1.26rem;
  font-variant-numeric: tabular-nums;
}
.poll-count small {
  margin-inline-start: .12rem;
  font-size: .72rem;
}
.poll-result-tag {
  justify-self: start;
  border-radius: 99px;
  padding: .12rem .5rem;
  background: #e9f2e8;
  color: #2b6250;
  font-size: .78rem;
  font-weight: 800;
}
.poll-voters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.poll-voters > li {
  max-width: 100%;
  border-radius: 99px;
  padding: .13rem .55rem;
  background: #edf4ec;
  color: #244f43;
  font-size: .83rem;
  overflow-wrap: anywhere;
}
.poll-empty h2 {
  margin: 0 0 .3rem;
  color: #4e655b;
  font-size: .88rem;
}
.poll-conversation {
  display: grid;
  gap: .2rem;
  padding: .7rem .85rem;
  border-inline-start: 3px solid #56947b;
  border-radius: .4rem;
  background: #eaf3e9;
  color: #18483d;
  font-weight: 750;
}
.poll-history li {
  display: grid;
  gap: .16rem;
  padding: .45rem .1rem;
  border-block-end: 1px solid #d8e2d9;
  overflow-wrap: anywhere;
}
.poll-history li strong {
  color: #286653;
  font-size: .8rem;
}
@media (min-width: 580px) {
  .poll-result-groups {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .poll-latest,
  .poll-verdict[data-poll-verdict] {
    animation: none;
  }
}

.poll-mode-picker label > span {
  align-content: center;
  gap: .15rem;
  min-height: 55px;
  padding: .42rem .32rem;
  line-height: 1.3;
  text-align: center;
}

.poll-mode-picker small {
  color: #416154;
  font-size: .73rem;
  font-weight: 700;
}

.poll-score-rules ul {
  display: grid;
  gap: .42rem;
  margin: 0 0 .6rem;
  padding-inline-start: 1.25rem;
  color: #375447;
  font-size: .84rem;
}

[data-option-index="3"] .poll-letter {
  background: #fae0d8;
  color: #773c2d;
}

.poll-player-cards,
.poll-ranking {
  display: grid;
  min-width: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.poll-player-cards {
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
}

.poll-round-answers {
  display: grid;
  gap: .55rem;
  min-width: 0;
}

.poll-answer-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .15rem .65rem;
  color: #36574b;
}

.poll-answer-count {
  font-size: .9rem;
}

.poll-answer-guide p {
  font-size: .82rem;
}

.poll-round-prompt {
  font-size: clamp(1rem, .94rem + .45vw, 1.25rem);
  line-height: 1.5;
}

.poll-player-card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: .48rem;
  padding: clamp(.82rem, 2.2vw, 1.15rem);
  border: 1px solid var(--poll-card-border, #819788);
  border-radius: .85rem;
  background: var(--poll-card-bg, #fffefa);
  color: #18483d;
}

.poll-player-card[data-poll-card-outcome] {
  grid-template-rows: auto 1fr auto;
}

.poll-player-card[data-poll-card-outcome="positive"] {
  --poll-card-bg: #fcecef;
  --poll-card-border: #a43d52;
  --poll-score-ink: #8e2438;
  --poll-badge-bg: #f7d7df;
}

.poll-player-card[data-poll-card-outcome="negative"] {
  --poll-card-bg: #eaf2fc;
  --poll-card-border: #35679c;
  --poll-score-ink: #164979;
  --poll-badge-bg: #d5e5f7;
}

.poll-player-card[data-poll-card-outcome="zero"] {
  --poll-card-bg: #f1f2f4;
  --poll-card-border: #6b727d;
  --poll-score-ink: #414854;
  --poll-badge-bg: #e0e3e7;
}

.poll-player-choice {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  min-width: 0;
  font-size: clamp(1.125rem, 1rem + .7vw, 1.5rem);
  font-weight: 850;
  line-height: 1.35;
}

.poll-player-heading > bdi,
.poll-ranking bdi {
  min-width: 0;
  overflow-wrap: anywhere;
}

.poll-player-heading > bdi {
  display: block;
  font-size: clamp(1rem, .97rem + .2vw, 1.125rem);
  font-weight: 750;
  line-height: 1.35;
}

.poll-player-choice .poll-letter {
  flex-basis: 1.5em;
  width: 1.5em;
  height: 1.5em;
  border-radius: .35rem;
}

.poll-player-outcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  color: var(--poll-score-ink);
}

.poll-delta,
.poll-ranking li > strong {
  flex: 0 0 auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.poll-delta {
  font-size: clamp(1.375rem, 1.2rem + .72vw, 1.75rem);
  font-weight: 850;
  line-height: 1.2;
}

.poll-player-status {
  padding: .16rem .55rem;
  border: 1px solid var(--poll-card-border);
  border-radius: 2rem;
  background: var(--poll-badge-bg);
  font-size: .875rem;
  font-weight: 750;
  line-height: 1.3;
}

.poll-delta small,
.poll-ranking li > strong small {
  margin-inline-start: .12rem;
  font-size: .67em;
  font-weight: 700;
}

.poll-rankings {
  display: grid;
  gap: .38rem;
  min-width: 0;
  padding: .52rem .58rem;
  border: 1px solid #c9dcd0;
  border-radius: .66rem;
  background: #f5f8f1;
  color: #244c41;
}

.poll-rankings h2 {
  margin: 0;
  font-size: .9rem;
}

.poll-ranking {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
}

.poll-ranking li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .25rem;
  min-width: 0;
  padding: .22rem .24rem;
  border-block-end: 1px solid #d7e4d9;
  font-size: .77rem;
  line-height: 1.36;
}

.poll-position {
  color: #466357;
  white-space: nowrap;
  font-weight: 770;
}

.poll-ranking [data-poll-rank="1"] .poll-position {
  color: #684811;
}

.poll-final .poll-ranking li {
  font-size: .89rem;
  padding-block: .45rem;
}

.poll-round--public .poll-rankings {
  padding: .75rem;
}

.poll-round--public .poll-rankings h2 {
  font-size: 1rem;
}

.poll-round--public .poll-ranking {
  grid-template-columns: minmax(0, 1fr);
}

.poll-round--public .poll-ranking li {
  font-size: .875rem;
}

.poll-round--public .poll-unanimous {
  padding: .65rem .75rem;
  border: 1px solid #c9dcd0;
  border-radius: .66rem;
  background: #f5f8f1;
  color: #254e43;
  font-size: .95rem;
}

.poll-round--public .poll-unanimous strong {
  font-size: 1.12rem;
}

.poll-round-header[data-poll-reversed="true"] {
  border-color: #c9a052;
  background: linear-gradient(130deg, #fff4d6, #f8e6bb);
}

.poll-round-next {
  display: grid;
  justify-items: center;
  padding-block-start: .9rem;
  border-block-start: 1px solid #d6e4d9;
}

.poll-round-next .btn {
  width: min(100%, 26rem);
}

@media (min-width: 590px) {
  .poll-ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 600px) {
  .poll-round--public .poll-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .game-main.poll-public-layout {
    width: calc(100% - 32px);
    max-width: 1000px;
  }

  .poll-public-layout > #game {
    max-width: none;
  }

  .poll-player-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
  }
}

@media (min-width: 1000px) {
  .poll-round--public .poll-ranking {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 350px) {
  .poll-ranking {
    grid-template-columns: minmax(0, 1fr);
  }
}
