/* Poll results retain contrast when voting is closed. */
body #messages .message-poll { min-width: 0; width: min(300px, 100%); gap: 12px; padding: 4px; }
body #messages .message:has(.message-poll) { width: min(328px, 88%); }
body #messages .message-poll > header { align-items: flex-start; gap: 10px; }
body #messages .message-poll > header > .lucide { width: 34px; height: 34px; padding: 8px; flex-shrink: 0; border-radius: 12px; background: #6d28d9; color: #fff; }
body #messages .message-poll > header strong { color: inherit; font-size: 18px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
body #messages .message-poll > header small { margin-bottom: 4px; color: inherit; opacity: .8; font-size: 10px; letter-spacing: .06em; }
body #messages .message-poll-options { gap: 8px; }
body #messages .message-poll-options button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 12px;
  color: inherit;
  background: color-mix(in srgb, currentColor 4%, transparent);
}
body #messages .message-poll-options button:disabled { opacity: 1; cursor: default; }
body #messages .message-poll-options button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--poll-share, 0%);
  background: color-mix(in srgb, currentColor 12%, transparent);
}
body #messages .message-poll-options button[aria-pressed="true"] { border-color: #c4a7ff; }
body #messages .message-poll-options button b { font-size: 15px; font-weight: 550; }
body #messages .message-poll-options button em { display: grid; gap: 2px; color: inherit; font-size: 13px; font-weight: 650; }
body #messages .message-poll-options button em small { font-size: 10px; font-weight: 400; opacity: .8; }
body #messages .message-poll .poll-choice { width: 22px; height: 22px; border-color: currentColor; }
body #messages .message-poll > footer { flex-wrap: wrap; gap: 6px 12px; color: inherit; font-size: 11px; line-height: 1.5; }
body #messages .message-poll .poll-timing { flex: 1 1 100%; }
body #messages .message-poll.closed .poll-timing { font-weight: 650; }
/* Flexible tracks fill the picker; the glyph and tap target scale together. */
html:root.native-mobile body #emoji-picker {
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 4px;
  padding: 10px;
  max-height: min(340px, 45dvh);
  overscroll-behavior: contain;
}
html:root.native-mobile body #emoji-picker button {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  padding: 0;
  font-size: 32px;
  line-height: 1;
  border-radius: 12px;
}
html:root.native-mobile body #emoji-picker button:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
