/* Live Poll (poll.awahab.site): one stylesheet for all pages. Base from the OPMG 5202 class polls (Oct 2026). */
:root { --bg:#f5f7f7; --surface:#fff; --ink:#22303a; --muted:#5d6b70; --line:#d7dee0; --teal:#1f6f78; --teal-soft:#dceef0;
  --ok:#2e8c46; --warn:#b06a10; --font:"Segoe UI", Calibri, "Helvetica Neue", Arial, sans-serif; }
@media (prefers-color-scheme: dark) { :root.adapt { --bg:#121718; --surface:#1b2224; --ink:#e3e9ea; --muted:#9aa8ab; --line:#2f3a3d;
  --teal:#58b3bd; --teal-soft:#173a3e; --ok:#5cc27a; --warn:#e0a050; color-scheme: dark; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:17px/1.45 var(--font); }
.wrap { max-width: 640px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
h1 { font-size: 1.25rem; margin: 0 0 4px; } .muted { color: var(--muted); } .small { font-size: .9rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 14px; }
.q { font-size: 1.25rem; font-weight: 700; margin: 0 0 14px; line-height: 1.3; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=tel], textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
.unit { color: var(--muted); font-size: .95rem; margin-top: 4px; }
button { font: inherit; cursor: pointer; }
.primary { background: var(--teal); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 700; width: 100%; margin-top: 14px; font-size: 1.05rem; }
.opt { display: block; width: 100%; text-align: left; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 14px; margin-top: 10px; font-weight: 600; }
.opt.sel { border-color: var(--teal); background: var(--teal-soft); }
.saved { color: var(--ok); font-weight: 700; margin-top: 12px; } .err { color: #b3261e; font-weight: 600; margin-top: 10px; }
.pill { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 2px 10px; }
.pill.open { background: var(--ok); color: #fff; } .pill.closed { background: var(--line); color: var(--ink); } .pill.revealed { background: var(--teal); color: #fff; } .pill.idle { background: var(--line); color: var(--muted); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
/* host */
.host .wrap { max-width: 980px; }
.qrow { display: grid; grid-template-columns: 2.2rem minmax(0,1fr) auto; gap: 10px 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.qrow:first-child { border-top: 0; } .qrow.current { background: var(--teal-soft); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.qnum { font-weight: 700; color: var(--muted); text-align: right; } .qtext { min-width: 0; } .qtext b { display:block; }
.qmeta { font-size: .85rem; color: var(--muted); }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: .9rem; }
.btn.go { background: var(--ok); border-color: var(--ok); color: #fff; } .btn.rev { background: var(--teal); border-color: var(--teal); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.count { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
/* screen (projector) */
.screen body, body.screen { background: #fff; color: #1d2a30; }
.scr { padding: 3vh 4vw; min-height: 100vh; display: grid; grid-template-rows: auto auto 1fr auto; gap: 2vh; }
.scr .top { display: flex; justify-content: space-between; align-items: baseline; gap: 2vw; color: #5d6b70; font-size: 1.6vw; }
.scr .join { font-weight: 700; color: #1f6f78; }
.scr .sq { font-size: 3.2vw; font-weight: 800; line-height: 1.2; }
.scr .stage { min-height: 0; }
.scr .bar { height: 1.6vh; background: #e3e8e9; border-radius: 99px; overflow: hidden; } .scr .bar i { display: block; height: 100%; background: #1f6f78; width: 0; }
.scr .big { font-size: 7vw; font-weight: 800; color: #1f6f78; font-variant-numeric: tabular-nums; line-height: 1; }
.scr .waiting { font-size: 2vw; color: #5d6b70; }
.scr .key { font-size: 2vw; background: #eef7ef; border: 2px solid #2e8c46; color: #1d4d2a; border-radius: 12px; padding: 1.2vh 1.5vw; }
.scr .key b { color: #2e8c46; }
.scr svg { width: 100%; height: auto; display: block; }
.scr .texts { columns: 2; column-gap: 2vw; font-size: 1.7vw; }
.scr .texts div { break-inside: avoid; background: #f3f6f6; border-radius: 10px; padding: 1vh 1vw; margin-bottom: 1.2vh; }
.scr .stats { font-size: 1.8vw; color: #37474f; margin-top: 1vh; }
.scr .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; }
.scr .pair .stats { font-size: 1.4vw; }
.scr .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(17vw, 1fr)); gap: 0.8vh 1vw; margin-top: 1.5vh; font-size: 1.5vw; }
.scr .person { background: #f3f6f6; border-radius: 8px; padding: 0.6vh 0.8vw; display: flex; justify-content: space-between; gap: 0.8vw; }
.scr .person span { color: #1f6f78; font-weight: 700; text-align: right; }
.scr .groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(25vw, 1fr)); gap: 1.5vw; }
.scr .groups .people { grid-template-columns: repeat(auto-fill, minmax(12vw, 1fr)); font-size: 1.3vw; margin-top: 0.5vh; }
.scr .people { font-size: 1.35vw; gap: 0.6vh 0.8vw; margin-top: 1vh; }
.scr .person { padding: 0.4vh 0.7vw; }
.scr .groups .person { display: block; }
.scr .stats { margin-top: 0.4vh; }
/* presenter controls on the projector page (26 Oct 2026): hidden until the mouse reaches the bottom edge */
.pc { position: fixed; left: 50%; bottom: 10px; transform: translate(-50%, 140%); display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  justify-content: center; max-width: 96vw; background: rgba(29,42,48,.94); color: #fff; padding: 8px 10px; border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); transition: transform .18s ease; z-index: 10; font-size: 15px; }
.pc.show { transform: translate(-50%, 0); }
.pc-where { font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-b { border: 1px solid #5d6b70; background: #2b3a41; color: #fff; border-radius: 8px; padding: 6px 11px; font-weight: 600; font-size: 14px; }
.pc-b:hover { background: #37505a; } .pc-b.pc-go { background: #2e8c46; border-color: #2e8c46; } .pc-b.pc-rev { background: #1f6f78; border-color: #1f6f78; }
.pc-b.on { background: #f0c75e; color: #1d2a30; border-color: #f0c75e; }
#pcPick { max-width: 22vw; font: 14px var(--font); padding: 5px; border-radius: 8px; border: 1px solid #5d6b70; background: #2b3a41; color: #fff; }
.pc-toast { position: fixed; right: 16px; bottom: 16px; background: rgba(29,42,48,.9); color: #fff; padding: 6px 12px; border-radius: 8px;
  font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 11; }
.pc-toast.show { opacity: 1; }
.pc-help { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 12; }
.pc-help[hidden] { display: none; }
.pc-help-card { background: #fff; color: #1d2a30; border-radius: 14px; padding: 20px 26px; max-width: 760px; font-size: 16px; }
.pc-help-card h2 { margin: 0 0 10px; font-size: 20px; } .pc-help-card td { padding: 4px 14px 4px 0; vertical-align: top; }
.pc-help-card td:first-child { font-weight: 700; white-space: nowrap; }
/* host: sessions */
.sess { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sess select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%; }
.runs { width: 100%; border-collapse: collapse; font-size: .9rem; } .runs td, .runs th { text-align: left; padding: 5px 8px; border-top: 1px solid var(--line); }
.errs { color: #b3261e; font-size: .9rem; margin: 6px 0 0; }
/* stage 1 features (26 Oct 2026) */
.pill.anon { background: #5b4a9e; color: #fff; margin-left: 6px; }
.countdown { float: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--teal); }
.countdown.urgent, .cd.urgent { color: #b3261e; }
.opt.multi::before { content: "☐ "; } .opt.multi.sel::before { content: "☑ "; }
.stars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.star { font-size: 2.4rem; line-height: 1; background: none; border: 0; color: var(--line); padding: 2px 4px; }
.star.on { color: #e0a800; }
input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--teal); }
.slval { font-size: 2rem; font-weight: 800; text-align: center; margin: 6px 0 0; color: var(--teal); }
.spread { display: flex; justify-content: space-between; }
.mres { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.mbar { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 2.2rem; gap: 8px; align-items: center; margin: 6px 0; font-size: .95rem; }
.mbar b { display: block; height: 14px; background: var(--teal-soft); border-radius: 99px; overflow: hidden; }
.mbar b i { display: block; height: 100%; background: var(--teal); } .mbar .num { text-align: right; font-weight: 700; }
.mwords span { display: inline-block; margin: 2px 8px; font-weight: 700; color: var(--teal); }
.mtext { background: var(--teal-soft); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.mres .key { margin-top: 8px; }
.scr .cd { font-weight: 800; color: #1f6f78; font-variant-numeric: tabular-nums; font-size: 2.2vw; }
.scr .livetag { color: #b3261e; font-weight: 800; font-size: 1.6vw; margin: 0 0 1vh; }
.scr .rmean { display: flex; align-items: baseline; gap: 1vw; margin-bottom: 1vh; } .scr .rmean .big { font-size: 6vw; } .scr .rof { font-size: 2vw; color: #5d6b70; }
.scr .cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.6vh 1.6vw; padding: 2vh 2vw; font-weight: 800; line-height: 1.1; }
.scr .join-big { display: flex; align-items: center; gap: 4vw; margin-top: 2vh; }
.scr .join-big img { width: 46vh; height: 46vh; } .scr .jtitle { font-size: 3vw; font-weight: 800; margin: 0; } .scr .jurl { font-size: 3.4vw; font-weight: 800; color: #1f6f78; margin: 1vh 0; }
.qr-big { position: fixed; inset: 0; background: #fff; display: grid; place-items: center; align-content: center; z-index: 13; cursor: pointer; }
.qr-big[hidden] { display: none; } .qr-big img { width: 70vh; height: 70vh; } .qr-big p { font-size: 4vw; font-weight: 800; color: #1f6f78; margin: 2vh 0 0; }
#pcTimer { font: 14px var(--font); padding: 5px; border-radius: 8px; border: 1px solid #5d6b70; background: #2b3a41; color: #fff; }
.devices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* moved out of inline styles: the site's CSP allows only this stylesheet (26 Oct 2026) */
.tight { margin: 0 0 6px; } .spaced { margin-top: 10px; }
.help .wrap { max-width: 820px; } .help h2 { font-size: 1.1rem; margin: 22px 0 6px; } .help li { margin: 4px 0; }
.help code { background: var(--teal-soft); padding: 1px 5px; border-radius: 5px; }
.help table { border-collapse: collapse; } .help td { padding: 4px 12px 4px 0; vertical-align: top; } .help td:first-child { font-weight: 700; white-space: nowrap; }
/* ---------------------------------------------------------------- standalone app (Nov 2026) */
a { color: var(--teal); }
.brandbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--teal); text-decoration: none; font-size: 1.05rem; }
.brand::before { content: ""; display: inline-block; width: .8em; height: .8em; border-radius: 50%; background: #d7261e; margin-right: .45em; vertical-align: -.05em; }
.codebox { font: 800 2rem/1 var(--font); letter-spacing: .25em; text-transform: uppercase; text-align: center; }
.center { text-align: center; } .hidden { display: none !important; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
select, input[type=number], input[type=password], input[type=email] { font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
input[type=password] { width: 100%; }
.btn.danger { color: #b3261e; border-color: #e3b5b1; } .btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #1d2a30; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: .95rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 92vw; }
.toast.show { opacity: 1; } .toast.bad { background: #b3261e; }
.grouppick { display: grid; gap: 8px; margin-top: 8px; }
/* phone: countdown and time's up */
.pclock { display: inline-block; float: right; background: #d7261e; color: #fff; font-weight: 800; border-radius: 8px; padding: 2px 10px;
  font-variant-numeric: tabular-nums; }
.pclock.paused { background: #6b7a80; } .pclock.calm { background: var(--teal); }
.timesup { background: #fdecea; color: #b3261e; border: 2px solid #d7261e; border-radius: 10px; padding: 10px 12px; font-weight: 800; margin-top: 12px; text-align: center; font-size: 1.1rem; }
.card.locked .opt, .card.locked input, .card.locked textarea, .card.locked .star, .card.locked .primary { opacity: .5; pointer-events: none; }
.me { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
/* dashboard */
.dash .wrap, .edit .wrap { max-width: 1040px; }
.evlist { width: 100%; border-collapse: collapse; } .evlist td, .evlist th { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.evlist th { font-size: .82rem; color: var(--muted); font-weight: 600; border-top: 0; }
.evlist .code { font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.evlist .acts { justify-content: flex-start; }
.tabs { display: flex; gap: 6px; margin-top: 14px; } .tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; color: var(--ink); }
.tabs button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.linkbox { background: var(--teal-soft); border-radius: 10px; padding: 10px 12px; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.tablewrap { overflow-x: auto; }
/* editor */
.qcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: var(--surface); }
.qcard .qhead { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.qcard .qno { font-weight: 800; color: var(--muted); }
.qcard textarea { min-height: 54px; }
.qcard .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.qcard .fields label, .settings label { font-size: .85rem; margin: 8px 0 3px; }
.qcard .fields input, .qcard .fields select { width: 100%; padding: 8px; }
.qcard .checks { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: .9rem; }
.qcard .checks label, .inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; margin: 0; }
.qcard.has-answers { border-color: #e0a050; } .qcard .warnline { color: var(--warn); font-size: .85rem; margin: 6px 0 0; }
.savebar { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; border-top: 1px solid var(--line); margin-top: 16px; z-index: 5; }
.problems { color: #b3261e; font-size: .9rem; } .problems li { margin: 2px 0; }
.settings textarea { min-height: 80px; font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
/* host control: timer panel */
.timerpanel { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bigclock { font: 800 2.6rem/1 var(--font); font-variant-numeric: tabular-nums; min-width: 5.2ch; text-align: center; border-radius: 10px; padding: 6px 10px; background: var(--line); color: var(--ink); }
.bigclock.run { background: #d7261e; color: #fff; } .bigclock.paused { background: #6b7a80; color: #fff; }
.joinline { font-size: 1.05rem; } .joinline b.code { letter-spacing: .14em; }
.groupcounts span { display: inline-block; background: var(--teal-soft); border-radius: 999px; padding: 2px 10px; margin: 2px 4px 2px 0; font-size: .85rem; }
/* projector: big countdown, time's up, join panel, group split, pies */
.scr .top { align-items: center; }
.scr .topright { display: flex; align-items: center; gap: 1.6vw; }
.clockbox { background: #d7261e; color: #fff; font: 800 4.4vw/1 var(--font); font-variant-numeric: tabular-nums; border-radius: 1vw; padding: .9vh 1.4vw;
  min-width: 11vw; text-align: center; box-shadow: 0 .4vw 1.2vw rgba(215,38,30,.25); }
.clockbox.paused { background: #6b7a80; box-shadow: none; }
.clockbox.urgent { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.clockbox[hidden] { display: none; }
.timesup-banner { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 20; }
.timesup-banner span { font: 900 11vw/1 var(--font); color: #e0221a; letter-spacing: .02em; text-transform: uppercase;
  text-shadow: 0 0 .6vw #fff, 0 0 1.4vw #fff, 0 .6vw 2vw rgba(0,0,0,.35); animation: popin .35s ease-out; }
.timesup-banner[hidden] { display: none; }
@keyframes popin { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .clockbox.urgent, .timesup-banner span { animation: none; } }
.scr .joinpill { font-size: 1.6vw; color: #5d6b70; } .scr .joinpill b { color: #1d2a30; letter-spacing: .12em; }
.scr .gsplit { display: grid; gap: 2vw; grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); }
.scr .gpanel { background: #f5f7f7; border-radius: 1.2vw; padding: 1.4vh 1.4vw; min-width: 0; }
.scr .gpanel h3 { margin: 0 0 .6vh; font-size: 1.9vw; text-transform: uppercase; letter-spacing: .06em; color: #1d2a30; text-align: center; }
.scr .gpanel .gn { text-align: center; color: #5d6b70; font-size: 1.3vw; margin: 0 0 .6vh; }
.scr .gpanel .stats { font-size: 1.3vw; }
.scr .gpanel .big { font-size: 4.5vw; text-align: center; }
.scr .legend { display: flex; flex-wrap: wrap; gap: .8vh 2vw; justify-content: center; margin-top: 1.4vh; font-size: 1.6vw; font-weight: 700; }
.scr .legend i { display: inline-block; width: 1.4vw; height: 1.4vw; border-radius: .3vw; margin-right: .5vw; vertical-align: -.15vw; }
.scr .pie { max-width: 34vh; margin: 0 auto; }
.scr .solo-pie { display: grid; grid-template-columns: minmax(0, 48vh) 1fr; gap: 3vw; align-items: center; }
.scr .solo-pie .legend { flex-direction: column; align-items: flex-start; justify-content: center; font-size: 2vw; }
.scr .hiddengrp { color: #5d6b70; font-size: 1.4vw; text-align: center; margin-top: 4vh; }
.scr .waitjoin { display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; margin-top: 2vh; }
.scr .waitjoin img { width: 44vh; height: 44vh; }
.scr .waitjoin .jcode { font: 900 7vw/1 var(--font); letter-spacing: .14em; color: #1d2a30; margin: 1vh 0; }
.qr-big .jcode { font: 900 6vw/1 var(--font); letter-spacing: .14em; color: #1d2a30; margin: 1vh 0 0; }
.qcard .fields .full { grid-column: 1 / -1; }
.pclock[hidden] { display: none; }
.timesup-banner { background: rgba(255,255,255,.6); }
.scr .solo-pie.withnames { grid-template-columns: minmax(0, 30vh) 1fr; }
