*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f5f5f5;
  color: #222;
}

header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 1rem;
}

.home {
  font-weight: 700;
  font-size: 1.2rem;
  color: inherit;
  text-decoration: none;
}

main {
  max-width: 640px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 { margin-top: 0; }

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #1d4ed8; }

.session-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.session-list li a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  color: inherit;
  text-decoration: none;
}
.session-list li a:hover { border-color: #2563eb; }
.meta { color: #666; font-size: 0.9rem; }

form label {
  display: block;
  font-weight: 600;
  margin: 1rem 0 0.4rem;
}
form input, form textarea {
  width: 100%;
  padding: 0.5rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
}
form textarea { min-height: 12rem; resize: vertical; }
form .btn { margin-top: 1rem; }

.error { color: #b91c1c; }
.empty { color: #666; }

progress { width: 100%; height: 0.6rem; }

.question { text-align: center; margin: 2rem 0 1rem; }

.pair {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.choice {
  flex: 1;
  min-height: 6rem;
  font-size: 1.3rem;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
}
.choice:hover { border-color: #2563eb; background: #eff6ff; }
.vs { color: #666; }

.ranking {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-bottom: 1.5rem;
}
.ranking th, .ranking td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #eee;
}
.ranking th:first-child, .ranking td:first-child,
.ranking th:last-child, .ranking td:last-child { width: 6rem; }

.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
