:root {
  color-scheme: light;
  --bg: #e7e3da;
  --card-bg: #faf8f4;
  --border: #dad5c8;
  --text: #3a3936;
  --muted: #75716a;
  --accent: #d97e3d;
  --accent-dark: #b5642c;
  --heading-font: "Gill Sans MT", "Gill Sans", "Gill Sans Nova", Calibri, Arial, sans-serif;
  --body-font: "Calibri Light", Calibri, "Segoe UI", Arial, sans-serif;
  --error: #b3401f;
  --success: #4d7c3f;
}

* { box-sizing: border-box; }

img.logo-image {
  cursor: zoom-in;
}

.notice-banner {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
  padding: 10px 20px;
}

#admin-hotspot {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: default;
  z-index: 500;
}

body {
  margin: 0;
  font-family: var(--body-font);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3 {
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- Display / big screen ---------- */

.display-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px 28px;
}

.display-header .heading-block {
  text-align: center;
  max-width: 640px;
}

.display-header h1 {
  margin: 0;
  font-size: 2.4rem;
  color: var(--text);
}

.display-header .tagline {
  margin: 8px 0 0;
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.2rem;
  color: var(--accent);
}

.display-header p.instructions {
  margin: 12px 0 0;
  font-family: var(--body-font);
  font-weight: 300;
  color: var(--muted);
  font-size: 1.05rem;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 12px 32px 40px;
  position: relative;
  z-index: 1;
}

.card {
  flex: 1 1 420px;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(58, 57, 54, 0.08);
}

.card img.logo-image {
  display: block;
  width: calc(100% + 32px);
  margin: -16px -16px 0;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.card h2 {
  margin: 12px 0 4px;
  font-size: 1.2rem;
  color: var(--text);
}

.qr-wrap {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.qr-wrap img.qr {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px;
}

.tally {
  text-align: left;
}

.tally .count {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.tally .label {
  font-family: var(--body-font);
  font-weight: 300;
  color: var(--muted);
  font-size: 0.9rem;
}

.bar-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.total-votes {
  font-family: var(--body-font);
  font-weight: 300;
  text-align: center;
  color: var(--muted);
  padding-bottom: 8px;
}

.card .btn {
  margin-top: 14px;
}

.display-footer {
  text-align: center;
  padding: 0 48px 28px;
  line-height: 1.5;
}

.display-footer .line1 {
  font-family: var(--body-font);
  font-weight: 300;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.display-footer .line2 {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Vote page (mobile) ---------- */

.vote-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.vote-page img.logo-image {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.vote-page h1 {
  font-size: 1.5rem;
  text-align: center;
  color: var(--accent);
  margin: 20px 0 4px;
}

.vote-page .subtitle {
  font-family: var(--body-font);
  font-weight: 300;
  text-align: center;
  color: var(--muted);
  margin-bottom: 20px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--body-font);
  font-weight: 300;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.4;
}

.field .hint {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 5px 0 0;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.checkbox-field input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-field label {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--text);
}

.checkbox-field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.btn {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 14px;
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--accent-dark);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#results-link {
  margin-top: 12px;
  display: none;
}

#results-link.visible {
  display: block;
}

.message {
  font-family: var(--body-font);
  font-weight: 300;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  display: none;
}

.message.error {
  display: block;
  background: #f7e9e2;
  color: var(--error);
  border: 1px solid #e8c9b6;
}

.message.success {
  display: block;
  background: #eef3e8;
  color: var(--success);
  border: 1px solid #cfdcc3;
}

/* ---------- Lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 21, 17, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 1000;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-overlay .lightbox-img {
  max-width: min(900px, 92vw);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: #fff;
}

/* ---------- Admin page ---------- */

.admin-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.admin-page h1 {
  text-align: center;
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.admin-page .subtitle {
  font-family: var(--body-font);
  font-weight: 300;
  text-align: center;
  color: var(--muted);
  margin: 0 0 24px;
}

.admin-page .admin-empty {
  font-family: var(--body-font);
  font-weight: 300;
  color: var(--muted);
  text-align: center;
}

.admin-page #admin-reset-btn {
  margin-top: 24px;
  background: var(--error);
}

.admin-page #admin-reset-btn:hover {
  background: #8f3018;
}

.admin-vote {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.admin-vote-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.admin-vote-logo {
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  color: var(--accent);
}

.admin-vote-time {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.admin-vote-email {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
}

.admin-vote-comment {
  font-family: var(--body-font);
  font-weight: 300;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 6px;
  word-break: break-word;
}
