* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f1f5f9;
  color: #0f172a;
}

.hidden { display: none !important; }

.vote-header {
  background: linear-gradient(135deg, #ca8a04, #eab308);
  color: #fff;
  padding: 16px 20px;
}

.vote-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.vote-title { font-weight: 800; font-size: 1.1rem; }
.vote-subtitle { font-size: 0.85rem; opacity: 0.92; }

.vote-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.vote-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.vote-card h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.vote-hint {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.5;
  font-size: 0.92rem;
}

.vote-alert {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}

.vote-alert.ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.vote-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vote-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.vote-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
}

.vote-combobox {
  position: relative;
}

.vote-field-note {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.vote-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.vote-suggestion {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.vote-suggestion:last-child {
  border-bottom: none;
}

.vote-suggestion:hover,
.vote-suggestion.is-active {
  background: #fffbeb;
}

.vote-suggestion-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.vote-suggestion-detail {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.vote-suggestion-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 0.88rem;
}

.vote-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.vote-section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.vote-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ca8a04, #eab308);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.vote-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.vote-footer {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
  font-size: 0.82rem;
}

body.vote-modal-open {
  overflow: hidden;
}

.vote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

@media (min-width: 640px) {
  .vote-overlay {
    align-items: center;
  }
}

.vote-confirm-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.vote-confirm-panel h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.vote-voter-as {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #334155;
}

.vote-confirm-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.vote-person-card {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  background: #f8fafc;
}

.vote-person-photo {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e2e8f0;
}

.vote-person-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #64748b;
}

.vote-person-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ca8a04;
}

.vote-person-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 2px;
}

.vote-person-detail {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}

.vote-confirm-actions {
  display: flex;
  gap: 10px;
}

.vote-btn.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.vote-pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.vote-pick-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.vote-pick-btn .vote-person-card {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vote-pick-btn:hover .vote-person-card,
.vote-pick-btn:focus-visible .vote-person-card {
  border-color: #ca8a04;
  box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.2);
}
