body {
  font-family: system-ui, sans-serif;
  background: #f5f7fb;
  margin: 0;
  padding: 1rem;
}

.poll {
  max-width: 950px;
  margin: auto;
  background: white;
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

h1 {
  margin-top: 0;
}

label {
  display: block;
  margin: .75rem 0;
}

input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: .9rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
}

input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: .9rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 1.5rem 0;
}

legend {
  font-size: 1.2rem;
  font-weight: 700;
}

.hint {
  color: #555;
}

.legend {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .75rem 0;
}

.legend span {
  color: white;
  padding: .4rem .7rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
}

.legend-no {
  background: #222;
}

.legend-maybe {
  background: #f39c12;
}

.legend-yes {
  background: #2ecc71;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 1rem;
}

.day-card {
  background: #f0f3f8;
  padding: 1rem;
  border-radius: 14px;
}

.day-card h3 {
  text-align: center;
  margin-top: 0;
}

.timeslot {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: .8rem;
  margin-bottom: .55rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
  font-size: .95rem;
  font-weight: 700;
}

.timeslot strong,
.timeslot span {
  display: block;
}

.state-0 {
  background: #222;
  color: white;
}

.state-1 {
  background: #f39c12;
  color: white;
}

.state-2 {
  background: #2ecc71;
  color: white;
}

.timeslot:active {
  transform: scale(.96);
}

.submit-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 1rem;
  background: #2f80ed;
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}


.availability-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #d7dce5;
}

.availability-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: white;
}

.availability-table th,
.availability-table td {
  border: 1px solid #d7dce5;
  text-align: center;
  padding: .35rem;
}

.availability-table thead th {
  position: sticky;
  top: 0;
  background: #eef2f8;
  z-index: 2;
}

.availability-table th:first-child {
  position: sticky;
  left: 0;
  background: #eef2f8;
  z-index: 3;
}

.time-label {
  font-size: .85rem;
  white-space: nowrap;
}

.timeslot {
  width: 100%;
  min-width: 44px;
  height: 38px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.state-0 {
  background: #222;
}

.state-1 {
  background: #f39c12;
}

.state-2 {
  background: #2ecc71;
}

.timeslot:active {
  transform: scale(.94);
}

.timeslot:focus-visible {
  outline: 3px solid #2f80ed;
  outline-offset: 2px;
}

.same-times-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #eef2f8;
  padding: .7rem .9rem;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: .75rem;
}

.same-times-toggle input {
  width: 1.1rem;
  height: 1.1rem;
}

.result-card {
  background: #f0f3f8;
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0;
}

.result-card h2 {
  margin-top: 0;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.summary-table th,
.summary-table td {
  border: 1px solid #d7dce5;
  padding: .65rem;
  text-align: center;
}

.summary-table th {
  background: #eef2f8;
}

.results-table td {
  color: white;
  font-weight: 800;
  min-width: 58px;
  height: 44px;
}

.results-table td strong,
.results-table td small {
  display: block;
}

.results-table td small {
  font-size: .7rem;
  opacity: .85;
}

.heat-0 {
  background: #222;
}

.heat-1 {
  background: #325f3a;
}

.heat-2 {
  background: #3f7f46;
}

.heat-3 {
  background: #4f9d55;
}

.heat-4 {
  background: #5fbd64;
}

.heat-5 {
  background: #2ecc71;
}

.delete-btn {
  border: 0;
  border-radius: 8px;
  padding: .5rem .75rem;
  background: #c0392b;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.delete-btn:hover {
  background: #a93226;
}

.pair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}