* {
  box-sizing: border-box;
}

:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f5f5f5;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f5f5;
}

.container {
  width: min(760px, 92%);
  margin: 0 auto;
  padding: 28px 0 50px;
}

.hero {
  text-align: center;
  padding: 18px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.08;
}

.subtitle {
  color: #666;
  margin: 14px auto 0;
  max-width: 580px;
  line-height: 1.6;
}

.card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.05);
}

h2 {
  margin: 0 0 15px;
  font-size: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

input {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  padding: 14px 15px;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: #111;
}

.search-results {
  margin-top: 8px;
  display: grid;
  gap: 7px;
}

.name-option {
  width: 100%;
  text-align: left;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.name-option:hover {
  background: #f0f0f0;
}

.name-option strong,
.name-option span {
  display: block;
}

.name-option span {
  color: #777;
  font-size: 13px;
  margin-top: 3px;
}

.selected-voter {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f0f0f0;
  font-weight: 700;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.design-card {
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  cursor: pointer;
  transition: .18s ease;
}

.design-card:hover {
  transform: translateY(-2px);
}

.design-card.selected {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

.design-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eee;
}

.design-info {
  padding: 13px;
}

.design-info strong {
  display: block;
  margin-bottom: 4px;
}

.design-info span {
  color: #777;
  font-size: 13px;
}

.hint {
  color: #777;
  margin-top: -7px;
}

.vote-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  background: #111;
  color: white;
  margin: 4px 0 12px;
}

.vote-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.message {
  text-align: center;
  min-height: 24px;
  font-weight: 700;
}

.success { color: #18733a; }
.error { color: #b42318; }

.hidden {
  display: none !important;
}

footer {
  text-align: center;
  margin-top: 20px;
}

footer a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-box {
  background: white;
  width: min(420px, 100%);
  border-radius: 18px;
  padding: 24px;
}

.modal-box h3 {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  border: 0;
  border-radius: 11px;
  padding: 13px;
  font-weight: 700;
  cursor: pointer;
}

.primary {
  background: #111;
  color: white;
}

.secondary {
  background: #eee;
}

.results {
  display: grid;
  gap: 17px;
}

.result-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.result-row span {
  color: #777;
}

.bar-wrap {
  height: 10px;
  background: #eee;
  border-radius: 20px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: #111;
  border-radius: 20px;
  min-width: 2px;
}

@media (max-width: 560px) {
  .design-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 17px;
  }
}
