.poll-dialog{--poll-surface:#fff;--poll-muted:#f7f5fa;width:min(640px,calc(100vw - 32px));max-width:100%;max-height:calc(100dvh - 48px);margin:auto;padding:0;border:1px solid var(--bdr,#e8e3ef);border-radius:22px;background:var(--poll-surface);color:var(--tx,#25202e);font-family:inherit;box-shadow:0 24px 90px #23163740;overflow:hidden}
.poll-dialog::backdrop{background:#20162970;backdrop-filter:blur(3px)}
.poll-dialog-layout{display:flex;flex-direction:column;max-height:calc(100dvh - 50px)}
.poll-header{display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid var(--bdr,#e8e3ef);flex-shrink:0}
.poll-header h2{margin:0;flex:1;font-size:21px;line-height:1.3;font-weight:800;min-width:0}
.poll-body{padding:22px 24px 26px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.poll-public{margin:0 0 22px;color:var(--tx3,#857b93);font-size:12px;line-height:1.6}
.poll-dialog button,.poll-dialog input,.poll-dialog textarea,.poll-dialog select{font:inherit}
.poll-dialog button{cursor:pointer;touch-action:manipulation}
.poll-dialog button:disabled{cursor:default;opacity:.5}
.poll-dialog :focus-visible,.poll-link-card:focus-visible{outline:3px solid #ae83ed;outline-offset:3px}
.poll-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border:1px solid var(--bdr,#e8e3ef);border-radius:10px;background:transparent;color:var(--tx2,#655773);font-size:19px!important}
.poll-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:9px 15px;border:1px solid var(--bdr,#e8e3ef);border-radius:10px;background:var(--poll-surface);color:var(--tx2,#655773);font-weight:700!important;font-size:13px!important;line-height:1.4}
.poll-button.primary{background:var(--p,#7947b0);border-color:var(--p,#7947b0);color:#fff}
.poll-button.danger{color:#c14051}
.poll-wide{width:100%}
.poll-filters{display:flex;gap:6px;padding:4px;background:var(--poll-muted);border-radius:12px;margin-bottom:16px}
.poll-filter{flex:1;border:0;border-radius:9px;padding:9px 6px;color:var(--tx3,#857b93);background:transparent;font-weight:700!important;font-size:13px!important;white-space:nowrap}
.poll-filter[aria-pressed="true"]{background:var(--poll-surface);color:var(--p,#7947b0);box-shadow:0 2px 5px #2416380c}
.poll-search{display:flex;gap:8px;margin-bottom:20px}
.poll-search>.poll-button{flex-shrink:0;white-space:nowrap}
.poll-dialog input:not([type="checkbox"]):not([type="radio"]),.poll-dialog textarea,.poll-dialog select{width:100%;min-width:0;box-sizing:border-box;padding:11px 12px;border:1px solid var(--bdr,#e8e3ef);border-radius:9px;background:var(--poll-surface);color:var(--tx,#25202e);font-size:14px;line-height:1.5}
.poll-dialog input[type="checkbox"],.poll-dialog input[type="radio"]{width:18px;height:18px;accent-color:var(--p,#7947b0);flex-shrink:0;cursor:pointer;margin:0}
.poll-dialog textarea{resize:vertical}
.poll-list{display:grid;gap:12px;margin-bottom:16px}
.poll-list-item{display:flex;flex-direction:column;gap:12px;text-align:left;border:1px solid var(--bdr,#e8e3ef);border-radius:14px;padding:18px;background:var(--poll-surface);color:inherit;width:100%;min-width:0}
.poll-list-item:hover{border-color:var(--p,#7947b0);background:var(--poll-muted)}
.poll-list-item strong{font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.poll-tags{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:11px;font-weight:700}
.poll-badge{display:inline-block;border-radius:6px;background:#ede2fb;color:#7640a3;padding:4px 7px}
.poll-badge.closed{background:#eeeaf0;color:#827b8b}
.poll-tag{color:var(--tx3,#857b93)}
.poll-meta{color:var(--tx3,#857b93);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.poll-list-bottom{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--p,#7947b0);width:100%;border-top:1px solid var(--bdr,#e8e3ef);padding-top:12px}
.poll-empty{text-align:center;padding:35px 12px;color:var(--tx3,#857b93);font-size:14px;line-height:1.6;display:flex;flex-direction:column;gap:8px;align-items:center}
.poll-empty>i{font-size:36px;color:var(--p,#7947b0);margin-bottom:8px}
.poll-empty p{margin:0}
.poll-detail h3{font-size:24px;line-height:1.5;margin:14px 0 6px;overflow-wrap:anywhere}
.poll-description{font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;margin:18px 0}
.poll-deadline{display:flex;gap:7px;align-items:center;font-size:12px;color:var(--tx2,#655773);padding:12px 14px;background:var(--poll-muted);border-radius:10px;margin:18px 0 22px}
.poll-result-heading{display:flex;align-items:center;justify-content:space-between;font-size:15px}
.poll-help{color:var(--tx3,#857b93);font-size:12px;line-height:1.7;margin:8px 0 16px}
.poll-options{margin:0;padding:0;border:0;display:grid;gap:10px;min-width:0}
.poll-option{display:flex;align-items:center;gap:11px;position:relative;overflow:hidden;isolation:isolate;min-height:56px;padding:13px 15px;border:1px solid var(--bdr,#e8e3ef);border-radius:11px;cursor:pointer}
.poll-option.selected{border-color:var(--p,#7947b0)}
.poll-option-bar{position:absolute;inset:0 auto 0 0;background:var(--poll-muted);z-index:-1;transition:width .3s}
.poll-option.selected .poll-option-bar{background:#eee4fb}
.poll-option-text{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px;font-weight:650;line-height:1.6}
.poll-option-count{text-align:right;flex-shrink:0;font-size:13px;color:var(--p,#7947b0);font-weight:750}
.poll-option-count small{display:block;color:var(--tx3,#857b93);font-size:11px;font-weight:500;margin-top:2px}
.poll-voters{font-size:11px;color:var(--tx3,#857b93);padding:7px 4px 3px}
.poll-voters summary,.poll-add-choice summary{cursor:pointer}
.poll-voters p{line-height:1.8;margin:8px 0;overflow-wrap:anywhere}
.poll-add-choice{font-size:13px;color:var(--p,#7947b0);padding:16px 0}
.poll-add-choice form{display:flex;gap:8px;margin-top:12px}
.poll-add-choice button{flex-shrink:0}
.poll-vote-actions{display:flex;gap:10px;margin-top:22px}
.poll-vote-actions .primary{flex:1;min-height:46px}
.poll-closed-notice{width:100%;text-align:center;font-size:13px;color:var(--tx3,#857b93);background:var(--poll-muted);padding:15px;border-radius:10px;margin:0}
.poll-share-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding:18px 0 0}
.poll-owner-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding-top:22px;margin-top:22px;border-top:1px solid var(--bdr,#e8e3ef)}
.poll-owner-actions>span{margin-right:auto;color:var(--tx3,#857b93);font-size:12px}
.poll-editor{display:grid;gap:18px;font-size:14px}
.poll-editor>label{display:block;font-weight:700;line-height:1.5}
.poll-editor>label input,.poll-editor>label textarea,.poll-editor>label select{display:block;margin-top:7px;font-weight:400}
.poll-optional{font-size:11px;font-weight:400;color:var(--tx3,#857b93);margin-left:6px}
.poll-edit-options{border:0;padding:0;margin:0;display:grid;gap:9px;min-width:0}
.poll-edit-options legend{font-weight:700;margin-bottom:10px}
.poll-edit-option{display:flex;gap:8px;align-items:center}
.poll-edit-option>span{font-size:12px;color:var(--tx3,#857b93);width:18px;flex-shrink:0;text-align:center}
.poll-settings{display:grid;gap:15px;background:var(--poll-muted);padding:18px;border-radius:12px}
.poll-check{display:flex;gap:10px;align-items:center;cursor:pointer;font-size:13px}
.poll-editor-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:10px}
.poll-editor-actions .primary{min-width:130px}
.poll-edit-notice{font-size:12px;line-height:1.8;color:var(--tx2,#655773);background:var(--poll-muted);border-radius:10px;padding:14px;margin:0}
.poll-error{padding:12px 14px;border:1px solid #efbbbf;background:#fff3f3;border-radius:10px;color:#a3313f;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.poll-error[hidden]{display:none}
.poll-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.poll-confirm-dialog{width:min(440px,calc(100vw - 32px));overflow-y:auto}
.poll-confirm-content{padding:25px}
.poll-confirm-content h2{font-size:20px;margin:0 0 14px}
.poll-confirm-content p{font-size:14px;line-height:1.8;color:var(--tx2,#655773);white-space:pre-wrap;overflow-wrap:anywhere}
.poll-confirm-content label{display:grid;gap:8px;font-size:13px}
.poll-link-card{display:inline-flex;align-items:center;gap:9px;max-width:100%;margin:8px 0 2px;padding:13px 16px;border:1px solid #ccb3e6;border-radius:12px;background:#f7f0fe;color:#7947b0;font:inherit;font-size:13px;font-weight:750;cursor:pointer;text-align:left}
.poll-sidebar-entry{width:100%;background:transparent;border:0;text-align:left;font:inherit}
:root[data-theme="dark"] .poll-dialog{--poll-surface:#20212b;--poll-muted:#292735;color:#f0eaf8}
:root[data-theme="dark"] .poll-badge{background:#47305e;color:#dabaff}
:root[data-theme="dark"] .poll-badge.closed{background:#35313e;color:#b2a7be}
:root[data-theme="dark"] .poll-option.selected .poll-option-bar{background:#392a4a}
:root[data-theme="dark"] .poll-error{background:#422630;border-color:#7a3c48;color:#ffc0ca}
:root[data-theme="dark"] .poll-link-card{background:#392a4a;border-color:#694789;color:#dfc2ff}
@media(max-width:600px){
  .poll-dialog:not(.poll-confirm-dialog){width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}
  .poll-dialog-layout{height:100%;max-height:100dvh}
  .poll-header{gap:8px;padding:calc(14px + env(safe-area-inset-top)) 16px 14px}
  .poll-header h2{font-size:19px}
  .poll-header .poll-button{font-size:12px!important;min-height:36px;padding:8px 10px}
  .poll-body{padding:20px 18px calc(24px + env(safe-area-inset-bottom));flex:1}
  .poll-detail h3{font-size:22px}
  .poll-owner-actions .poll-button{padding:8px 11px}
  .poll-public{font-size:11px}
  .poll-dialog input:not([type="checkbox"]):not([type="radio"]),.poll-dialog textarea,.poll-dialog select{font-size:16px}
  .mobile-attach-menu{grid-template-columns:repeat(5,minmax(0,1fr))}
}
