/* poll card */
.pl { --gold: #f5b445; margin-top: 6px; max-width: 560px; padding: 14px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line-2); }
.pl.is-ended { border-color: rgba(245, 180, 69, .28); }
.pl-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.pl-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.pl-tag.is-end { background: rgba(245, 180, 69, .15); color: var(--gold); }
.pl-q { font-size: 16px; font-weight: 600; margin: 6px 0 2px; color: var(--ink); text-wrap: balance; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.pl-d { color: var(--ink-3); font-size: 13px; margin-bottom: 4px; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.pl-hint { font-size: 12px; color: var(--ink-3); margin: 8px 0; }
.pl-hint b { color: var(--ink-2); font-weight: 600; }
.pl-gap { height: 8px; }

.pl-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pl-grid.is-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pl-opt { position: relative; border: 1px solid var(--line-2); background: var(--panel); border-radius: var(--r); overflow: hidden; cursor: pointer; text-align: start; transition: border-color .12s, box-shadow .12s; }
.pl-opt:hover { border-color: var(--line-3); }
.pl-opt.is-ro, .pl-row.is-ro { cursor: default; }
.pl-opt.is-sel, .pl-row.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pl-opt.is-dis, .pl-row.is-dis { opacity: .45; cursor: not-allowed; }
.pl-opt.is-won, .pl-row.is-won { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.pl-opt:focus-visible, .pl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg); }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-gone { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--ink-4); font-size: 11.5px; }
.pl-gone svg { width: 26px; height: 26px; }
.pl-check { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); display: grid; place-items: center; color: #fff; }
.pl-check.is-sq { border-radius: 6px; }
.pl-check svg { width: 14px; height: 14px; stroke-width: 3; }
.pl-opt.is-sel .pl-check, .pl-opt.is-mine .pl-check, .pl-row.is-sel .pl-check, .pl-row.is-mine .pl-check { background: var(--accent); border-color: var(--accent); }
.pl-zoom { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 7px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.pl-zoom svg { width: 16px; height: 16px; }
.pl-opt:hover .pl-zoom, .pl-zoom:focus-visible { opacity: 1; }
@media (hover: none) { .pl-zoom { opacity: 1; } }
.pl-crown { position: absolute; bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; background: var(--gold); color: #241a00; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.pl-crown svg { width: 12px; height: 12px; stroke-width: 2.4; }
.pl-oi { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.pl-ol { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pl-ol .pl-t { font-weight: 500; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; color: var(--ink); unicode-bidi: plaintext; }
.pl-p { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; }
.pl-bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.pl-bar i { display: block; height: 100%; background: var(--ink-4); border-radius: 3px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.pl-opt.is-mine .pl-bar i { background: var(--accent); }
.pl-opt.is-won .pl-bar i { background: var(--gold); }
.pl-who { display: flex; align-items: center; min-height: 22px; }
.pl-who .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--panel); }
.pl-who .av:first-child { margin-left: 0; }
.pl-who em { font-style: normal; font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.pl-who em:first-child { margin-left: 0; }

.pl-rows { display: flex; flex-direction: column; gap: 6px; }
.pl-row { position: relative; border: 1px solid var(--line-2); border-radius: 9px; background: var(--panel); padding: 9px 12px; display: flex; gap: 10px; align-items: center; overflow: hidden; cursor: pointer; }
.pl-row > * { position: relative; }
.pl-row > .pl-fill { position: absolute; inset: 0 auto 0 0; background: rgba(138, 143, 156, .14); transition: width .5s; }
.pl-row.is-mine .pl-fill { background: var(--accent-soft); }
.pl-row.is-won .pl-fill { background: rgba(245, 180, 69, .18); }
.pl-row .pl-check { position: relative; top: auto; left: auto; width: 18px; height: 18px; flex: none; border-color: var(--ink-4); background: none; }
.pl-row .pl-check svg { width: 12px; height: 12px; }
.pl-row .pl-t { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.pl-rowcrown { display: inline-flex; vertical-align: -2px; margin-inline-end: 4px; color: var(--gold); }
.pl-rowcrown svg { width: 15px; height: 15px; }

.pl-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.pl-sp { flex: 1; }
.pl-lnk { border: 0; background: none; color: var(--accent); padding: 4px 2px; font-size: 12px; cursor: pointer; }
.pl-lnk:hover { text-decoration: underline; }
.pl-f .btn--sm { height: 30px; }
.pl-more { width: 32px; padding: 0; }
.pl-confirm { margin-top: 10px; background: rgba(229, 83, 75, .08); border: 1px solid rgba(229, 83, 75, .3); border-radius: var(--r-sm); padding: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.pl-confirm > span { flex: 1; min-width: 160px; }

/* poll ended row */
.pl-endrow .msg__gutter { color: #f5b445; }
.pl-endrow .msg__body { color: var(--ink-3); }
.pl-endrow .msg__body b { color: var(--ink); font-weight: 600; }
.pl-endrow.is-link { cursor: pointer; }
.pl-endrow.is-link:hover .pl-endq { color: var(--ink); text-decoration: underline; }

/* dialogs */
.pl-scrim { position: fixed; inset: 0; z-index: 88; background: rgba(4, 5, 8, .62); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.pl-dlg { width: 560px; max-width: 100%; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: 16px; background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .16s; overflow: hidden; }
.pl-dlg.pl-vd { width: 440px; }
.pl-dh { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; font-size: 16px; flex: none; }
.pl-dh b { font-weight: 700; }
.pl-x { margin-left: auto; width: 32px; height: 32px; color: var(--ink-3); }
.pl-db { overflow-y: auto; padding: 4px 18px 14px; display: flex; flex-direction: column; gap: 14px; min-height: 0; overscroll-behavior: contain; }
.pl-fl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.pl-fl em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; text-align: end; }
.pl-in { display: block; width: 100%; min-width: 0; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); padding: 0 11px; outline: none; color: var(--ink); font: inherit; unicode-bidi: plaintext; }
.pl-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pl-opts { display: flex; flex-direction: column; gap: 6px; }
.pl-oprow { display: flex; gap: 8px; align-items: center; }
.pl-slotw { position: relative; flex: none; }
.pl-slot { width: 52px; height: 40px; border-radius: 7px; border: 1px dashed var(--line-3); background: var(--bg-2); display: grid; place-items: center; color: var(--ink-4); overflow: hidden; position: relative; padding: 0; cursor: pointer; }
.pl-slot svg { width: 18px; height: 18px; }
.pl-slot img { width: 100%; height: 100%; object-fit: cover; }
.pl-slot:hover, .pl-slot.is-drag { border-color: var(--accent); color: var(--accent); }
.pl-slot.is-drag { background: var(--accent-soft); }
.pl-slot.is-bad { border: 1px solid var(--bad); }
.pl-slotbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .45); }
.pl-slotbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.pl-slotx { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0; background: var(--panel-3); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 2px var(--panel); }
.pl-slotx svg { width: 11px; height: 11px; stroke-width: 2.6; }
.pl-slotx:hover { background: var(--bad); color: #fff; }
.pl-rm { width: 32px; height: 32px; flex: none; color: var(--ink-4); }
.pl-rm:disabled { opacity: .3; cursor: default; }
.pl-addopt { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line-2); background: none; border-radius: var(--r-sm); padding: 8px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.pl-addopt svg { width: 16px; height: 16px; }
.pl-addopt:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pl-addopt:disabled { opacity: .4; cursor: default; }
.pl-set { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 12px; }
.pl-sr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.pl-sr:last-child { border-bottom: 0; }
.pl-lab { flex: 1; min-width: 150px; }
.pl-lab b { display: block; font-weight: 500; font-size: 13.5px; }
.pl-lab small { color: var(--ink-3); font-size: 12px; }
.pl-seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; }
.pl-seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.pl-seg button.is-on { background: var(--panel-3); color: var(--ink); }
.pl-sw { width: 38px; height: 22px; border-radius: 11px; background: var(--line-3); border: 0; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.pl-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.pl-sw.is-on { background: var(--accent); }
.pl-sw.is-on::after { left: 19px; }
.pl-step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.pl-step button { border: 0; background: var(--panel-3); width: 30px; height: 30px; cursor: pointer; font-size: 15px; }
.pl-step button:disabled { opacity: .4; cursor: default; }
.pl-step span { min-width: 72px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chips button { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 16px; padding: 4px 11px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.pl-chips button.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.pl-df { display: flex; gap: 8px; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--line-2); background: var(--panel-2); flex: none; }
.pl-df .pl-sp { font-size: 12px; color: var(--ink-3); min-width: 0; }
.pl-df .pl-sp.is-bad { color: var(--bad); }

.pl-vtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 10px; border-bottom: 1px solid var(--line-2); flex: none; max-height: 40dvh; overflow-y: auto; }
.pl-vtabs button { flex: none; border: 0; background: var(--panel-2); border-radius: var(--r-sm); padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; cursor: pointer; max-width: 200px; }
.pl-vtabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-vtabs button small { font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; }
.pl-vtabs button.is-on { background: var(--accent); color: #fff; }
.pl-vtabs img { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; flex: none; }
.pl-vlist { padding: 8px 18px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 120px; overscroll-behavior: contain; }
.pl-vrow { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.pl-vname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-vname small { color: var(--ink-4); font-size: 12px; margin-left: 6px; }
.pl-vnote { color: var(--ink-3); font-size: 13px; padding: 12px 0; }
.pl-vnote.is-bad { color: var(--bad); }
.pl-vmore { align-self: center; margin-top: 6px; }

@media (max-width: 820px) {
  .pl { padding: 12px; max-width: none; }
  .pl-grid.is-c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-f .btn--sm { height: 36px; }
  .pl-scrim { place-items: end center; padding: 0; }
  .pl-dlg { width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; animation: sheet-up .25s cubic-bezier(.2, .9, .3, 1); }
  .pl-dlg.pl-vd { width: 100%; }
  .pl-dlg.pl-cd { height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
  .pl-df { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .pl-df .btn { min-height: 44px; }
  .pl-in { height: 44px; font-size: 16px; }
  .pl-slot { width: 56px; height: 44px; }
  .pl-vlist { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-bar i, .pl-row > .pl-fill { transition: none; }
}
