/* Phase 3 — polls: full-screen voting view, share/my-polls modals, results bars. */
html.poll-mode, html.poll-mode body { overflow: hidden; }
.poll-view {
  position: fixed; top: var(--navh, 54px); left: 0; right: 0; bottom: 0; z-index: 30; overflow-y: auto;
  background: radial-gradient(1200px 600px at 50% -10%, #16202f 0%, var(--bg) 60%);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 18px 40px;
}
.poll-inner { width: 100%; max-width: 620px; text-align: center; }
.poll-brand { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.poll-view h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin: .5rem 0 .2rem; letter-spacing: -.01em; }
.poll-q { color: var(--muted); font-size: 1.05rem; margin-bottom: 26px; }
.poll-matchup { display: flex; align-items: stretch; gap: 14px; justify-content: center; }
.poll-choice {
  flex: 1; min-height: 150px; background: var(--panel); border: 2px solid var(--line);
  border-radius: 18px; color: var(--ink); cursor: pointer; padding: 18px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .12s, border-color .12s, background .12s;
}
.poll-choice:hover { border-color: var(--accent2); transform: translateY(-2px); }
.poll-choice.picked { border-color: var(--accent2); background: #16261f; transform: scale(1.03); }
.poll-choice .c-first { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.poll-choice .c-last { font-size: clamp(1rem, 3vw, 1.3rem); color: var(--muted); font-weight: 600; }
.poll-vs { align-self: center; color: var(--dim); font-weight: 700; font-size: .9rem; }
.poll-bar { margin-top: 22px; color: var(--dim); font-size: .9rem; }
.poll-link { background: none; border: 0; color: var(--accent2); cursor: pointer; font-size: .9rem; text-decoration: underline; }
.poll-results { margin-top: 20px; text-align: left; }
.poll-rank-h { font-size: 1rem; margin: 0 0 10px; color: var(--ink); text-align: center; }
.poll-foot { margin-top: 34px; }
.poll-exit { color: var(--dim); font-size: .85rem; text-decoration: none; }
.poll-exit:hover { color: var(--ink); }

/* ranked results (shared by vote view + owner modal) */
.rank { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 10px; }
.rank-n { width: 20px; text-align: right; color: var(--dim); font-size: .82rem; flex: 0 0 auto; }
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-size: .95rem; margin-bottom: 3px; }
.rank-last { color: var(--muted); }
.rank-track { height: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rank-fill { height: 100%; background: var(--accent2); }
.rank-stat { flex: 0 0 auto; color: var(--dim); font-size: .8rem; min-width: 62px; text-align: right; }

/* modals (share + my polls) */
.poll-modal-ov { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(4,7,12,.66); padding: 18px; }
.poll-modal { position: relative; width: 100%; max-width: 460px; max-height: 84vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.poll-x { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--dim); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.poll-x:hover { color: var(--ink); }
.poll-modal h2 { font-size: 1.25rem; margin: .5rem 0 .35rem; }
.poll-sub { color: var(--muted); font-size: .92rem; margin: 0 0 16px; line-height: 1.45; }
.poll-fine { color: var(--dim); font-size: .78rem; margin-top: 14px; }
.poll-linkrow { display: flex; gap: 8px; }
.poll-linkrow input { flex: 1; font-size: .9rem; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 10px 12px; }
.poll-linkrow .primary, .poll-modal .primary { background: var(--accent); color: #20150a; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; }

.mypolls { display: flex; flex-direction: column; gap: 10px; }
/* My polls — reuse the "My lists" card treatment. Each .mypoll IS the bordered card; the header
   row and the expandable results live inside it, so the border grows to wrap both on expand. */
.mypoll { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.mypoll .menu-listrow { border: 0; background: transparent; }
.mypoll .ml-chev { transition: transform .15s ease; }
.mypoll.open .ml-chev { transform: rotate(90deg); color: var(--accent2); }
.mypoll-status { font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); flex: 0 0 auto; }
.mypoll-status.open { color: var(--accent2); border-color: #26415f; }
.mypoll-status.closed { color: var(--dim); }
.mypoll-results { margin: 0 12px; padding: 10px 0 12px; border-top: 1px solid var(--line); }
.mypolls-create { margin-top: 8px; }
@media (max-width: 480px){ .poll-matchup { flex-direction: column; } .poll-vs { padding: 4px 0; } }
html.light .poll-view { background: #eef2f7; }
html.light .poll-modal { color: #1a2230; }

/* finite-session additions */
#pollIntro { max-width: 420px; margin: 0 auto; }
.poll-introtext { color: var(--muted); font-size: 1rem; line-height: 1.5; margin: 0 0 18px; }
#guestName { width: 100%; max-width: 320px; font-size: 1rem; text-align: center; background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.poll-start { background: var(--accent); color: #20150a; font-weight: 700; border: 0; border-radius: 12px; padding: 13px 30px; font-size: 1.05rem; cursor: pointer; display: block; margin: 0 auto; }
.poll-start:hover { filter: brightness(1.05); }
.poll-progress { height: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; max-width: 480px; margin: 0 auto 8px; }
.poll-progress-fill { height: 100%; width: 0; background: var(--accent2); transition: width .2s; }
.poll-progress-label { color: var(--dim); font-size: .82rem; margin-bottom: 18px; }
.poll-thanks { font-size: 1.1rem; margin-bottom: 20px; }
.poll-again { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; padding: 9px 18px; font-size: .9rem; cursor: pointer; }
.poll-again:hover { border-color: var(--accent2); color: var(--ink); }
#pollDone { max-width: 460px; margin: 0 auto; text-align: left; }
#pollDone .poll-thanks { text-align: center; }

/* Right after a pick, don't let the card under a stationary cursor look pre-selected. */
#pollPlay.suppress-hover .poll-choice:hover { border-color: var(--line); transform: none; background: var(--panel); }

/* Kill the native mobile tap-highlight rectangle (ignored border-radius on tap). */
.poll-choice, .poll-start, .poll-again, .poll-link, .poll-exit { -webkit-tap-highlight-color: transparent; }
.poll-choice:focus { outline: none; }
.poll-choice:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* Calmer tap feedback: no animating green border (it flickered when alternating cards).
   Border stays constant; feedback is a soft press-in + tint. */
.poll-choice { transition: transform .1s ease, background .1s ease; }
.poll-choice:hover { border-color: var(--line); transform: none; background: var(--panel2); }
.poll-choice.picked { border-color: var(--line); background: #17311f; transform: scale(0.97); }
