:root {
  --bg: #fffaf5;
  --surface: #ffffff;
  --accent: #b91c1c;
  --accent-soft: #fef2f2;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --gold: #b45309;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(31, 41, 55, 0.06);
}

.header-card { border-top: 4px solid var(--accent); text-align: center; }
.eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.poll-title { margin: 0 0 6px; font-size: 20px; line-height: 1.3; }
.poll-subtitle { margin: 0; font-size: 14px; color: var(--gold); font-weight: 600; }
.intro-message { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text); text-align: left; }
.section-title { margin: 0 0 12px; font-size: 17px; color: var(--accent); }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat-item { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 15px; color: var(--text); word-break: break-word; }

.voter-list { display: flex; flex-direction: column; gap: 10px; }
.empty-state { margin: 0; font-size: 14px; color: var(--muted); text-align: center; padding: 8px 0; }
.voter-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fffdfb; display: flex; flex-direction: column; gap: 6px; }
.voter-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.voter-name { font-weight: 700; font-size: 15px; }
.voter-meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.voter-detail, .voter-note { margin: 0; font-size: 14px; line-height: 1.4; }
.voter-note { color: var(--muted); font-style: italic; }
.voter-actions { display: flex; gap: 8px; margin-top: 4px; }
.btn-edit, .btn-delete { padding: 6px 14px; font-size: 14px; font-weight: 600; }
.btn-delete { color: var(--accent); border-color: #fecaca; background: var(--accent-soft); }

.edit-banner {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.field-group { margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

textarea { min-height: 68px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

button {
  font-family: inherit;
  font-size: 15px;
  min-height: 44px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip-btn { padding: 8px 12px; font-size: 14px; font-weight: 500; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.option-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; font-weight: 600; text-align: left; }
.district-badge { margin-left: auto; margin-right: 8px; }
.other-input-wrap { margin-top: 8px; }
.district-list { display: flex; flex-direction: column; gap: 8px; }

.district-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.district-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: none;
  border-radius: 0;
  background: var(--bg);
  font-weight: 700;
  text-align: left;
}

.district-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.restaurant-row {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.restaurant-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; }
.restaurant-name { font-weight: 600; font-size: 15px; }
.restaurant-address {
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
}

.vote-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #f3f4f6; color: var(--text); max-width: 100%; }
.proposal-list { display: flex; flex-direction: column; gap: 8px; }
.proposal-by { font-size: 12px; color: var(--muted); font-style: normal; }
.proposal-add-box { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.btn-add-proposal { width: 100%; min-height: 44px; border-color: var(--accent); color: var(--accent); background: var(--surface); font-weight: 600; }
.is-selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.is-selected .vote-badge { background: var(--accent); color: #ffffff; }

.form-error { margin: 0 0 12px; color: var(--accent); font-size: 14px; font-weight: 600; }
.form-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-primary { width: 100%; background: var(--accent); border-color: var(--accent); color: #ffffff; font-weight: 700; font-size: 16px; }
.btn-secondary { width: 100%; background: #f3f4f6; font-weight: 600; }
.closing-card { font-size: 14px; color: var(--muted); background: #fffdfb; }
.closing-card p { margin: 0; }
