#poll-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: 4px;
  border: 1px solid #f7931a55;
  border-radius: 9px;
  background: #f7931a12;
  color: #ffa63e;
  cursor: pointer;
}
#poll-create-button[hidden], #chat-poll[hidden], #poll-composer[hidden] {
  display: none;
}
#chat-poll {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  margin: 8px 9px;
  padding: 13px 13px 8px;
  border: 1px solid #f7931a70;
  border-radius: 14px;
  background: radial-gradient(ellipse at top right, #f7931a24, transparent 70%), #1c1713;
  color: #fff4e7;
  box-shadow: 0 5px 24px #0003, inset 0 1px #ffd29d12;
  font: 13px/1.45 system-ui, sans-serif;
}
.poll-topline, .poll-top-actions, .poll-footer, .poll-actions, .poll-composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.poll-eyebrow {
  color: #ffa63e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}
.poll-spark {
  display: inline-block;
  padding-right: 4px;
  font-size: 15px;
}
.poll-clock {
  color: #ffd09a;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.poll-collapse, .poll-close {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d4b899;
  cursor: pointer;
  font: 20px/1 system-ui, sans-serif;
  padding: 3px 7px;
}
#chat-poll .poll-question {
  margin: 8px 0 11px;
  color: #fff4e7;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.poll-body {
  max-height: min(38vh, 350px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #855322 transparent;
}
.poll-options {
  display: grid;
  gap: 7px;
}
.poll-option, .poll-result {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 10px;
  box-sizing: border-box;
  border: 1px solid #e3b47d26;
  border-radius: 9px;
  overflow: hidden;
  background: #ffffff04;
  color: #f8e9d7;
  overflow-wrap: anywhere;
}
.poll-option {
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.poll-option:hover, .poll-option:focus-within {
  background: #f7931a13;
  border-color: #f7931a88;
}
.poll-option.poll-selected {
  background: #f7931a20;
  border-color: #ff9e27;
}
.poll-option input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #f7931a;
}
.poll-result {
  justify-content: space-between;
}
.poll-result-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #d66a1438, #ffa12b4d);
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}
.poll-winner {
  border-color: #f7931a99;
}
.poll-result-label, .poll-result-count {
  position: relative;
  z-index: 1;
}
.poll-result-label {
  min-width: 0;
}
.poll-result-label small {
  display: block;
  color: #ffc77e;
  font-size: 10px;
}
.poll-result-count {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.poll-result-count strong, .poll-result-count small {
  display: block;
}
.poll-result-count small {
  color: #d1b89b;
  font-size: 10px;
}
.poll-footer {
  flex-wrap: wrap;
  margin-top: 12px;
}
.poll-total {
  color: #cbb298;
  font-size: 11px;
}
.poll-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 13px;
  border: 1px solid #ffb256;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffc064, #f7931a 70%, #ef7e13);
  color: #2a1607;
  box-shadow: 0 2px 10px #f7931a20;
  font: 750 12px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.poll-primary:disabled {
  opacity: .45;
  cursor: default;
}
.poll-text-button {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #ffc77e;
  font: 12px/1.4 system-ui, sans-serif;
  cursor: pointer;
}
.poll-text-button:hover {
  color: #ffe0b7;
  text-decoration: underline;
}
.poll-manage {
  margin-top: 5px;
  text-align: right;
}
.poll-manage .poll-text-button {
  color: #bca58b;
  font-size: 10px;
}
.poll-error {
  margin: 7px 0;
  color: #ffb69a;
  font-size: 12px;
}
.poll-error:empty {
  display: none;
}
.poll-timeline {
  height: 2px;
  margin: 9px -13px -8px;
  background: #f7931a0d;
}
.poll-timeline span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #b95614, #ffa63e);
  transition: width 1s linear;
}
#chat-poll.poll-minimized .poll-question {
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#chat-poll.poll-arriving {
  animation: poll-entrance 1.1s cubic-bezier(.16, 1, .3, 1) both;
}
.poll-arriving::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, #ffc57744 45%, #fff0cd77 50%, #ff9b2633 55%, transparent 80%);
  transform: translateX(-130%);
  animation: poll-flash 1.1s ease-out .12s both;
}
.poll-arriving .poll-spark {
  animation: poll-spark 1.1s ease-out;
}
@keyframes poll-entrance {
  from { opacity: 0; transform: translateY(-10px) scale(.98); box-shadow: 0 0 35px #ff950080; }
  40% { opacity: 1; box-shadow: 0 0 26px #ff95004d; }
  to { opacity: 1; transform: translateY(0) scale(1); box-shadow: 0 5px 24px #0003; }
}
@keyframes poll-flash {
  to { transform: translateX(130%); }
}
@keyframes poll-spark {
  from { transform: rotate(-90deg) scale(.4); }
  60% { transform: rotate(15deg) scale(1.35); }
  to { transform: rotate(0) scale(1); }
}
#poll-composer {
  position: absolute;
  top: 48px;
  right: 10px;
  z-index: 12;
  width: calc(100% - 20px);
  max-height: calc(100% - 64px);
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #775335 transparent;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--ui-button-edge, #f7931a29);
  border-radius: 18px;
  background: radial-gradient(ellipse at top right, #f7931a20, transparent 60%), var(--ui-glass, #1c1713);
  backdrop-filter: var(--ui-blur, blur(22px));
  -webkit-backdrop-filter: var(--ui-blur, blur(22px));
  color: #fff4e7;
  box-shadow: var(--ui-pop-shadow, 0 12px 35px #0006);
  font: 13px/1.5 system-ui, sans-serif;
}
#poll-composer:not([hidden]) {
  animation: poll-drawer-open .18s ease-out;
}
@keyframes poll-drawer-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
#poll-composer h2 {
  margin: 15px 0 4px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.04em;
}
.poll-composer-description {
  margin: 0 0 16px;
  color: #cbb298;
}
.poll-field, .poll-composer-choices legend {
  display: block;
  margin-bottom: 8px;
  color: #e9d0b4;
  font-size: 12px;
  font-weight: 650;
}
#poll-composer input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #e3b47d33;
  border-radius: 9px;
  outline-offset: 3px;
  background: #ffffff05;
  color: #fff4e7;
  font: 14px/1.4 system-ui, sans-serif;
}
#poll-composer input:focus {
  border-color: #f7931a;
  outline: 2px solid #f7931a44;
}
.poll-composer-choices {
  min-width: 0;
  margin: 17px 0 4px;
  padding: 0;
  border: 0;
}
.poll-choice-field {
  display: flex;
  align-items: center;
  gap: 5px;
}
.poll-composer-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 20px 0;
  padding-top: 15px;
  border-top: 1px solid #e3b47d22;
  color: #bca58b;
  font-size: 11px;
}
#poll-publish {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}
#chat-poll button:focus-visible, #poll-composer button:focus-visible, #poll-create-button:focus-visible {
  outline: 2px solid #ffd39b;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  #poll-composer:not([hidden]), #chat-poll.poll-arriving, .poll-arriving::after, .poll-arriving .poll-spark {
    animation: none;
  }
  .poll-result-bar, .poll-timeline span, .poll-option {
    transition: none;
  }
}
