/* मतदाता खोज — the app (phones). Tokens and fonts come from base.css.
   Light screens for sunlight; one big action per screen; the voter's serial number is always the biggest thing.
   Text sizes, five steps only: .9rem (labels, the smallest) · 1rem (body) · 1.125rem (what you read first) · 1.25rem (headings) · 1.5rem.
   Screen titles are 1.85–2rem. Numbers (.num, serials, prices, OTP) keep their own sizes. */

html { font-size: 16px; }
html.large { font-size: 18.5px; }
body { background: #E4EBED; font-size: 1rem; -webkit-tap-highlight-color: transparent; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 520px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.screen { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.main { flex: 1; padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line);
  min-height: 60px; padding: 8px 12px 8px 6px; display: flex; align-items: center; gap: 4px;
}
.bar h1 { margin: 0; font-size: 1.25rem; font-weight: 650; flex: 1; min-width: 0; line-height: 1.4; }
.bar .end { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.icon-btn {
  width: 48px; height: 48px; flex: none; border: 0; background: transparent; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; color: inherit; text-decoration: none;
}
.icon-btn:active { background: var(--petrol-tint); }

/* ---------- text ---------- */
.title { margin: 0; font-size: 1.85rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.h2 { margin: 8px 0 0; font-size: 1rem; font-weight: 650; color: var(--muted); }
.lead { margin: 0; font-size: 1.125rem; line-height: 1.6; }
.note { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--muted); }
.note.c { text-align: center; }
.muted { color: var(--muted); }
.card-title { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: var(--r); min-height: 56px; padding: 0 18px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.125rem; font-weight: 650; text-decoration: none; text-align: center; line-height: 1.4;
  transition: transform .12s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--petrol); color: #fff; }
.btn.amber { background: var(--rose); color: var(--ink); }       /* accent action (kept class name) */
.btn.green, .btn.wa { background: var(--wa); color: #fff; min-height: 60px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn.outline { background: transparent; color: var(--petrol); border: 1.5px solid var(--petrol); min-height: 50px; font-size: 1rem; }
.btn.danger { background: var(--surface); color: var(--danger); border: 1.5px solid #E2A8A3; }
.btn.small, .btn.small.green { min-height: 48px; width: auto; padding: 0 14px; border-radius: 12px; font-size: 1rem; flex: none; }
.btn[disabled], .btn.busy { opacity: .5; pointer-events: none; }
.btn.busy::after { content: ''; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link {
  align-self: center; border: 0; background: none; font-size: 1rem; font-weight: 600; min-height: 48px;
  display: inline-flex; align-items: center; gap: 6px; color: var(--petrol); text-decoration: underline; text-underline-offset: 4px;
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 1rem; font-weight: 600; color: var(--ink); }
.field .note { font-weight: 400; }
.input, .select {
  border: 1.5px solid var(--line-strong); border-radius: var(--r); min-height: 56px; padding: 0 14px; width: 100%;
  font-size: 1.125rem; color: var(--ink); background: var(--surface); font-weight: 500;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .select:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px rgba(10, 90, 115, .22); }
.phone { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.phone:focus-within { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(10, 90, 115, .22); }
.phone > span { display: flex; align-items: center; padding: 0 14px; font-size: 1.125rem; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); background: var(--bg); }
.phone input { flex: 1; min-width: 0; border: 0; outline: 0; min-height: 60px; padding: 0 14px; font-size: 1.35rem; font-weight: 650; letter-spacing: .04em; background: transparent; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 56px; font-size: 1rem; line-height: 1.6; color: var(--ink); font-weight: 450; cursor: pointer; }
.check input { width: 32px; height: 32px; margin: 0; flex: none; accent-color: var(--petrol); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* A mistake, shown under the field it belongs to and kept until the field is corrected. */
.field-error { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--danger-tint); color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.5; }
.field-error svg { flex: none; margin-top: 2px; color: var(--danger); }
.input.invalid, .select.invalid, .phone.invalid, .otp-boxes.invalid span { border-color: var(--danger); }
.check.invalid { outline: 2px solid var(--danger); outline-offset: 6px; border-radius: 6px; }
.card.invalid { border: 1.5px solid var(--danger); }
.card.invalid .check.invalid { outline: 0; }
.toggle-chips.invalid .tchip { border-color: var(--danger); }
.pick-files.invalid .btn { border-color: var(--danger); }
.form-error { margin: 0; font-weight: 600; }

/* Seat picker on Setup: matches under the search box, then the chosen seat as one row. */
.seat-list { display: flex; flex-direction: column; gap: 6px; }
.seat-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 56px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); text-align: left; line-height: 1.5; }
.seat-opt b { font-size: 1.125rem; font-weight: 650; }
.seat-opt span { font-size: .9rem; color: var(--muted); font-weight: 400; }
.seat-opt:active { background: var(--petrol-tint); }
.seat-picked { padding-right: 6px; font-weight: 650; }
.seat-picked small { font-weight: 400; }
.tchip[aria-checked="true"] { background: var(--petrol); color: #fff; border-color: var(--petrol); }

/* Help topics: closed rows that open on tap. */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 12px 16px; font-size: 1.125rem; font-weight: 650; line-height: 1.4; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: ''; flex: none; width: 10px; height: 10px; margin: 0 6px 4px 0; border-right: 2.4px solid var(--muted); border-bottom: 2.4px solid var(--muted); transform: rotate(45deg); }
.fold[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.fold > p, .fold > ol { margin: 0; padding: 0 16px 16px; }
.fold > ol { padding-left: 38px; }

/* A chosen file: tick, name, remove. */
.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); font-size: 1rem; line-height: 1.5; }
.file-row > svg { flex: none; color: var(--ok); }
.file-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 6px 0; }
.file-row small { display: block; font-size: .9rem; color: var(--muted); }
.pick-files { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card.pad { padding: 16px; }
.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; text-decoration: none; color: var(--ink); }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.row .grow b { font-size: 1.125rem; font-weight: 650; }
.row .grow > span { font-size: .9rem; color: var(--muted); line-height: 1.5; }
/* Our note to the customer when a requested list cannot be found (wrong booth number). */
.row .grow > .problem { color: var(--danger); font-weight: 600; }
.row .grow .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.chev { flex: none; color: var(--muted); }
.switch { flex: none; width: 60px; height: 48px; border: 0; padding: 8px 2px; background: none; }
.switch span { display: block; position: relative; width: 56px; height: 32px; border-radius: 999px; background: var(--line-strong); }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.switch[aria-checked="true"] span { background: var(--petrol); }
.switch[aria-checked="true"] span::after { left: auto; right: 3px; }
/* Links that stand alone inside running text still get a finger-sized target. */
.links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 22px; margin: 0; }
.links .link { min-width: 48px; justify-content: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--petrol-tint); color: var(--petrol-deep); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.badge { border-radius: 999px; padding: 3px 11px; font-size: .9rem; font-weight: 650; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.badge.ok { background: var(--ok-tint); color: var(--ok); }
.badge.ok::before { content: '✓'; }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.off { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.badge.bad { background: var(--danger-tint); color: var(--danger); }
a.badge { text-decoration: none; min-height: 48px; padding: 0 8px 0 14px; }
.badge svg { width: 16px; height: 16px; color: inherit; }
.banner {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: var(--r);
  font-size: 1rem; font-weight: 600; line-height: 1.45; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.banner.poll { border: 1.5px solid var(--petrol); background: var(--petrol-tint); color: var(--petrol-deep); }
.banner.bad { border-color: #E2A8A3; background: var(--danger-tint); color: var(--danger); }
.banner span { flex: 1; }
.notice { border-radius: var(--r); padding: 12px 14px; background: var(--warn-tint); color: var(--warn); font-size: 1rem; line-height: 1.6; }
.notice.info { background: var(--petrol-tint); color: var(--petrol-deep); }
.notice.bad { background: var(--danger-tint); color: var(--danger); }
.notice.ok { background: var(--ok-tint); color: var(--ok); }
/* A message that stays until the person closes it (why this phone was logged out). */
.notice.keep { display: flex; align-items: flex-start; gap: 4px; padding: 10px 4px 10px 14px; color: var(--ink); font-weight: 600; }
.notice.keep > span { flex: 1; padding: 4px 0; }
.notice.keep .icon-btn { margin: -4px 0; color: var(--ink); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--petrol); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.brand-name { display: flex; flex-direction: column; line-height: 1.4; }
.brand-name b { font-size: 1.125rem; font-weight: 700; }

/* ---------- the ticket: the voter's number, the one bold thing ---------- */
.ticket { position: relative; background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-lg); }
.stripe { height: 8px; background: var(--rose); }

/* ---------- home ---------- */
.home-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; }
.home-bar b { font-size: 1.125rem; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.acct-pill { flex: none; min-height: 48px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; gap: 8px; padding: 0 14px 0 4px; font-size: 1rem; font-weight: 600; text-decoration: none; }
.acct-pill .avatar { width: 38px; height: 38px; background: var(--petrol); color: #fff; font-size: 1rem; }
/* Narrow phone or big text: the pill keeps only the avatar, so the app's name is never cut. */
@media (max-width: 340px) { .acct-pill { padding: 0 4px; } .acct-pill .lbl { display: none; } }
html.bigtext .acct-pill { padding: 0 4px; }
html.bigtext .acct-pill .lbl { display: none; }
.status-line { margin: 0 16px; display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--muted); line-height: 1.5; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.wait { background: var(--warn); }
.hero { padding: 18px 16px 4px; display: flex; flex-direction: column; gap: 14px; }
.hero .title { font-size: 2rem; }
.hero .hint { margin: 0; font-size: 1rem; color: var(--muted); line-height: 1.6; }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; padding: 4px 4px 4px 16px; margin: 0; }
.searchbox:focus-within { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(10, 90, 115, .22); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; min-height: 56px; font-size: 1.125rem; font-weight: 500; }
.searchbox input::placeholder { color: var(--muted); opacity: 1; }
.searchbox .go { width: 56px; height: 56px; flex: none; border: 0; border-radius: 14px; background: var(--petrol); color: #fff; display: flex; align-items: center; justify-content: center; }
.searchbox .go[disabled] { opacity: .45; }
.home-list { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sheet-bottom { display: flex; flex-direction: column; gap: 10px; }
.recent { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 8px 8px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.recent .sn { min-width: 62px; height: 48px; border-radius: 10px; background: var(--petrol-tint); color: var(--petrol-deep); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; padding: 0 8px; flex: none; }
.recent .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.recent .who b { font-size: 1.125rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .who span { font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.recent .share { width: 48px; height: 48px; flex: none; border: 0; border-radius: 12px; background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center; }
/* The voice control, always at the thumb: the whole bar is one button. Big on home, compact on results, slip and household. */
.mic-dock {
  position: sticky; bottom: 0; z-index: 4; width: 100%; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: calc(18px + var(--toast-room, 0px)) 16px calc(16px + env(safe-area-inset-bottom)) 24px; display: flex; align-items: center; gap: 18px; text-align: left;
}
.mic {
  width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--petrol); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 5px var(--surface), 0 0 0 9px var(--rose);
}
.mic-dock:active .mic, .next-mic:active .mic { transform: scale(.96); }
.mic-dock .hint { display: flex; flex-direction: column; font-size: 1rem; line-height: 1.5; color: var(--ink); }
.mic-dock .hint b { font-size: 1.25rem; font-weight: 700; }
.mic-dock .hint span { color: var(--muted); font-size: .9rem; }
.mic-dock.compact { padding: calc(10px + var(--toast-room, 0px)) 16px calc(10px + env(safe-area-inset-bottom)); gap: 14px; }
.mic-dock.compact .mic { width: 64px; height: 64px; box-shadow: none; }
html.typing .mic-dock { display: none; }
/* Short screen (under 620px) or big text: the bars at the bottom slim down so the list keeps most of the screen.
   The compact bar keeps one line (its second line goes), the home bar gets the smaller mic, the slip's “new search” loses its caption. */
@media (max-height: 619px) {
  .mic-dock { padding: calc(12px + var(--toast-room, 0px)) 16px calc(12px + env(safe-area-inset-bottom)) 22px; gap: 16px; }
  .mic-dock .mic { width: 64px; height: 64px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--rose); }
  .mic-dock.compact { padding: calc(8px + var(--toast-room, 0px)) 16px calc(8px + env(safe-area-inset-bottom)); }
  .mic-dock.compact .mic { width: 56px; height: 56px; box-shadow: none; }
  .mic-dock.compact .hint span, .next-mic > span:last-child { display: none; }
  .mic-dock.compact .hint b { font-size: 1.125rem; }
  .slip-actions { padding-top: calc(8px + var(--toast-room, 0px)); row-gap: 6px; }
  .slip-actions .btn { min-height: 50px; }
}
html.bigtext .mic-dock.compact .hint span, html.bigtext .next-mic > span:last-child { display: none; }
html.bigtext .mic-dock.compact .hint b { font-size: 1.125rem; }
html.bigtext .mic-dock.compact .mic { width: 56px; height: 56px; }
html.bigtext .slip-actions { row-gap: 6px; }
@media (max-height: 619px) { html.bigtext .mic-dock .hint span { display: none; } }
/* No internet: voice cannot listen, so the bar says so and opens typing instead. */
.mic-dock.off .mic, .next-mic.off .mic { background: var(--line-strong); box-shadow: none; }
.examples { display: flex; flex-direction: column; gap: 8px; }
.examples > b { font-size: 1.125rem; font-weight: 700; }
.ex { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); font-size: 1rem; font-weight: 600; text-align: left; }
.ex svg { color: var(--petrol); flex: none; }
.ex:active { background: var(--petrol-tint); }
.wait-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- results ---------- */
.qbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 3px 3px 3px 12px; margin: 0; }
.qbar:focus-within { border-color: var(--petrol); }
.qbar input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.125rem; min-height: 48px; background: transparent; }
.qbar .icon-btn, .searchbox .icon-btn { color: var(--ink); }
.qbar .mini-mic { width: 48px; height: 48px; border-radius: 11px; background: var(--petrol); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; flex: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; min-height: 48px; padding: 0 10px 0 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; color: var(--ink); }
.chip b { font-weight: 650; }
.chip svg { color: var(--muted); }
.chip.ward { border-color: var(--petrol); background: var(--petrol-tint); }
.count-line { margin: 2px 0 0; font-size: 1rem; line-height: 1.5; }
.count-line .muted { font-weight: 400; }

/* The one sure answer: big number, place to go, send button. */
.answer { display: flex; flex-direction: column; overflow: hidden; }
.answer .top { display: flex; align-items: stretch; text-decoration: none; color: var(--ink); }
.answer .sn { padding: 12px 16px 6px; display: flex; flex-direction: column; justify-content: center; background: var(--petrol-tint); min-width: 118px; border-right: 1.5px dashed var(--ink); }
.answer .sn small { font-size: .9rem; font-weight: 600; color: var(--petrol-deep); }
.answer .sn b { font-size: 3.4rem; line-height: 1.15; color: var(--petrol-deep); }
.answer .who { flex: 1; min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; line-height: 1.45; }
.answer .who b { font-size: 1.25rem; font-weight: 700; }
.answer .who .rom { font-size: .9rem; color: var(--muted); }
.answer .who .rel { font-size: 1rem; }
.answer .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 1rem; }
.answer .facts span { white-space: nowrap; }
.answer .facts b { font-weight: 700; }
.answer .acts { display: flex; gap: 8px; padding: 0 12px 12px; }
.answer .acts .btn { min-height: 54px; }
.answer .acts .btn.ghost { flex: 0 0 auto; width: auto; padding: 0 16px; }

/* Other matches: compact rows. */
.voter {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 10px 10px 0;
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); width: 100%; text-align: left; min-height: 72px;
}
.voter .sbox { min-width: 78px; padding: 0 6px; flex: none; text-align: center; align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.voter .sbox b { display: block; font-size: 1.85rem; line-height: 1.2; color: var(--petrol-deep); }
.voter .sbox span { font-size: .9rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.voter .info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.voter .info .nm { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.voter .info .nm b { font-size: 1.125rem; font-weight: 650; color: var(--ink); }
.voter .info span { font-size: 1rem; color: var(--muted); }
.voter .info .nm span, .voter .info .place { font-size: .9rem; }
.voter .info .place { color: var(--ink); }
.voter.maybe { background: var(--surface); }
.empty { text-align: center; padding: 28px 12px 8px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h2 { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.empty .art { width: 84px; height: 84px; border-radius: 50%; background: var(--petrol-tint); color: var(--petrol); display: flex; align-items: center; justify-content: center; }

/* ---------- voice ---------- */
.voice { position: fixed; inset: 0; z-index: 30; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; }
.voice .top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.voice .lang { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; min-height: 44px; padding: 0 16px; font-weight: 650; }
.voice .body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; justify-content: safe center; gap: 18px; padding: 12px 24px; text-align: center; }
.voice .body > * { flex: none; }
.voice .said { margin: 0; font-size: 2rem; font-weight: 700; line-height: 1.4; min-height: 1.4em; }
.voice .listening { margin: 0; color: var(--petrol); font-size: 1.125rem; font-weight: 600; }
.voice .notice { margin: 0; font-size: 1.125rem; font-weight: 600; text-align: left; }
.voice .vchips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.voice .vchips span { background: var(--petrol-tint); color: var(--petrol-deep); border-radius: 999px; padding: 6px 14px; font-size: 1rem; }
.pulse { width: 124px; height: 124px; border-radius: 50%; background: var(--petrol); color: #fff; display: flex; align-items: center; justify-content: center; position: relative; border: 0; }
.pulse.on::before, .pulse.on::after { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 4px solid var(--rose); opacity: .7; animation: ring 1.6s ease-out infinite; }
.pulse.on::after { animation-delay: .8s; }
@keyframes ring { from { transform: scale(.88); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.voice .tips { background: var(--bg); border-radius: var(--r); padding: 12px 16px; font-size: 1rem; line-height: 1.75; color: var(--muted); }
.voice .tips b { color: var(--ink); font-weight: 650; }
.voice .foot { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; gap: 10px; border-top: 1px solid var(--line); }
.voice .foot .btn { flex: 1; }
.voice .privacy { margin: 0 0 6px; text-align: center; font-size: .9rem; color: var(--muted); }
/* One state at a time: listening (mic + how to say it), got it (spinner, on its way), error (message + mic to retry). */
.voice .spin { display: none; }
.voice[data-state="got"] .pulse, .voice[data-state="got"] .tips { display: none; }
.voice[data-state="got"] .spin { display: block; }
.voice[data-state="error"] .said, .voice[data-state="error"] .vchips { display: none; }

/* ---------- slip (on screen; the shared picture is drawn in slip.js to match) ----------
   Order of weight: serial number (biggest) → booth, where to go → ward → name. Labels are ink, not grey. */
.slip .head { background: var(--petrol-deep); color: #fff; padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; border-radius: calc(var(--r-lg) - 1.5px) calc(var(--r-lg) - 1.5px) 0 0; }
.slip .head b { font-weight: 700; font-size: 1rem; }
.slip .big { padding: 12px 18px 4px; display: grid; grid-template-columns: 1.7fr 1fr; gap: 0; }
.slip .big > div { min-width: 0; }
.slip .big > div + div { border-left: 1.5px solid var(--ink); padding-left: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.slip .big .lbl { font-size: 1.125rem; font-weight: 700; color: var(--ink); line-height: 1.4; margin-bottom: -.5rem; }
.slip .big > div + div .lbl { margin-bottom: -.2rem; }
/* Digits never break over two lines: the size is capped by the column width and the number of characters (--n, set in the markup).
   A condensed digit is about .47em wide; the columns are 63% / 37% of the slip. On an ordinary phone the cap is not reached. */
.slip .big { --slip-w: calc(min(100vw, 480px) - 71px); }
.slip .big .val { font-size: min(5.2rem, calc(var(--slip-w) * .63 / (.5 * var(--n, 3)))); line-height: 1.15; font-stretch: 70%; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow-wrap: normal; color: var(--ink); }
.slip .big > div + div .val { font-size: min(3rem, calc((var(--slip-w) * .37 - 18px) / (.52 * var(--n, 2)))); line-height: 1.2; letter-spacing: 0; padding-bottom: .6rem; }
.slip .booth { position: relative; border-top: 1.5px dashed var(--ink); padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; background: var(--petrol-tint); }
/* Tear notches at the dashed line, drawn with their own outline. */
.slip .booth::before, .slip .booth::after { content: ''; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.slip .booth::before { left: -11.5px; clip-path: inset(-2px -2px -2px 50%); }
.slip .booth::after { right: -11.5px; clip-path: inset(-2px 50% -2px -2px); }
.slip .booth .line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.125rem; font-weight: 700; }
.slip .booth .line b { font-size: 2.2rem; line-height: 1.2; font-stretch: 80%; font-weight: 800; }
.slip .booth .line .room b { font-size: 1.5rem; }
.slip .booth .place { font-size: 1.125rem; font-weight: 650; line-height: 1.45; }
.slip .who { padding: 14px 18px 10px; display: flex; flex-direction: column; gap: 6px; }
.slip h2 { margin: 0; font-size: 1.85rem; font-weight: 700; line-height: 1.4; }
.slip .rel { margin: 0; font-size: 1.125rem; line-height: 1.5; }
.slip dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 1.125rem; }
.slip dt { color: var(--ink); font-weight: 500; }
.slip dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.slip .foot { margin: 0; border-top: 1px dashed var(--line-strong); padding: 10px 18px 12px; font-size: .9rem; line-height: 1.55; color: var(--muted); }
/* Send, and the next search, both under the thumb. */
.slip-actions { position: sticky; bottom: 0; background: var(--bg); padding: calc(10px + var(--toast-room, 0px)) 0 calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.slip-actions .btn { padding: 0 12px; }
.slip-actions .link { justify-self: center; }
.slip-actions .more-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; }
.btn .size { font-size: .85rem; font-weight: 600; opacity: .9; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; line-height: 1.5; }
.print-all { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.next-mic { grid-row: 1 / span 3; border: 0; background: none; padding: 0; min-width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); font-size: .9rem; font-weight: 650; line-height: 1.4; }
.next-mic .mic { width: 60px; height: 60px; box-shadow: none; }

/* ---------- lists, team, poll ---------- */
.stat-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 16px 16px; display: flex; gap: 14px; align-items: center; }
.stat-head .count b { display: block; font-size: 2.6rem; line-height: 1.15; color: var(--petrol-deep); }
.stat-head .count span { color: var(--muted); font-size: .9rem; }
.stat-head { flex-wrap: wrap; }
.stat-note { flex-basis: 100%; margin: 0; font-size: 1rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.progress { height: 10px; border-radius: 999px; background: var(--petrol-tint); overflow: hidden; }
.progress > div { height: 100%; background: var(--petrol); border-radius: 999px; }
.progress.light { background: var(--line); }
.progress.light > div { background: var(--petrol); }
.toggle-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 999px; min-height: 48px; padding: 0 16px; font-weight: 600; font-size: 1rem; }
.tchip[aria-pressed="true"] { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.house-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.house-row .left { width: 56px; text-align: center; flex: none; }
.house-row .left b { display: block; font-size: 1.55rem; line-height: 1.2; color: var(--petrol-deep); }
.house-row .left span { font-size: .9rem; color: var(--muted); }
/* Polling day: every house still to come, one tap shows its voters by name. Rows paint only when on screen. */
.house-list { display: flex; flex-direction: column; gap: 10px; }
button.house-row { width: 100%; font: inherit; color: var(--ink); cursor: pointer; text-align: left; min-height: 56px; content-visibility: auto; contain-intrinsic-size: auto 72px; }
button.house-row > svg { flex: none; color: var(--muted); transition: transform .15s; }
button.house-row[aria-expanded="true"] { border-color: var(--petrol); }
button.house-row[aria-expanded="true"] > svg { transform: rotate(90deg); }
.house-people { margin: -4px 0 4px 12px; }
.sn-box { min-width: 54px; height: 40px; border-radius: 12px; background: var(--petrol-tint); color: var(--petrol-deep); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; padding: 0 6px; flex: none; }
.row-link { display: flex; align-items: center; gap: 12px; flex: 1 1 170px; min-width: 0; text-decoration: none; color: inherit; }
.row.wraps { flex-wrap: wrap; }
.row.wraps > .btn { margin-left: auto; }

/* ---------- plans ---------- */
.plan-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.plan-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.plan-row .grow b { font-size: 1.125rem; font-weight: 650; }
.plan-row .grow span { font-size: .9rem; color: var(--muted); }
.plan-row .price { font-size: 1.35rem; white-space: nowrap; text-align: right; line-height: 1.2; }
.plan-row .price small { display: block; font-size: .9rem; font-weight: 500; font-stretch: 100%; color: var(--muted); }
.plan-hero { background: var(--petrol-deep); color: #fff; border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.plan-hero .price { display: block; font-size: 2.2rem; line-height: 1.2; color: #fff; }
.plan-hero .muted, .plan-hero .note { color: var(--petrol-soft); }
.plan-cards { display: flex; flex-direction: column; gap: 10px; }
/* A plan: name and what you get on top, then the price on its own row, then the pay button. */
.plan-card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.plan-card.best { border-color: var(--petrol); }
.plan-card .nm { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.plan-card .sub { font-size: 1rem; color: var(--muted); line-height: 1.5; }
.plan-card .total { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.plan-card .total b { font-size: 1.85rem; line-height: 1.25; color: var(--petrol-deep); }
.plan-card .total small { font-size: .9rem; line-height: 1.5; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The dated price that follows (seat plan): one plain line, no strike-through, no badge. */
.plan-card .total .then { flex-basis: 100%; color: var(--ink); }
.plan-card .btn { margin-top: 10px; }

/* ---------- language ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lang-opt { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: var(--r); min-height: 72px; padding: 10px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; gap: 0; position: relative; line-height: 1.4; }
.lang-opt b { font-size: 1.25rem; font-weight: 650; }
.lang-opt span { font-size: .9rem; color: var(--muted); }
.lang-opt[aria-checked="true"] { border: 2.5px solid var(--petrol); background: var(--petrol-tint); }
.lang-opt[aria-checked="true"]::after { content: '✓'; position: absolute; top: 8px; right: 12px; color: var(--petrol); font-weight: 800; }

/* ---------- login ---------- */
.login-hero { padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.login-hero .title { font-size: 2rem; }
/* An illustration of what the app does, not a control: tinted, no border. */
.how { display: flex; align-items: center; gap: 10px; background: var(--petrol-tint); border-radius: var(--r-lg); padding: 12px 14px; color: var(--petrol-deep); }
.how .q { flex: 1; min-width: 0; font-size: 1rem; line-height: 1.5; }
.how .q b { display: block; font-weight: 650; color: var(--ink); }
.how .q svg { display: inline-block; vertical-align: -3px; }
.how .mini-slip { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 4px 14px; display: flex; flex-direction: column; align-items: center; flex: none; }
.how .mini-slip small { font-size: .9rem; color: var(--petrol-deep); font-weight: 600; }
.how .mini-slip b { font-size: 2rem; line-height: 1.2; color: var(--petrol-deep); }
.otp-boxes { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
/* MSG91 widget captcha (only when captcha is on for the widget): takes no room while empty. */
.otp-captcha:empty { display: none; }
.otp-captcha { display: flex; justify-content: center; min-height: 0; }
.otp-boxes span { height: 62px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.otp-boxes span.cur { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(10, 90, 115, .22); }
.otp-boxes input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; letter-spacing: 40px; }

/* ---------- overlays ---------- */
/* Toasts are short confirmations. They sit at the bottom, lifted above the mic bar or the send buttons (ui.js sets --toast-bottom). */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--toast-bottom, 16px)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; border-radius: var(--r); padding: 12px 18px; font-size: 1rem; line-height: 1.5;
  width: max-content; max-width: min(440px, calc(100% - 32px)); text-align: center; white-space: pre-line; pointer-events: none;
}
.backdrop { position: fixed; inset: 0; background: rgba(14, 28, 33, .55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.dialog { background: var(--surface); width: 100%; max-width: 480px; border-radius: 22px 22px 0 0; padding: 20px 16px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 92dvh; overflow: auto; }
.dialog h2 { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.lock { position: fixed; inset: 0; z-index: 50; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; max-width: 480px; margin: 0 auto; }
.lock .hint, .lock p { color: var(--muted); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 60dvh; color: var(--muted); }
.spin { width: 38px; height: 38px; border: 4px solid var(--petrol-tint); border-top-color: var(--petrol); border-radius: 50%; animation: spin .8s linear infinite; }

/* Kept for screens that still mark themselves dark: they are light now. */
.screen.dark { background: var(--bg); color: var(--ink); }

/* Older colour names still used in a few inline styles, mapped onto the new palette. */
:root {
  --deep: var(--petrol-deep); --deep2: var(--petrol); --primary: var(--petrol); --amber: var(--rose);
  --lilac: var(--petrol-tint); --pale: var(--muted); --edge: var(--line); --mint: var(--ok); --field: var(--line-strong);
  --green: var(--ok); --warm: var(--warn); --warm-bg: var(--warn-tint); --ok-bg: var(--ok-tint); --danger-bg: var(--danger-tint);
}

/* ---------- settings: a two-way choice (print size) ---------- */
.seg { display: inline-flex; flex: none; border: 1.5px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.seg button { min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; }
.seg button + button { border-left: 1.5px solid var(--line-strong); }
.seg button[aria-checked="true"] { background: var(--petrol); color: #fff; }

/* ---------- the printed slip (js/printslip.js): plain white paper, black ink only, no logo, no colour ---------- */
#print-root { display: none; color: #000; background: #fff; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body > :not(#print-root) { display: none !important; }
  #print-root { display: block; color: #000; font-family: 'Noto Sans Devanagari', system-ui, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
#print-root .psheet { break-after: page; }
#print-root .psheet:last-child { break-after: auto; }
#print-root .pslip { position: relative; overflow: hidden; background: #fff; color: #000; border: 1.2pt solid #000; padding: 5mm 6mm; display: flex; flex-direction: column; break-inside: avoid; }
#print-root .p-head { margin: 0; font-weight: 700; font-size: 12pt; border-bottom: 1pt solid #000; padding-bottom: 1.5mm; }
#print-root .p-top { display: grid; grid-template-columns: 62% 38%; border-bottom: 1pt solid #000; }
#print-root .p-top > div { display: flex; flex-direction: column; padding: 1mm 0; }
#print-root .p-top > div + div { border-left: 1pt solid #000; padding-left: 3mm; }
#print-root .p-top span { font-weight: 700; font-size: 11pt; }
#print-root .p-top b { font-weight: 800; font-stretch: 75%; line-height: 1.05; }
#print-root .p-sn b { font-size: 56pt; }
#print-root .p-booth b { font-size: 30pt; margin-top: auto; }
#print-root dl { margin: 2mm 0 0; display: grid; grid-template-columns: auto 1fr; gap: 1.2mm 4mm; font-size: 12pt; line-height: 1.4; }
#print-root dt { font-weight: 400; }
#print-root dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
#print-root dd.p-name { font-size: 15pt; }
#print-root .p-foot { margin: auto 0 0; padding-top: 2mm; border-top: 1pt dashed #000; font-size: 10pt; font-weight: 600; }
#print-root .p-mark { position: absolute; right: 8mm; bottom: 12mm; transform: rotate(-16deg); font-size: 54pt; font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: .8pt #000; pointer-events: none; }
/* One slip on a page (A4 or A5). */
#print-root .one .pslip { width: 128mm; min-height: 110mm; margin: 0 auto; }
/* A family: 8 slips to an A4 sheet, 2 × 4, the dashed borders are the cut lines. */
#print-root .grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 68mm); width: 190mm; height: 272mm; margin: 0 auto; }
#print-root .grid .pslip { border: 1pt dashed #000; padding: 3mm 4mm; }
#print-root .grid .p-head { font-size: 9.5pt; padding-bottom: .6mm; }
#print-root .grid .p-top span { font-size: 8.5pt; }
#print-root .grid .p-sn b { font-size: 36pt; }
#print-root .grid .p-booth b { font-size: 20pt; }
#print-root .grid dl { margin-top: 1.5mm; font-size: 10pt; gap: .6mm 3mm; line-height: 1.3; }
#print-root .grid dd.p-name { font-size: 12pt; }
#print-root .grid .p-foot { font-size: 7.5pt; padding-top: .8mm; }
#print-root .grid .p-mark { font-size: 30pt; right: 5mm; bottom: 7mm; }
