:root {
  font-family: system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  background: #fff;
  color: #000;
  line-height: 1.5;
}

h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3rem;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1.5rem;
  color: #666;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.card {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__field span {
  font-weight: 500;
}

.form__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}

input {
  padding: 0.6rem;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid #000;
}

.button {
  border: none;
  padding: 0.7rem 1.5rem;
  background: #000;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
}

.button:hover {
  background: #333;
}

.button--ghost {
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

.button--ghost:hover {
  background: #f5f5f5;
}

.results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.export-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.summary__item {
  background: #fff;
  border: 1px solid #ddd;
  padding: 0.3rem 0.7rem;
}

.schedule-list {
  display: grid;
  gap: 1rem;
}

.week-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
}

.week-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

.week-card__number {
  font-size: 1.1rem;
  font-weight: 600;
}

.week-card__date {
  font-size: 0.95rem;
  color: #666;
}

.week-card__participants {
  display: grid;
  gap: 0.5rem;
}

.participant-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.participant-row__name {
  flex: 1;
  font-weight: 500;
}

.participant-row__status {
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
  border: 1px solid #ddd;
  background: #f5f5f5;
  user-select: none;
}

.participant-row__status:not(.participant-row__status--rest) {
  transition: background 0.2s ease;
}

.participant-row__status:not(.participant-row__status--rest):hover {
  background: #e5e5e5;
  border-color: #999;
}

.participant-row__status--rest {
  background: #fff;
  border-color: #000;
  font-weight: 600;
  cursor: default !important;
}

.table-wrapper {
  border: 1px solid #ddd;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f5f5f5;
}

thead th {
  padding: 0.7rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #ddd;
}

tbody tr {
  border-bottom: 1px solid #eee;
}

tbody td {
  padding: 0.7rem;
}

.footer {
  padding: 2rem 0;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
  }

  tbody td {
    border: none;
    padding: 0.3rem 0;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
  }
}
