* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f7fb;
  color: #111827;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.topbar {
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.subtitle {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}

.section-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafafa;
}

.section-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.race-list {
  display: flex;
  flex-direction: column;
}

.race-row {
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.race-row:last-child {
  border-bottom: none;
}

.race-line-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.25;
  margin-bottom: 4px;
}

.race-line-2 {
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.35;
}

.series-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.series-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
  vertical-align: middle;
}

.series-text {
  vertical-align: middle;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.reminder-btn {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px 2px 2px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.reminder-btn:hover {
  transform: scale(1.08);
}

.reminder-btn:focus-visible {
  outline: 2px solid #9ca3af;
  outline-offset: 2px;
  border-radius: 6px;
}

.reminder-btn.is-on {
  color: #d4a017;
}

.reminder-btn.is-off {
  color: #9ca3af;
}

.bell-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.reminder-btn.is-on .bell-icon {
  fill: #d4a017;
  opacity: 1;
}

.reminder-btn.is-off .bell-icon {
  fill: #9ca3af;
  opacity: 1;
}

.reminder-badge {
  position: absolute;
  top: -8px;
  right: -14px;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.reminder-btn.is-on .reminder-badge {
  background: #d4a017;
  color: #ffffff;
}

.reminder-btn.is-off .reminder-badge,
.reminder-badge.is-off {
  background: #9ca3af;
  color: #ffffff;
}

.status {
  display: inline-block;
  margin-left: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}

.status-upcoming {
  background: #dcfce7;
  color: #166534;
}

.status-live {
  background: #fee2e2;
  color: #991b1b;
}

.status-finished {
  background: #e5e7eb;
  color: #374151;
}

.empty-state {
  padding: 18px;
  color: #6b7280;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .container {
    padding: 14px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .section-header,
  .race-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .race-line-1 {
    font-size: 0.95rem;
  }

  .race-line-2 {
    font-size: 0.86rem;
  }

  .actions {
    gap: 8px;
  }

  .reminder-badge {
    right: -12px;
  }
}
