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

p + p {
    margin-block-start: 1.5rem;
  }

:root {
  scrollbar-color: #002f47;
  }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  background: #f0f0f0;
  padding-bottom: 64px;
}

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

h1 {
  font-size: 1.15rem;
}

p  {
     text-wrap: balance;
}

.info p {
  font-size: .85rem;
}

li {
  margin-inline-start: 2rem;
  padding-block: .15rem;

  &:first-of-type {
    margin-block-start: 1rem;
  }
}

section, aside {
  padding: 12px;
}

main {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Event card */

.event {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* Collapsible header */

.event-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}

.event-header:active {
  background: #f5f5f5;
}

.event-name {
  font-weight: 600;
  flex: 1;
}

.event-subtotal {
  font-size: 0.85rem;
  color: #666;
}

.event-toggle {
  font-size: 0.8rem;
  color: #999;
  transition: transform 0.2s ease;
}

.event.open .event-toggle {
  transform: rotate(180deg);
}

/* Collapsible body */

.event-body {
  display: none;
  border-top: 1px solid #eee;
}

.event.open .event-body {
  display: block;
}

/* Sub-event rows */

.sub-event {
  display: flex;
  align-items: start;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-direction: column;
}

.sub-event:last-child {
  border-bottom: none;
}

.sub-event:nth-child(even) {
  background: #f8f8f8;
}

.group-name {
  font-size: 0.82rem;
  width: 72px;
  flex-shrink: 0;
  color: #444;
}

/* Controls */

.event-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.event-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.sub-event:nth-child(even) .event-controls label {
  background: #f2f2f2;
}

.event-controls label:active {
  background: #e0e0e0;
}

.event-controls input[type="checkbox"],
.event-controls input[type="radio"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Bottom bar */

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.scores {
  display: flex;
  gap: 16px;
}

#us,
#them {
  font-size: 1.1rem;
  font-weight: 700;
}

#reset-btn {
  background: #cc2200;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0 18px;
  height: 38px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

#reset-btn:active {
  background: #991a00;
}
