/* Телефон голосующего и админка: светлые, крупные кнопки под палец. */
:root {
  --navy: #0b1a3a; --navy2: #16295a; --gold: #c9962b; --gold2: #e2b44b; --gold-soft: #fbf3de;
  --bg: #f6f7fb; --card: #fff; --line: #e3e6ef; --muted: #6b7388; --ok: #15803d; --ok-soft: #dcfce7; --bad: #b91c1c; --bad-soft: #fee2e2;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--navy); }
body { font: 16px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; padding-bottom: 40vh; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 520px; margin: 0 auto; padding: 12px 14px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .ttl { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .ttl b { color: var(--gold); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #b8bfcd; display: inline-block; flex: none; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px #22c55e33; }
.conn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 12px 0; box-shadow: 0 1px 2px #0b1a3a0d; }
h1 { font-size: 26px; line-height: 1.15; margin: 4px 0 6px; }
h2 { font-size: 19px; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.inp { width: 100%; font: inherit; font-size: 17px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy); outline: none; }
.inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px #e2b44b33; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 16px; font-weight: 600; font-size: 16px; min-height: 48px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.gold { background: var(--gold2); border-color: var(--gold2); color: var(--navy); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 7px 11px; font-size: 14px; border-radius: 10px; }
.btn.icon { min-height: 38px; width: 38px; padding: 0; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:active:not(:disabled) { transform: scale(.98); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrapr { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; }

/* голосование */
.empty { text-align: center; padding: 48px 12px; }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; color: var(--gold); }
.empty .ic svg { width: 100%; height: 100%; }
.who { text-align: center; }
.who .ph { width: 180px; height: 180px; border-radius: 24px; object-fit: cover; margin: 6px auto 10px; display: block; border: 3px solid var(--gold2); background: #eef0f6; }
.who .ph.none { display: flex; align-items: center; justify-content: center; color: #b8bfcd; }
.who .ph.none svg { width: 90px; height: 90px; }
.who .rt { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 700; }
.crit { margin: 18px 0 6px; }
.crit .lbl { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.crit .lbl span { color: var(--gold); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale button { min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 20px; font-weight: 700; color: var(--navy); }
.scale button.sel { background: var(--navy); border-color: var(--navy); color: var(--gold2); transform: scale(1.04); }
.mine { background: var(--gold-soft); border: 1.5px solid var(--gold2); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }
.mine .ok { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ok); }
.mine .ok svg { width: 22px; height: 22px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 99px; }
.status.open { background: var(--ok-soft); color: var(--ok); }
.status.closed { background: #eef0f6; color: var(--muted); }

/* окна и подсказки */
.dlg-wrap { position: fixed; inset: 0; background: #0b1a3a73; display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.dlg { background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px #0b1a3a55; }
.dlg p { color: var(--muted); margin: 0 0 12px; }
.dlg .inp { margin: 4px 0 12px; }
.dlg-btns { display: flex; gap: 8px; justify-content: flex-end; }
.dlg-btns .btn { flex: 1; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 60; transition: .25s; max-width: 92vw; text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); }
.toast.good { background: var(--ok); }

/* админка */
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.kpi b { display: block; font-size: 26px; line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); }
.bar { position: relative; height: 16px; background: #eef0f6; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy2); border-radius: 99px; transition: width .4s; }
.bar.go i { background: #22c55e; }
.bar em { position: absolute; top: -2px; bottom: -2px; left: 80%; width: 2px; background: var(--gold); }
.lamp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; background: #eef0f6; color: var(--muted); }
.lamp .dot { width: 16px; height: 16px; }
.lamp.go { background: var(--ok-soft); color: var(--ok); }
.lamp.go .dot { background: #22c55e; box-shadow: 0 0 0 4px #22c55e40; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px #22c55e10; } }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #eef0f6; padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 9px 4px; font-weight: 600; font-size: 14px; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px #0b1a3a22; color: var(--navy); }
.seg.two { grid-template-columns: 1fr 1fr; }
.rnd-head { display: flex; align-items: flex-start; gap: 8px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 7px; border-radius: 6px; background: var(--gold-soft); color: #8a6414; }
.pl { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.pl.cur { background: var(--gold-soft); margin: 0 -16px; padding: 9px 16px; }
.pl img, .pl .noph { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; background: #eef0f6; display: flex; align-items: center; justify-content: center; color: #b8bfcd; }
.pl .noph svg { width: 26px; height: 26px; }
.pl .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .st { font-size: 12px; color: var(--muted); }
.lbl2 { font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.names { font-size: 13px; color: var(--muted); }
.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow-y: auto; }
.sheet .wrap { padding-bottom: 45vh; }
.danger-zone { border-color: #f5c2c2; }
